Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 07, 2024
  2. Feb 06, 2024
    • metamben's avatar
      Implement filtering cards by segment or metric ID (#38337) · 6cf9e243
      metamben authored
      * Implement filtering cards by segment or metric ID
      
      Fixes #37688.
      Unverified
      6cf9e243
    • Uladzimir Havenchyk's avatar
    • Jeff Bruemmer's avatar
      update release list header (#38049) · a922ecc3
      Jeff Bruemmer authored
      Unverified
      a922ecc3
    • Cam Saul's avatar
      Implement equality for MLv2 MetadataProviders (#38413) · 256e6083
      Cam Saul authored
      * MLv2 MetadataProviders should know if they are equal
      
      * PR feedback
      Unverified
      256e6083
    • Jeff Bruemmer's avatar
      update releases (#38480) · 5db7e28a
      Jeff Bruemmer authored
      Unverified
      5db7e28a
    • Jeff Bruemmer's avatar
      update list of releases (#38376) · b93e9188
      Jeff Bruemmer authored
      Unverified
      b93e9188
    • Jeff Bruemmer's avatar
      Unverified
      d6388313
    • Nemanja Glumac's avatar
      [E2E] Overload the existing E2E `visitDashboard` helper to make it work with the alias (#38309) · 4e364495
      Nemanja Glumac authored
      * Add `visitDashboardAlias` E2E helper
      
      * Overload `visitDashboard` helper
      
      It should work with either dashboard id, or with a dashboard id alias.
      
      * PoC: Use overloaded `visitDashboard` helper
      
      * Update even more tests with the overloaded `visitDashboard` helper
      
      * Use `cy.visit` for tests with `cy.clock` instead of a custom helper
      
      * Rename non-exported functions
      Unverified
      4e364495
    • Alexander Solovyov's avatar
    • Mahatthana (Kelvin) Nomsawadi's avatar
      Keeps preview across different tabs (#38271) · 2664f101
      Mahatthana (Kelvin) Nomsawadi authored
      * Keep preview when toggling between code/preview in each tab
      
      * Persist preview across tabs
      
      * [WIP] don't reload embed preview when changing appearance
      
      TODO:
      - Fix font loading
      
      * Allow changing Static/public embedding font on the fly
      
      * Use 2-way dashboard state/URL hash syncing to avoid failing tests
      
      * Fix E2E tests after dashboard preview doesn't reload on every change
      
      * Use an existing util
      
      * Fix test name
      
      * Add tests to ensure preview doesn't rerender unnecessarily
      
      * Fix dashboard embed preview reload when it shows parameters
      
      * Review: Comment code for clarity
      
      * Fix tests after fixing the preview In Cypress
      Unverified
      2664f101
    • Cal Herries's avatar
      Unverified
      a9012596
    • Uladzimir Havenchyk's avatar
    • Nemanja Glumac's avatar
    • lbrdnk's avatar
      Mongo java driver upgrade (#38017) · 113c0558
      lbrdnk authored
      
      * tmp: patched monger for 4.11.1 mongo java driver
      
      * tmp: Update monger utils
      
      Aggregation probably wont work now, but we are not using those from monger anyway. With this change in place I'm able to load needed namespaces and create test-data dataset successfully.
      
      Commit contains lot of condo errors that should be resolved while porting.
      
      * WIP: Monger removed in favor of java driver wrapper
      
      * Update java driver wrapper
      
      * Update srv test
      
      * Update comments
      
      * Use non keywordized run-command for `dbms-version`
      
      * Fix according to e2e tests
      
      * Cleanup
      
      * Separate `java-driver-wrapper` into multiple namespaces
      
      * Fix semantic type inference for serialized json
      
      * Fix options for run-command
      
      * Cleanup json namespace
      
      * Cleanup conversion namespace
      
      * Cleanup operators
      
      * Update kondo in operators ns
      
      * Cleanup connection namespace
      
      * Cleanup mongo namespace
      
      * Cleanup util namespace
      
      * Add todo
      
      * Move session related code to util
      
      * Cleanup database namespace
      
      * Update docstring for conn string generation
      
      * Update docstrings
      
      * Update tests
      
      * Update linter for with macros
      
      * Update modules/drivers/mongo/src/metabase/driver/mongo/connection.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Update modules/drivers/mongo/src/metabase/driver/mongo/connection.clj
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Use transient in from-document for building a map
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * Update can-connect to use let form
      
      - Avoid nested `with-mongo-database` call.
      - Avoid creating a set used for searching for database name.
      
      * Remove redundant set use from describe-database
      
      * Change from-document keywordize default to false
      
      * Remove log message translation
      
      * Update maybe-add-ssl-context-to-builder! to always return builder
      
      * Indent from-document
      
      * Remove redundant ConvertToDocument extensions
      
      * Use oredered-map in do-find's sort
      
      * Use ex-info in details-normalized
      
      * Add imports and update comment in execute ns
      
      * Update fixme comment
      
      * Pass opts instead of a selection to from-document in do-find
      
      * Avoid unnecessary double dot call
      
      * Update connection test ns according to review remarks
      
      * Make tests parallel
      
      * Docstring update
      
      * Update docstring
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      113c0558
    • Kamil Mielnik's avatar
      [MLv2] [FE] Migrate `setDefaultDisplay` to MLv2 (#38221) · 2a70cd5d
      Kamil Mielnik authored
      
      * Add new Question.prototype.setDefaultDisplay boilerplate
      - rename old one to _setDefaultDisplay
      
      * Handle native queries
      
      * Handle table & scalar displays
      
      * Add aggregationColumn wrapper
      
      * Add breakoutColumn wrapper
      
      * Add semanticType to ColumnDisplayInfo
      
      * Add skeleton for the rest of setDefaultDisplay
      
      * Add effectiveType to ColumnDisplayInfo
      
      * Extract getDefaultDisplay out of Question
      
      * Add test suite for getDefaultDisplay
      
      * Add a test case for simple queries
      
      * Add a test case for 1 aggregation and no breakouts
      
      * Add a test case for 1 aggregation, 1 breakout and state column
      
      * Format code
      
      * Update test query
      
      * Add a test case for 1 aggregation, 1 breakout and country column
      
      * Update test names
      
      * Simplify setup
      
      * Add date-related tests
      
      * Extract isState, isCountry, deal with breakout info vs column info
      
      * Handle dates
      
      * Move helpers down
      
      * Add tests for binning
      
      * Add explanatory variable
      
      * Handle 1 aggregation and 2 breakouts, at least 1 of which is date
      
      * Handle 1 aggregation and 2 breakouts by coordinates
      
      * Add a test case for default return
      
      * Use parameterless aggregation
      
      * Handle categories
      
      * Optimize: do not call Lib.displayInfo for all breakouts
      
      * Optimize: extract getBreakoutInfos and call it only when necessary
      
      * Do not group tests
      
      * Remove redundant createQueryWithClauses calls
      
      * Rename getBreakoutInfos to getBreakoutColumnInfos
      
      * Fix Question.prototype.updateSettings typing
      
      * Simplify test setup
      
      * Simplify code
      
      * Use accounts table
      
      * Remove Question.prototype._setDefaultDisplay
      
      * Rename getDefaultDisplay to defaultDisplay and expose it in metabase-lib/v2
      
      * Update test names
      
      * Consolidate conditions
      
      * Fully migrate Category and Date checks
      
      * Fix typo
      
      * Split unrelated conditions to make it look like in the original function
      
      * Reorder arguments to match the convention
      
      * Rename getBreakoutColumnInfos to getBreakoutsWithColumnInfo
      
      * Prevent categorizing extraction of/truncation to year as temporal-extraction
      
      Fixes #37172.
      
      * Move display.ts to viz/display.ts
      
      * Use existing Lib.is* functions
      
      * Make a change to trigger CI
      
      * Revert "Make a change to trigger CI"
      
      This reverts commit 328becd8e659073aa2f0daffd6011fa785bfa99e.
      
      * Do the same for any display-info calculation
      
      ---------
      
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      Unverified
      2a70cd5d
  3. Feb 05, 2024
  4. Feb 02, 2024
    • Mark Bastian's avatar
      Fixing static-viz exports of saved x-ray dashboards (#38379) · ee1581fb
      Mark Bastian authored
      * Fixing static-viz exports of saved x-ray dashboards
      
      When dashboards were generated with x-rays, the `:visualization_settings` were not properly filled in. In particular, the `:graph.dimensions` and `:graph.metrics` were being populated from either the raw template values or not at all. The following namespace demonstrates this:
      
      ```clojure
      (ns tickets.38350-broken-xray-export
        (:require
          [dev.render-png :as render-png]
          [metabase.models :refer [Card]]
          [metabase.test :as mt]))
      
      (mt/dataset test-data
        (mt/with-temp [Card {bad-card-id :id}
                       {:display :row
                        :dataset_query {:database (mt/id)
                                        :type     :query
                                        :query    {:source-table (mt/id :orders)
                                                   :aggregation  [[:count]]
                                                   :breakout     [[:field
                                                                   (mt/id :products :category)
                                                                   {:source-field (mt/id :orders :product_id)}]]}}
                        :visualization_settings {:graph.series_labels [nil]
                                                 :graph.dimensions [{:ProductCategoryMedium {}}]
                                                 :graph.colors ["#EF8C8C"]
                                                 :graph.metrics [nil]}}
                       Card {good-card-id :id}
                       {:display :row
                        :dataset_query {:database (mt/id)
                                        :type     :query
                                        :query    {:source-table (mt/id :orders)
                                                   :aggregation  [[:count]]
                                                   :breakout     [[:field
                                                                   (mt/id :products :category)
                                                                   {:base-type :type/Text
                                                                    :source-field (mt/id :orders :product_id)}]]}}
                        :visualization_settings {:graph.dimensions ["CATEGORY"]
                                                 :graph.metrics ["count"]}}]
          (render-png/render-card-to-png bad-card-id)
          (render-png/render-card-to-png good-card-id)))
      ```
      
      The FE seemed to have some level of error checking and was robust enough to recover from these bad `:visualization_settings`.
      
      The solution is to correctly populate these values. This required updating the `:dimension-name->field` value in each card to include mappings derived from both metrics and dimensions and then using the right logic in the `visualization-settings` function.
      
      * Removed unneeded `->legacy-MBQL` on values in `:mbql/query` dispatch
      Unverified
      ee1581fb
Loading