Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 26, 2022
  2. Aug 23, 2022
    • Cam Saul's avatar
      [Toucan 2 Prep] Replace the `IObjectPermissions` protocol with multimethods (#24917) · 241f2179
      Cam Saul authored
      * [Toucan 2 prep] Don't invoke Toucan models as functions
      
      * Some fixes
      
      * Test fixes
      
      * Test fix
      
      * [Toucan 2 prep] Don't call `type` or `class` on Toucan models
      
      * Test fixes
      
      * More test fixes :wrench:
      
      * Replace perms protocol with multimethods; derive models from perms policy keywords
      
      * Test fixes :wrench:
      
      * Appease Eastwood
      
      * Fix errors now that App has been merged in
      
      * Empty commit to trigger CI
      Unverified
      241f2179
  3. Aug 22, 2022
  4. Aug 12, 2022
    • Cam Saul's avatar
      Enable Kondo for tests (part 1) (#24736) · bc4acbd2
      Cam Saul authored
      * Fix some small things
      
      * Add Kondo to deps.edn to be able to debug custom hooks from REPL
      
      * Fix macroexpansion hook for with-temp* without values
      
      * Test config (WIP)
      
      * More misc fixes
      
      * Disable :inline-def for tests
      
      * More misc fixes
      
      * Fix $ids and mbql-query kondo hooks.
      
      * Fix with-temporary-setting-values with namespaced symbols
      
      * More misc fixes
      
      * Fix the rest of the easy ones
      
      * Fix hook for mt/dataset
      
      * Horrible hack to work around https://github.com/clj-kondo/clj-kondo/issues/1773 . Custom linter for mbql-query macro
      
      * Fix places calling mbql-query with a keyword table name
      
      * Fix the last few errors in test/
      
      * Fix errors in enterprise/test and shared/test
      
      * Fix driver test errors
      
      * Enable linters on CI
      
      * Enable unresolved-namespace linter for tests
      
      * Appease the namespace linter again
      
      * Test fixes
      Unverified
      bc4acbd2
  5. Aug 09, 2022
  6. Aug 05, 2022
    • Noah Moss's avatar
      Bump shadow-cljs to 2.19.6 (#24647) · dfd93579
      Noah Moss authored
      * Bump shadow-cljs
      
      This lets us use the template tag functionality
      
      ```
      add experimental support for creating js template strings
      
      used like str but emits native JS `` template
      
        (js-template "foo" (+ 1 2) "bar")
      
      emits the literal
      
        `foo${(1 + 2)}bar`
      ```
      
      But this required a few changes on our side as well.
      
      Required for this:
      
      -- LOGGING
      
      Bumped glogi
      ```diff
         ;; new stuff
      -  [lambdaisland/glogi "1.0.106"]]
      -
      +  [com.lambdaisland/glogi "1.1.144"]]
      ```
      Annoying because it had a group name change due to Clojars policy. This
      had the same error as us below. That's why I'm hopeful that it will
      actually just work.
      
      There were some changes with the Google Closure library with things not
      included or referenceable. So I just removed these imports and the
      typehints that used them. We'll need to verify that this still works but
      both compiling for dev and release (with advanced compilation)
      work. Still possible there will be some runtime errors but i'm hopeful
      there wont be. We can grab a jar from CI and poke around
      
      ```shell
      ❯ npx shadow-cljs compile app
      shadow-cljs - config: /Users/dan/projects/work/metabase/shadow-cljs.edn
      shadow-cljs - connected to server
      [:app] Compiling ...
      [:app] Build completed. (100 files, 0 compiled, 0 warnings, 1.65s)
      
      metabase on  nm-all-options-formatting [$!+?] via :coffee: v17.30 on :cloud:
      
        metabase-query took 2s
      ❯ npx shadow-cljs release app
      shadow-cljs - config: /Users/dan/projects/work/metabase/shadow-cljs.edn
      shadow-cljs - connected to server
      [:app] Compiling ...
      [:app] Build completed. (100 files, 30 compiled, 0 warnings, 28.04s)
      ```
      
      ```diff
                   [lambdaisland.glogi.console :as glogi-console])
      -  (:require-macros metabase.shared.util.log)
      -  (:import goog.debug.Logger
      -           goog.debug.Logger.Level))
      +  (:require-macros metabase.shared.util.log))
      ```
      
      ```diff
      @@ -37,4 +35,4 @@
       (defn is-loggable?
         "Part of the impl for [[metabase.shared.util.log/js-logp]] and [[metabase.shared.util.log/js-logf]]."
         [logger-name level]
      -  (.isLoggable ^Logger (log/logger logger-name) ^Level (log/levels level)))
      +  (.isLoggable (log/logger logger-name) (log/levels level)))
      ```
      
      -- WARNINGS ABOUT shadowing `abs`
      
      -  [medley "1.3.0"]
      +  [medley "1.4.0"]
      
      Similar to what we bumped for the backend. ClojureScript 1.11.x has an
      `abs` function.
      
      * use update-keys and update-vals in cljs
      
      * bump clj-kondo in CI
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      dfd93579
  7. Aug 03, 2022
  8. Aug 02, 2022
  9. Jul 27, 2022
  10. Jul 20, 2022
    • Noah Moss's avatar
      Include markdown parameters in dashboard subscriptions (#24070) · b30e2e53
      Noah Moss authored
      * basic logic for including params in dashboard subscriptions
      
      * BE date formatting
      
      * redo approach to date formatting locale
      
      * refactor and use the same formatting code for parameters listed in subscription header
      
      * fix tests and lint
      
      * fix more tests
      
      * fix final (?) test and fix namespace lint error
      
      * a couple extra test cases
      
      * fix tests
      
      * new cypress test
      
      * address braden and ngoc's comments
      
      * fix tests
      
      * guard against nil text in substitute_tags
      Unverified
      b30e2e53
  11. Jul 13, 2022
  12. Jul 12, 2022
    • Noah Moss's avatar
      First pass at parameters in Markdown cards (#23641) · e136f430
      Noah Moss authored
      * first pass at parameters in text cards on FE
      
      * trying to get translations working
      
      * relative datetime formatting
      
      * copy changes and 'Text card' header
      
      * default text when no params
      
      * hide header for text cards with height of 1 with params when in param mapping mode
      
      * show UI text in mobile mode
      
      * minor fixes
      
      * enforce that a text card variable can only be mapped to one parameter
      
      * more value formatting
      
      * noop
      
      * fix backend tests
      
      * add back a couple pieces of frontend logic commented out
      
      * misc cleanup
      
      * attempt at adding a FE unit test
      
      * revert unit test, doesn't work
      
      * add a couple of basic cypress tests and fix a couple of bugs
      
      * basic unit tests for cljc
      
      * fix error
      
      * expanded unit tests
      
      * simplify ns
      
      * add cypress test for instance language translation
      
      * basic handling for a couple cases of :date/all-options
      
      * trs docstring clarification
      
      * whitespace tweaks
      
      * fix cypress test
      
      * minor refactor of tag-names
      
      * move cljc file from utils to new parameters dir
      
      * reorder functions
      
      * fix lint
      
      * add test assertion that locale is correctly reset back to english, and add a comment
      
      * fix bug where existing parameter mapping target was not being found
      
      * clojure logic tweaks
      
      * move text card header text to the Text component config
      
      * simplify header logic, and pull out isLoading into a function to reduce complexity
      
      * address alex's css feedback
      
      * fix trs comment
      Unverified
      e136f430
  13. Jun 29, 2022
  14. Jun 20, 2022
    • metamben's avatar
      Fix compilation of temporal arithmetic in between filters (#23292) · 001055df
      metamben authored
      Fix compilation of temporal arithmetic for BigQuery and Mongo 5+
      
      * Mongo 4 doesn't support $dateAdd so the generated filters result in an exception.
      * Support adding field to interval too (time intervals were not allowed in the first place of an addition)
      * Support temporal arithmetic with more than two operands for Mongo
      Unverified
      001055df
  15. Jun 10, 2022
  16. Jun 06, 2022
  17. May 12, 2022
  18. May 02, 2022
    • Braden Shepherdson's avatar
      One Clojure lint to rule them all (#22213) · 390d10e5
      Braden Shepherdson authored
      Background:
      
      We had two lint configs: lint-config.edn which was enfored by Github Actions, and
      .clj-kondo/config.edn, the default location used by editors.
      
      
      Problem:
      
      Patchy enforcement of the (larger) config in .clj-kondo/config.edn since not
      everyone uses an editor.
      
      Some new lint, like canonical namespace aliases (#21738, #19930) is not enforced
      automatically and has begun to bit-rot.
      
      Solution:
      
      Combine both configs, fix any outstanding lint, and update our tooling to use
      the unified config.
      
      Caveats:
      
      Anyone who has their local editor configured to use lint-config.edn will have
      their linting broken by this change.
      Unverified
      390d10e5
  19. Apr 28, 2022
  20. Apr 19, 2022
  21. Apr 18, 2022
    • Alexander Kiselev's avatar
      Support boolean literals in custom expression filters (#21342) · 179862b3
      Alexander Kiselev authored
      * adding boolean to custom expr
      
      * added booleans to schema validattion
      
      * changed some mbql to use apply instead of a vector
      
      * update sample-dataset.edn
      
      * undo honeysql mess
      
      * fix sample-dataset.edn
      
      * fix unit tests
      
      * remove console.log
      
      * added `canceled` column to orders table in the sample database
      
      * minor fixes
      
      * bool custom column fixes
      
      * comment out join schema
      
      * rolback custom column changes
      
      * add error on custom column boolean expressions
      
      * unit tests
      
      * fix clj unit tests
      
      * e2e fix
      
      * unit test  fixes
      
      * e2e fixes
      
      * added True/False to suggestions and fixed column formatting
      
      * fix e2e test
      
      * remove bool column from sample-dataset.edn because Oracle doesnt support bool column type (WTF?)
      
      * fix sample dataset tests
      
      * fix sample dataset tests
      
      * couple more fixes
      
      * fix sample-dataset.edn again
      
      * e2e fixes
      
      * fix some unit and e2e tests
      
      * unit test fix
      
      * e2e fixes
      
      * rollback sample database changes
      
      * more rollback
      
      * fix issues and add e2e tests
      
      * remove withAst from boolean pass
      
      * fixed issue with AST node
      Unverified
      179862b3
  22. Apr 13, 2022
  23. Apr 06, 2022
    • Ryan Laurie's avatar
      Add currency symbols to inputs (#21398) · 34378b8d
      Ryan Laurie authored
      * add correct currency symbol to filter inputs
      
      * show currency symbol in between inputs
      
      * lift currency prefix logic up component tree
      
      * remove unused function
      
      * fix existing tests
      
      * test currency prefixes
      
      * fix test nesting
      
      * get currency symbols for columns from our currency map
      
      * use visualization settings for currency inputs
      
      * use keyForColumn() to get visualization settings
      Unverified
      34378b8d
  24. Mar 23, 2022
  25. Mar 16, 2022
  26. Mar 10, 2022
  27. Feb 28, 2022
  28. Feb 23, 2022
  29. Feb 14, 2022
    • Cam Saul's avatar
      Add logic to truncate and uniquely-suffix column alias identifiers (#19659) · f94d5149
      Cam Saul authored
      * Add failing test for #15978
      
      * Improved test
      
      * Add new metabase.driver.query-processor.escape-join-aliases QP middleware
      
      * Test fix :wrench:
      
      * Add reference to #20307
      
      * Add some extra dox
      
      * Test fixes for BigQuery drivers
      
      * revert unneeded change
      
      * Fix :bigquery and :bigquery-cloud-sdk mixup
      
      * Test fixes :wrench:
      
      * Test fix :wrench:
      
      * Remove comment I meant to remove
      Unverified
      f94d5149
  30. Feb 10, 2022
    • Michiel Borkent's avatar
      Linting improvements (#20424) · 8f119d64
      Michiel Borkent authored
      * honeysql var improvements
      
      * Define routes
      
      * Define routes
      
      * define-routes improvement
      
      * honeysql helpers
      
      * honesql
      
      * abs in clojure 1.11
      
      * fix logic unresolved vars
      
      * deprecated
      
      * deprecated var warnings
      
      * undo replace
      Unverified
      8f119d64
  31. Feb 08, 2022
    • Cam Saul's avatar
      Rework how the remappings middleware matches remapped to/from columns for... · e35ecaca
      Cam Saul authored
      Rework how the remappings middleware matches remapped to/from columns for explicit external (FK) remaps (#20009)
      
      * Fix #9236 [WIP]
      
      * Revert unneeded changes
      
      * Only merge namespaced :options into result info
      
      * Revert unneeded changes
      
      * Everything is working :scream_cat:
      
      * Revert unneeded change
      
      * Clean namespaces
      
      * Add `:test` profile to `namespace-checker` to suppress log messages.
      
      * PR feedback
      
      * Fix namespaces
      Unverified
      e35ecaca
  32. Feb 02, 2022
  33. Feb 01, 2022
    • dpsutton's avatar
      Unused bindings part1 (#19995) · dd300077
      dpsutton authored
      * Unused bindings cleanup
      
      `clj-kondo --lint src:shared/src > lint` and then just work my way
      through it. Note that there are warnings about deprecations that we will
      need to get rid of as well. Most likely by turning off that warning
      until we are ready to tackle the project.
      
      * More unused and a sort ns
      
      * Removing unused svg helpers that eastwood is complaining about
      
      * Restore accidentally deleted `begin!` impl for xlsx
      
      * clean ns
      
      * clean ns
      
      * Last few unused bindings
      
      * kondo checks for empty docstrings
      
      * Little more cleanup
      Unverified
      dd300077
    • Cam Saul's avatar
      MBQL :expressions should use strings for keys (#19960) · 5d5b33a1
      Cam Saul authored
      * MBQL :expressions should use strings for keys
      
      * Make some more tests ^:parallel
      
      * Update dox
      
      * Test fix
      
      * Sort namespaces
      Unverified
      5d5b33a1
  34. Jan 26, 2022
  35. Jan 25, 2022
  36. Jan 20, 2022
  37. Jan 19, 2022
Loading