Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 18, 2024
  2. Aug 29, 2024
  3. Jun 06, 2024
  4. Feb 05, 2024
  5. Jan 18, 2024
  6. Dec 11, 2023
  7. Dec 08, 2023
  8. Apr 26, 2022
  9. Apr 19, 2021
  10. Apr 15, 2021
  11. Mar 17, 2021
  12. Feb 25, 2021
    • Cam Saul's avatar
      MBQL Refactor: Combine various Field clauses into one new clause (#14897) · 6bdd5e09
      Cam Saul authored
      Background
      
      The original version of MBQL (known as the "Structured Query" language at the time, which was a little confusing) just referred to all fields by integer ID. e.g.
      
      {:filter ["STARTS_WITH" 1 "abc"]}
      That made clauses like this ambiguous:
      
      {:filter ["=" 1 2]} ; is 2 a Field, or the number 2?
      To clear up ambiguity and to let you filter Fields against Fields, we added the :field-id clause to make it explicit that you were referring to a Field, not an Integer:
      
      {:filter [:= [:field-id 1] [:field-id 2]]} ; Field 1 == Field 2
      We soon added a couple of new types of Field clauses, :fk-> and :datetime-field, both of which wrap the original :field-id:
      
      ;; refer to Field 2 from a different Table, use Field 1 from the current Table to perform the join
      [:fk-> [:field-id 1] [:field-id 2]]
      
      ;; bucket Field 3 by month
      [:datetime-field [:field 3] :month]
      So far things were still pretty reasonable, the worst you'd have to do is something like
      
      [:datetime-field [:fk-> [:field-id 1] [:field-id 2]] :month]
      Things started to get out-of-hand IMO when we continued to add more Field clause types that just wrapped everything else. We added :binning-strategy:
      
      [:binning-strategy <field> :num-buckets 10]
      then :field-literal, to refer to a Field from a nested native source query:
      
      [:field-literal "my_field" :type/Text]
      then we added :joined-field to specify the Table you're explicitly joining against that is the source of a Field:
      
      [:joined-field "my_join" [:field-id 4]]
      This ends up getting really hairy when you combine things. This is an actual real clause you can use right now:
      
      [:binning-strategy
       [:datetime-field
        [:joined-field "my_join"
         [:field-literal "my_field" :type/DateTimeWithLocalTZ]]
        :month]
       :num-bins 10]
      And even with all of those clauses, we still can't pass around arbitrary extra information in a way that would make it easy to implement performance optimizations. If we ever try to add another new clause, the whole house of cards is going to come crashing down.
      
      The proposal
      Combine all of the Field clauses into a single new :field clauses with the schema
      
      [:field id-or-name options-map]
      Here are some before & after examples:
      
      [:field-id 1] 
      => 
      [:field 1 nil]
      
      [:field-literal "my_field" :type/Text] 
      => 
      [:field "my_field" {:base-type :type/Text}]
      
      [:datetime-field [:field 1] :month] 
      => 
      [:field 1 {:temporal-unit :month}]
      
      [:binning-strategy [:field 1] :num-bins 10] 
      =>
      [:field 1 {:binning {:strategy :num-bins, :num-bins 10}}]
      
      [:joined-field "my_join" [:field 1]] 
      => 
      [:field 1 {:join-alias "my_join}]
      
      [:fk-> [:field 1] [:field 2]] 
      => 
      [:field 2 {:source-field 1}]
      
      [:binning-strategy
       [:datetime-field
        [:joined-field "my_join"
         [:field-literal "my_field" :type/DateTimeWithLocalTZ]]
        :month]
       :num-bins 10]
      =>
      [:field "my_field" {:base-type :type/DateTimeWithLocalTZ, :join-alias "my_join", :binning {:strategy :num-bins, :num-bins 10}}]
      6bdd5e09
  13. Dec 28, 2020
    • Maz Ameli's avatar
      Update translations for 0.38 (#14191) · e48dcc1b
      Maz Ameli authored
      
      * basic multi-level pivoting [ci skip]
      
      * better code to get rows
      
      * multiple value columns, other fixes
      
      * fix pivot table unit tests now that values are formatted
      
      * Pivot table column settings (#13760)
      
      * Pivot table virtualization (#13879)
      
      * add pivot table icon
      
      * Dashboard subscriptions work, squashed
      
      This test namespace differs in EE and OSS
      
      Without other changes from EE, this won't work
      
      so, for now, I've restored the pure OSS version of this test
      
      redo wording on existing subscription cards
      
      hacks? to address some timing issues where the render loop executes
      before properties are available (loaded from the server)
      
      links to configure pulse types
      
      Display a link to configure email or slack when they aren't already
      
      Fix the am/pm picker
      
      set up a new schedule tooltip
      
      The sidebar can appear and disappear from the Sharing popover
      
      run prettier on everything
      
      email recipients now does the "name [and n other]" thing
      
      Dashboard subscriptions work, squashed
      
      redo wording on existing subscription cards
      
      hacks? to address some timing issues where the render loop executes
      before properties are available (loaded from the server)
      
      styling for email not configured state
      
      add styling for slack unconfigured state
      
      disable cursor-pointer if email or slack isn't configured
      
      Implement cancel button for the sidebar (#13741)
      
      Dashboard subscription UX enhancements:
      
      * Implement cancel button for the sidebar
      
      * Don't return duplicate dashboard subscriptions
      
      * Move sidebar cancellation into Redux
      
      * Add close icon
      
      * Fix popover behavior
      
      Dashboard Subscriptions: Fix build (#13859)
      
      * Frontend lint fixes
      
      * Fix failing email tests
      
      * Revert some of the snapshot changes
      
      * regenerate snapshots
      
      * done fixing FE tests?
      
      * Make `dashboard_card_id` optional in CardRef schema
      
      * Fix test setup in pulse model test
      
      * Fix collection API test
      
      * Order pulses by name
      
      * Cypress fixes/skips
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      
      Subscribe to dashboards send test email (#13886)
      
      * Frontend lint fixes
      
      * Fix failing email tests
      
      * Revert some of the snapshot changes
      
      * regenerate snapshots
      
      * done fixing FE tests?
      
      * Make `dashboard_card_id` optional in CardRef schema
      
      * Fix test setup in pulse model test
      
      * Fix collection API test
      
      * Order pulses by name
      
      * Cypress fixes/skips
      
      * uggh cypress
      
      * Add button to send test email for dashboard subscriptions
      
      * Disable test email with no recipients
      
      * Refactor SendTestEmail
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      
      Fix failing collection tests (#13891)
      
      * Move dashboard embedding button (#13928)
      
      * PoC of a basic waterfall renderer (#13661) (#13812)
      
      * PoC of a basic waterfall renderer (#13661)
      
      * Ensure that waterfall bars are not razor-thin
      
      * Assume the data is already in the form of increases & decreases
      
      * Waterfall chart: show the correct series values (positives and negatives) (#13661) (#13824)
      
      * Waterfall chart: show the correct series values (positives and negatives)
      
      Also, position the value labels properly (horizontally centered).
      
      * Waterfall: fix the vertical posiition of series values
      
      * Refactor the detection of bar or waterfall display
      
      * Waterfall: add the total bar (#13862)
      
      * Waterfall: add the total bar
      
      This is carried out by adding a new row in the chart series.
      
      * Fix string for translation
      
      * Fix reducer when calculating the total sum
      
      * Fix the position of the value label for the total bar
      
      * Use _.each and array spread operator
      
      * Prepare the total bar for waterfall without mutating the series data
      
      * Waterfall: Refactor stacked bar computation to fix for negative values (#13893)
      
      * Waterfall: Refactor stacked bar computation to fix for negative values
      
      This also simplifies the renderer, as most of the usual logic for
      stacked bar can be reused for waterfall.
      
      * Simplify computing waterfall values using Array#reduce
      
      * Add some unit tests for the waterfall renderer (#13909)
      
      * Waterfall: Ensure the correct tooltip and value label for the total (#13907)
      
      * Waterfall setting show/hide the total bar (#13919)
      
      * add waterfall icon
      
      * Waterfall settings: color settings for increases, decreases, total (#13931)
      
      * Waterfall settings: color widgets for increases, decreases, total
      
      * Compactify the color settings for waterfall
      
      * Waterfall colors: apply the increase & decrease colors
      
      * Move waterfall coloring to setChartColor()
      
      * Separate waterfall's total into its own (in the virtual stacked bars)
      
      This makes it easy to color the total bar, which has a value only for
      the last one in the series anyway
      
      * Waterfall total color should be conditional on the total toggle
      
      * Hide the regular series color widgets for waterfall charts. (#13951)
      
      Since the waterfall rendering only uses the increase, decrease, and
      total colors, there is no need to let the user pick the regular series
      colors.
      
      * add some strings that aren't in the UI yet (#13963)
      
      * update translations
      
      * remove all the extra newlines blerg
      
      * check out unmodified dashboard.clj model
      
      * reset two unrelated files
      
      Co-authored-by: default avatarPaul Rosenzweig <paul.a.rosenzweig@gmail.com>
      Co-authored-by: default avatarPaul Rosenzweig <paulrosenzweig@users.noreply.github.com>
      Co-authored-by: default avatarRobert Roland <rob@metabase.com>
      Co-authored-by: default avatarAriya Hidayat <ariya@metabase.com>
      Co-authored-by: default avatarAriya Hidayat <ariya.hidayat@gmail.com>
      Co-authored-by: default avatarReza Lotun <reza@lotun.ca>
      e48dcc1b
  14. Oct 27, 2020
  15. Jul 07, 2020
  16. Mar 27, 2020
  17. Nov 06, 2019
    • Maz Ameli's avatar
      Add Slovak and update translations for 0.33.5 (#10760) · 5bb175a0
      Maz Ameli authored
      * update translations for included languages
      
      * Add i18n CI step from master
      
      * fix newlines in it.po
      
      * remove \n from nl.po
      
      * remove \n from pl.po
      
      * add Slovak and update others
      
      * remove newlines
      
      * update locales.clj
      
      * reset config.yml
      5bb175a0
  18. Mar 22, 2019
  19. Dec 12, 2018
  20. Dec 05, 2018
  21. Nov 29, 2018
  22. Sep 06, 2018
  23. Mar 02, 2018
  24. Mar 01, 2018
  25. Oct 09, 2017
Loading