Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jan 13, 2023
    • Braden Shepherdson's avatar
      [metabase-lib] Number and currency formatting polish (#27616) · e7e422cf
      Braden Shepherdson authored
      - Use currency-specific decimals count (eg. 0 for JPY, 8 for BTC)
      - Use plural currency names in Java, matching JS
          - previously: singular proper name "7.23 US Dollar"
          - now: plural prose "7.23 US dollars"
      - "Small numbers" hack to treat min/max fraction digits as significant
        digits now applies to percentages under 1%, as well as the original
        |n| < 1
      Unverified
      e7e422cf
    • Braden Shepherdson's avatar
      [metabase-lib] Port date and time parsing and formatting to CLJC (#27551) · 335d161f
      Braden Shepherdson authored
      This adds a cross-platform date/time formatting library in CLJC, with
      (nearly) identical output in both JVM and JS environments.
      
      The only known difference is week numbers.
      
      CLJS (through Moment.js) has ordinal numbers, and renders the week
      number as "34th". Neither the JVM nor Clojure has a handy library for
      this (I'm sure it's out there somewhere, but it seems like a silly
      dep to add) so it renders week numbers as simply "34".
      
      Both platforms have date formatters that use pattern strings (eg.
      `"YYYY-MM-dd"`) to turn date/time objects into strings. There's a strong
      resemblance in how these work and what letters stand for what parts of
      the date and time, but they are far from identical.
      
      Rather than try to hackily convert one set of strings to another with
      regexes or other manipulations, this PR defines a set of names for
      fragments of dates (eg. `:year`, `:day-of-week-full`, `:hour-24-dd`)
      and includes functions to transform a list of these keys into a
      platform-specific format function.
      
      This is portable and transparent, and can be written in Clojure or
      JS code:
      
      ```clj
      [:year "-" :month-dd "-" :day-of-month-dd]   ; 2022-04-08
      [:month-full " " :day-of-month-d ", " :year] ; April 8, 2022
      [:hour-12-dd ":" :minute-dd " " :am-pm]      ; 7:52 AM
      ```
      
      ```js
      [":year", "-", ":month-dd", "-", ":day-of-month-dd"]   ; 2022-04-08
      [":month-full", " ", ":day-of-month-d", ", ", ":year"] ; April 8, 2022
      [":hour-12-dd", ":", ":minute-dd", " ", ":am-pm"]      ; 7:52 AM
      ```
      
      Note that the original code allowed an unrecognized `:date-style` string
      to be used directly as the formatting string. With the move to
      formatting data structures that no longer works. Instead there is a
      fixed map of format strings to the above data structures, that contains
      all the currently used `:date-style` inputs.
      
      If some caller needs a new format someday, we can either: (a) add the
      style to the map; or (b) pass the data structure form directly to the
      `:date-format` option, which if provided is used as the format.
      
      It's tempting to go to all the call sites and replace these `:date-style`
      strings with the new format structures. However, the strings are still
      embedded in the `:visualization_settings` in user appDBs, so we still
      need to recognize them.
      
      Most of the existing functions in the TS library have the same API.
      
      The set of allowed `:date-style` and `:time-style` values is turned into
      a type using `keyof`, so that we get precise type-checking of these
      values rather than simply `string`.
      
      One function has been dropped from the API: `getDateFormatFromStyle`.
      There was no practical way to implement it using the new format data
      structures. The only caller was the date format column settings, and it
      has been rewritten to use the formatted string for its sample date as
      its key instead.
      Unverified
      335d161f
  2. Jan 12, 2023
    • dpsutton's avatar
      restore aliases before annotating (#27637) · 3ddce607
      dpsutton authored
      * restore aliases before annotating
      
      * cleanup
      
      * fix tests
      
      * Don't add escaped->original if aliases have not changed
      
      No need to walk and replace the aliases if they are identical. And in
      that case, no need to keep a mapping of identical to identical. Not
      super important but saves some time and complexity, and keeps other
      tests passing since the presence of [:info :alias/escaped->original] in
      the query caused them to trivially fail.
      
      * oracle has a smaller limit and _expected_ mangled
      
      previous testing behavior was "what happened" and not what should
      happen. we fixed the bug but the "expect garbage" behavior was still
      present
      
      * Relax :alias/escaped->original schema
      
      oracle tests use keywords for the alias
      
      ```clojure
      {:alias/escaped->original
       {:test-data-venues--via-a763718f "test_data_venues__via__venue_id",
        :test-data-users--via--user-id "test_data_users__via__user_id"}}}
      ```
      
      No idea why that is keyworded
      
      * relax `:alias/escaped->original` schema
      
      see previous commit
      Unverified
      3ddce607
  3. Jan 11, 2023
  4. Jan 09, 2023
  5. Dec 29, 2022
  6. Dec 21, 2022
    • Braden Shepherdson's avatar
      [metabase-lib] Port number formatting to CLJC; use it from JS (#27114) · 2537f3d0
      Braden Shepherdson authored
      This adds a cross-platform number formatting library in CLJC, which has
      (nearly) identical output in both JVM and JS environments.
      
      The only known differences are:
      - JVM Clojure has `BigDecimal` support, so isn't limited to a `double`'s
        range.
      - Exact spelling/capitalization of the full names of currencies differs.
          - JVM: "7.34 US Dollar"
          - JS: "7.34 US dollars"
      
      Some future work is required to fully land this. In particular, the
      `currency_in_header` logic should be moved to the table formatters, not
      implemented on the JS side of this change.
      Unverified
      2537f3d0
  7. Dec 12, 2022
    • Cal Herries's avatar
      Support "quarter" unit for datetimeDiff (#27015) · 438e0684
      Cal Herries authored
      * Add quarter for postgres
      
      * Add quarter to schema
      
      * Add quarter tests
      
      * Add quarter for mysql
      
      * Add quarter for bigquery
      
      * Add quarter for snowflake
      
      * Add quarter for redshift
      
      * Add quarter for vertica
      
      * Add quarter for sqlserver
      
      * Add quarter to docs
      
      * Fix snowflake implementation
      
      * Make time zone dataset smaller
      
      * Revert "Make time zone dataset smaller"
      
      This reverts commit 4c97048d6c01e0f83b259a00c39d34169036fe77.
      
      * Revert "Revert "Make time zone dataset smaller""
      
      This reverts commit d1b8fc49c8bf86fecd9897a7c4f496dbdb1b9b06.
      
      * Fix test for drivers not supporting set-timezone
      Unverified
      438e0684
  8. Dec 01, 2022
    • Cal Herries's avatar
      now function (#26548) · fe0b8e90
      Cal Herries authored
      
      * Implement now for sql drivers
      
      * Remove unused import
      
      * Add tests
      
      * Add more tests
      
      * Implement bigquery, mysql, postgres
      
      * Test now as argument
      
      * Fix FE type inferencer
      
      * Change feature flag to date-arithmetics
      
      * Implement h2 driver
      
      * Fix tests for sqlite
      
      * Add snowflake implementation
      
      * Remove type test
      
      * Fix test for sqlite
      
      * Update how we handle autocomplete and format for zero-arity functions in ExpressionEditor (#26563)
      
      * Update suggestionText function
      
      * Suggest with closing parens if zero-arity
      
      * Format zero-arity functions with ()
      
      * Refactor formatFunction
      
      * Remove unused imports
      
      * Add presto implementation
      
      * Add sqlserver implementation
      
      * Test in multiple timezones
      
      * Remove setting test driver
      
      * Add sparksql implementation
      
      * Fix count() fe unit test
      
      * Add fe MBQL unit test for now()
      
      * Fix sparksql implementation
      
      * Add vertica implementation
      
      * Add oracle implementation
      
      * Add vertica implementation
      
      * Remove accidental form
      
      * Fix vertica implementation for report timezones
      
      * Remove unused multimethod
      
      * Remove unused feature
      
      * Update sparksql
      
      * Fix fe unit tests
      
      * Fix fe unit tests
      
      * Update hive implementation
      
      * Revert "Fix fe unit tests"
      
      This reverts commit fde4dd0d.
      
      * Revert "Fix fe unit tests"
      
      This reverts commit 7b7429ea.
      
      * Revert "Fix count() fe unit test"
      
      This reverts commit c5c6f6f9.
      
      * Revert "Refactor formatFunction"
      
      This reverts commit ac50e73e.
      
      * Revert "Update how we handle autocomplete and format for zero-arity functions in ExpressionEditor (#26563)"
      
      This reverts commit cf39634e.
      
      * Update hive
      
      * snowflake: convert type to timestamptz
      
      * sqlserver: rename date-trunc to zeroed-date-part
      
      * Wrap with database type info
      
      * Change fe unit test back to now without parens
      
      * Change MBQL clauses config for now to return type "datetime"
      
      * Fix presto
      
      * Add some fe unit tests for parsing and resolving
      
      * Update helper-text-strings
      
      * Change from second to millisecond precision
      
      * Remove test for second precision
      
      * presto: Change from second to millisecond precision
      
      * vertica: Change from second to millisecond precision
      
      * vertica: Change from second to millisecond precision
      
      * Change feature flag from date-arithmetics to now
      
      * Change feature flag from date-arithmetics to now, mbql schema
      
      * Allow now to be used in filter clauses
      
      * Add test for filter
      
      * Implement driver/database-supports? for each driver that implements :now
      
      * Tidy tests
      
      * Add back default sql implementation
      
      * Add sqlite feature flag
      
      * Add mongo implementation
      
      * Fix mongo
      
      * Format rows
      
      * Change vertica to return timestamp with time zone
      
      * Fix presto tests
      
      * Remove unused require
      
      * Update h2 function to return timestamp with time zone
      
      * mongo: calculate now during query execution, not processing, for versions >=4.2 (#26822)
      
      * replace with $$NOW
      
      * Remove unused import
      
      * Add back previous now implementation for versions <4.2
      
      * Throw an error if version is <4.2
      
      * Add i18n
      
      * Ignore patch version
      
      * Clean up `SchedulePicker` component (#26839)
      
      * Move `SchedulePicker` to its own directory
      
      * Sort imports
      
      * Do basic clean up
      
      * Extract `DEFAULT_DAY` to a constant
      
      * Extract styled components
      
      * Convert `SchedulePicker` to TypeScript
      
      * Add `SchedulePicker` container
      
      * Export `SchedulePicker` options
      
      * Add basic `SchedulePicker` story
      
      * Fix `SchedulePicker` crashes Storybook
      
      * Tweak Storybook file
      
      * Build datetime filters as datetime before question is saved (#26679)
      
      * Revert "Update h2 function to return timestamp with time zone"
      
      This reverts commit f7cce3ea7ccbbfc886d0942d66b1f8f60feb6aba.
      
      Co-authored-by: default avatarGustavo Saiani <gus@metabase.com>
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Unverified
      fe0b8e90
  9. Nov 22, 2022
  10. Nov 16, 2022
    • dpsutton's avatar
      Initial support for datetimeDiff (#25722) · 254e73f8
      dpsutton authored
      
      * Initial support for pg for `date-diff`
      
      * Make the useful-dates closer to one day
      
      * Add simple FE stuff
      
      * shorter test bodies
      
      * Ensure we can use datediff functions in arithmetic expressions
      
      * Correctly disable datediff for redshift
      
      * simplify var names
      
      * Support week
      
      * cleanup test
      
      * :datediff -> :datetimediff
      
      * ngoc's suggestions
      
      * Better acceptance test for datetimediff
      
      * sort ns
      
      * embrace the different cases for results
      
      * bigquery day month year
      
      * Reverse args
      
      * Update test
      
      * Centralize tests
      
      * Change postgres day, month, year behaviour
      
      * Refactor keep identity
      
      * Tidy tests
      
      * Tidy
      
      * Fix bigquery week
      
      * Add week tests
      
      * Fix bigquery week
      
      * Change mysql day, month, year behaviour
      
      * Add test for hour, minute, second
      
      * Fix postgres hour minute second
      
      * Formatting
      
      * Fix bigquery hour, minute, second
      
      * Formatting
      
      * Fix postgres timestamptz
      
      * WIP
      
      * Allow literals in datediff clauses
      
      * Uncomment tests
      
      * Fix bigquery when reporting timezone is not UTC
      
      * Linting
      
      * Moving away from dataset based tests
      
      * Add timezone tests for week and tidy
      
      * Remove unused import
      
      * Consolidate tests
      
      * Remove with-time-column dataset
      
      * Remove more-useful-dates defdataset
      
      * Remove redshift driver WIP
      
      * Typo
      
      * Move DatetimeLiteral clause into DateTimeExpressionArg
      
      * Try changing test order
      
      * Remove mt/with-report-timezone-id nil
      
      * Add year report timezone tests
      
      * Rename
      
      * Rename
      
      * Remove unused tables from useful-dates
      
      * Remove useful-dates
      
      * Update helper-text-strings
      
      * Tidy
      
      * Swap order of mt/with-report-timezone-id
      
      * Change with-report-timezone-id; notify databases after running test
      
      * Use temp setting for report-timezone instead
      
      * Update helper-test-strings
      
      * Handle literals in `datetimediff-base-base`
      
      * Update src/metabase/driver/postgres.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Simplify postgres second
      
      * Tidy: prefer hx arithmetic functions
      
      * Drop coercion for string timestamp args for now
      
      * Extract helper
      
      * Revert "Change with-report-timezone-id; notify databases after running test"
      
      This reverts commit 7abb543bed13d9d13295d0e00ad1293a40e40d53.
      
      * Use ->timestamptz
      
      * Use hx/->timestamp
      
      * Rename dataset
      
      * Undo changes to datetime-arithmetics? as these will not match by default
      
      * Use proper format for offset datetime literals
      
      * Shorten datetime literals in tests
      
      * Removing notify-all-databases-updated from report-timezone setting
      
      * Fix datetime-arithmetics test
      
      * Revert "Fix datetime-arithmetics test"
      
      This reverts commit 9141582508170bdbe99c4aa74bc4444e41475be6.
      
      * Revert "Undo changes to datetime-arithmetics? as these will not match by default"
      
      This reverts commit 9cb05f5475b24a78cb89601c918f3440606cc525.
      
      * Add UTC timezone to tests
      
      * Coerce strings to datetimes for ISO formats
      
      * Revert "Removing notify-all-databases-updated from report-timezone setting"
      
      This reverts commit 37356435a2e3981deca9ae76118d857babb2aada.
      
      * Add comment to postgres driver implementation
      
      * Formatting
      
      * Disable datediff from redshift for the moment (for ever?)
      
      * Override redshift driver/database-supports?
      
      * Fix comments mixed up by refactoring
      
      * Fix comments mixed up by refactoring 2
      
      * Tidy comment
      
      * Rename datetimediff to datetime-diff/datetimeDiff
      
      * date-add -> datetime-add
      
      * Linting
      
      * add datetime-subtract to `datetime-arithmetics?`
      
      rework tests a bit as well.
      
      * Update docstring
      
      * Use ->temporal-type and trunc to handle report-timezone for bigquery
      
      * Log errors caught during sync steps (#26306)
      
      * log errors caught during sync steps
      
      * remove accidental extra parens
      
      * Errors combining datetime interval addition with datetime functions (#26279)
      
      * Add failing tests
      
      * Fix failing tests
      
      * Update shared/src/metabase/mbql/util.cljc
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      
      * datetime-add and datetime subtract should annotate type by col type
      
      * Fix infer-expression-type for datetime-add/subtract with second, minute, hour
      
      * Undo last commit; they actually always return :type/DateTime
      
      * Fix test based on last commit
      
      * Undo unrelated refactor
      
      * Only test drivers that support expressions
      
      * Only test drivers that support expressions, again
      
      * Update tests from legacy mbql
      
      * Change infered-col-type to be a function again, not macro
      
      * Fix test
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      
      * whitespace
      
      * Remove comments
      
      * Add explanation for datetime_diff
      
      * Refactor: replace cast and add `mt/with-driver :bigquery-cloud-sdk` where report-timezone is relevant
      
      * Add failing tests
      
      * Fix failing tests
      
      * Technically it should be bigquery-type
      
      * Update modules/drivers/bigquery-cloud-sdk/src/metabase/driver/bigquery_cloud_sdk.clj
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      * Move documentation to metabase.mbql.schema
      
      * Update DatetimeDiffUnits
      
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      
      * Add error type and optimize case expressions to driver implementations
      
      * refactor for brevity
      
      * Fix error with postgres
      
      * Fix error with postgres
      
      * Handle string literal parsing in wrap-value-literals
      
      * Remove ->timestamptz
      
      * Add comments + TODOs showing arithmetic expressions should return numeric values
      
      * Add explanation of arithmetic expression as docstring
      
      * Add test for normalize-mbql-clause-tokens
      
      * Remove unused import
      
      * Remove unused form
      
      * Switch tests to use attempted-murders dataset
      
      * Undo optimization that broke tests
      
      * Validate non-temporal types for bigquery
      
      * Add error handling for incorrect types
      
      * Fix mysql type checking
      
      * Fix mysql type checking
      
      * invalid-parameter -> invalid-query
      
      * Use date-trunc and extract
      
      * Remove unit error handling
      
      * DatetimeLiteral -> DateOrDatetimeLiteral
      
      * Remove unused binding
      
      * Fix mysql type checking
      
      Co-authored-by: default avatarCallum Herries <hi@callumherries.com>
      Co-authored-by: default avatarCal Herries <39073188+calherries@users.noreply.github.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Co-authored-by: default avatarNoah Moss <32746338+noahmoss@users.noreply.github.com>
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Unverified
      254e73f8
    • Cal Herries's avatar
      Separate MBQL schema for time vs date/datetime literals (#26502) · 532c1468
      Cal Herries authored
      * Create TemporalLiteral, DateOrDatetimeLiteral, TimeLiteral
      
      * Remove unused TemporalLiteralString schema
      
      * Add tests
      
      * Fix test for cljs
      
      * Only test clj
      Unverified
      532c1468
  11. Nov 10, 2022
    • Cal Herries's avatar
      Errors combining datetime interval addition with datetime functions (#26279) · 14ca69b2
      Cal Herries authored
      
      * Add failing tests
      
      * Fix failing tests
      
      * Update shared/src/metabase/mbql/util.cljc
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      
      * datetime-add and datetime subtract should annotate type by col type
      
      * Fix infer-expression-type for datetime-add/subtract with second, minute, hour
      
      * Undo last commit; they actually always return :type/DateTime
      
      * Fix test based on last commit
      
      * Undo unrelated refactor
      
      * Only test drivers that support expressions
      
      * Only test drivers that support expressions, again
      
      * Update tests from legacy mbql
      
      * Change infered-col-type to be a function again, not macro
      
      * Fix test
      
      Co-authored-by: default avatarNgoc Khuat <qn.khuat@gmail.com>
      Unverified
      14ca69b2
  12. Oct 28, 2022
  13. Oct 27, 2022
  14. Sep 29, 2022
  15. Sep 28, 2022
    • Ngoc Khuat's avatar
      Advanced datetime extraction (#25277) · 5a80e561
      Ngoc Khuat authored
      * Implement advanced date/time/zone manipulation, part 1
      
      Incorporate new functions into MBQL and add tests:
       - get-year
       - get-quarter
       - get-month
       - get-day
       - get-day-of-week
       - get-hour
       - get-minute
       - get-second
      
      * Fix BigQuery implementations to call extract
      
      Mark as not supported in legacy driver
      
      * Add date extraction fns for Postgres
      
      * Disable in MongoDB (for now at least)
      
      Disable in BigQuery (legacy driver)
      
      Add implementations for presto-jdbc
      
      * Misc cleanup from Jeff's PR
      
      * Update Jeff's implementation of bigquery-cloud-sqk
      
      * Reorganized tests
      
      * Mongo
      
      * Oracle
      
      * Sqlserver
      
      * Sqlite
      
      * Add casting supports for presto
      
      * Remove Jeff's implementation of presto-jdbc because  its parent is
      sql-jdbc
      
      * Update presto-jdbc tests to use the same catalog for all datasets
      
      * Add date extraction functions to the expression editor (#25382)
      
      * make sure the semantic type of aggregated columns are integer
      
      * no recursive call in annotate for date-extract func
      
      * get-unit -> temporal-extract(column, unit)
      
      * desguar nested datetime extraction too
      Unverified
      5a80e561
  16. Aug 26, 2022
  17. 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
  18. Aug 22, 2022
  19. 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
  20. Aug 09, 2022
  21. 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
  22. Aug 03, 2022
  23. Aug 02, 2022
  24. Jul 27, 2022
  25. 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
  26. Jul 13, 2022
  27. 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
  28. Jun 29, 2022
  29. 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
  30. Jun 10, 2022
  31. Jun 06, 2022
  32. May 12, 2022
  33. 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
  34. Apr 28, 2022
  35. Apr 19, 2022
Loading