Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 09, 2024
    • Ryan Laurie's avatar
      Question Info + Settings Sidesheets (#47157) · b797ea4f
      Ryan Laurie authored
      * Question Settings Sidesheet (#47699)
      Unverified
      b797ea4f
    • Anton Kulyk's avatar
      Toggle series visibility from chart legend (pie charts) (#47581) · 41b4b687
      Anton Kulyk authored
      * Add series visibility props to `ChartWithLegend`
      
      * Mark pie slices as visible or hidden
      
      * Don't let to hide the last visible slice
      
      * Add space between legend dot and title
      
      * Fix legend dot outer circle is clipped by overflow
      
      * Use `ChartSettingSeriesOrder` for `pie.rows` setting
      
      * Actually hide slices and exclude from total calc
      
      * Don't show "0%" next to hidden slice legend items
      
      * Hide the "Other" slice
      
      * Make overflow slices popover interactive
      
      * Fix hover
      
      * Fix incorrect visibility state in legend popover
      
      * Add e2e test
      
      * Remove debug stuff
      
      * Fix hover and drill issues with slice index calc
      
      * Fix `pie.rows` ordering bug
      
      * Revert "Fix hover and drill issues with slice index calc"
      
      This reverts commit f104aaa5.
      
      * Fix hover and drill issues with slice index calc (2)
      
      `dataIndex` based approach
      
      * Use a special data key for the "Other" slice
      
      * Fixed viewport size in legend e2e test
      
      * Fix jumping legend width
      
      * Fix dot and label vertical alignment
      
      * Rework pie e2e test
      
      * Fix legend dot and label alignment
      Unverified
      41b4b687
    • Anton Kulyk's avatar
      Recalculate "graph.metrics" and "graph.dimensions" if empty (#47692) · 6cca5fb3
      Anton Kulyk authored
      * Add repro
      
      * Update `isValid` check for metrics and dimensions
      
      * Fix unit test
      Unverified
      6cca5fb3
    • Romeo Van Snick's avatar
      Browse metrics page (#47277) · d566fae9
      Romeo Van Snick authored
      
      * Add custom image for empty metrics
      
      * Add useFetchMetrics helper
      
      * Copy browse models page to metrics page
      
      * Add route for browse metrics page
      
      * Add useHasMetrics hook
      
      * Add link to browse metrics page to the sidebar
      
      * Simplify MetricsTable component
      
      * Render description markdown in table too
      
      * Add unit tests for browse metrics page
      
      * Remove custom padding
      
      * Fix line height of markdown cell
      
      * Add e2e tests for browse page
      
      * Fix metrics sorting
      
      * Fix types
      
      * Fix column widths and cell padding
      
      * Typo
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      
      * Remove name check
      
      * Simplify alphabet
      
      * Remove resetSnowplow
      
      * Use helper to get metric in table
      
      * Use MouseEvent from React directly
      
      * Use --mb-color-icon-primary
      
      * Test ellipsification of description
      
      * Simplify useHasMetrics
      
      * Move useHasMetrics MainNavBar
      
      * Merge sortMetrics and sortModels into sortCards
      
      * Fix metric default description
      
      * Extract SidebarSkeleton to a separate component
      
      * Test sorting via Collection too
      
      * Use ModelTableRow to fix cursor
      
      * Share more components between ModelsTable and MetricsTable
      
      * Use the same simplified structure in ModelsTable as for MetricsTable
      
      * Render block-level elements as inline so ellipsis detection works
      
      * Pick better testid for metric name
      
      * Remove delay
      
      * Avoid type specificty error in sortCards
      
      * Add test for not opening in new tab
      
      * Remove useFetchMetrics defaults
      
      * Fix unit test import
      
      * Test meta-click with cypress
      
      * Add comment on inline markdown elements
      
      * Use model-name test id
      
      * Use correct colors for icon
      
      * Remove delay from browse models page too
      
      * Make meta key in test platform-dependent
      
      * Fix hover color on metrics table
      
      * Add focus styling for celss in the models and metrics table
      
      * Use MarkdownPreview for table cells
      
      * Define --mb-color-icon-primary
      
      * Make the collection link take up the whole height of the cell
      
      * Remove tabIndex from table rows
      
      * Rename ModelsTable.module.css to BrowseTable.module.css
      
      * Rename CardsTable to BrowseTable
      
      * Remove single module.css class in favor of styled components
      
      * Allow customising allowed elements
      
      * Allow forcing all markdown on one line
      
      * Render bold and italics in markdown descriptions and move content onto one line
      
      * Fix legacy tooltip in test
      
      * Make sure getValueForSorting returns a string
      
      * Remove empty file
      
      * Remove icon for metrics in the table
      
      * Remove else statement.
      
      Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
      
      * Remove async findBy where possible
      
      * Add github issue link for TODO item
      
      * Disambiguate between getMetricDescription type
      
      * Be explicit with sortModelOrMetric
      
      ---------
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
      Unverified
      d566fae9
  2. Sep 06, 2024
  3. Sep 05, 2024
  4. Sep 04, 2024
  5. Sep 03, 2024
    • Alexander Polyankin's avatar
    • Braden Shepherdson's avatar
      [MBQL lib] Allow temporal bucketing of Date(Time) expressions (#47427) · 9053d6fe
      Braden Shepherdson authored
      Fixes #47341.
      
      ### Description
      
      The QP now supports temporal bucketing of custom expressions, but that has
      not been surfaced in the UI until now.
      
      ### How to verify
      
      Describe the steps to verify that the changes are working as expected.
      
      1. Use a database other than H2, since it doesn't support time zones.
      1. New question -> Anything with a DateTime column
      1. Create a custom expression like `convertTimezone([Date Column], "America/New_York", "UTC")`
      1. Break out by that expression
      
      The temporal bucketing should work in the UI and in the query results, save properly, etc.
      Unverified
      9053d6fe
    • Anton Kulyk's avatar
      Toggle series visibility from chart legend (cartesian charts) (#47089) · 57fe9712
      Anton Kulyk authored
      
      * Move current click handler to legend title
      
      * Add `onToggleSeriesVisibility` prop to `Legend`
      
      * Update `LegendItemDot` component
      
      * Update `LegendItemTitle`
      
      * Toggle series visibility
      
      * Fix hover effect
      
      * Don't let to hide the last visible series
      
      * Add `visible` property to `BaseSeriesModel`
      
      * Fix dangling split axis label when hiding a series
      
      * Update `graph.series_order` viz setting widget
      
      * Fix can't toggle series visibility from legend popover
      
      * Fix legend dot clipped by `overflow: hidden`
      
      * Fix eslint error
      
      * Fix legend popover scroll
      
      * Add unit tests
      
      * Add e2e tests
      
      * Fix show/hide series for scatter charts
      
      * Default `LegendItemDot` to visible state
      
      * Only apply legend dot hover effect if there's a click handler
      
      * Don't allow to remove the last series in `ChartSettingSeriesOrder`
      
      * Fix tooltip performance drop
      
      * Fix e2e tests around `series_order` viz setting widget
      
      * Use `text-medium` for outer circle background
      
      * Update dot style
      
      * tweak inner circle color
      
      * Update copy
      
      * Use div instead of button if can't toggle visibility
      
      * Fix legend layout issue
      
      * Don't show trendlines for hidden series
      
      * Fix missing prop value
      
      * Disable visibility toggle outside of dashboard/qb view
      
      * Add public dashboard test
      
      * Add tooltip footer e2e helpers
      
      * Fix chart tooltip shows hidden series data
      
      ---------
      
      Co-authored-by: default avatarKyle Doherty <5248953+kdoh@users.noreply.github.com>
      Unverified
      57fe9712
  6. Sep 02, 2024
  7. Aug 30, 2024
    • Ngoc Khuat's avatar
      [notification] webhook for alert (#45201) · d897f201
      Ngoc Khuat authored
      
      * [notification] New method: `channel/can-connect?` (#44955)
      
      * [notification] Channel APIs (#45207)
      
      * [notification] namespaced channel type (#45527)
      
      * [Notification] Render alert for http channel (#45545)
      
      * [notification] Add channel description (#45840)
      
      * [notification] update API to enable http channels for alert (#45839)
      
      * [Notification] Remove channel details for users without write perms (#46034)
      
      * [Notification] Serdes channel (#46031)
      
      * [Notification] Update http details schema (#45960)
      
      * [Notification] Deactivate channels will delete PulseChannel (#46115)
      
      * [Notification] audit log for channel create and update (#46113)
      
      * [Notification] Disallow undefined key for http channel details (#46712)
      
      * [Notification] Handle channel name conflicts (#46818)
      
      * Webhooks Admin Section (#46194)
      
      * [notification] Fix test pulse endpoint does not work properly for http channels (#46474) (#47050)
      
      * [Notification] Fix unable to update multiple channels per type (#47111)
      
      * [Notification] Record Task History when pulse sends channel message (#46218)
      
      * Enabling Webhook Alerts (#47022)
      
      * [Notification] fix cyclic deps (#47379)
      
      * [notification] channel serdes spec (#47386)
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      d897f201
  8. Aug 29, 2024
    • Nick Fitzpatrick's avatar
      Query validator FE (#47098) · b7349ec5
      Nick Fitzpatrick authored
      * Query Validator FE
      
      * collection path, unit tests
      
      * wrapping feature with token flag
      
      * updating util function, adding row type
      
      * updating session_test.clj
      
      * type adjustment
      
      * fixing other table sorting
      
      * Empty state, clean up utils
      
      * unit test adjustment
      
      * e2e adjustment
      Unverified
      b7349ec5
    • Dennis Schridde's avatar
      Hide attached DWH database details (#47247) · 592360c9
      Dennis Schridde authored
      == Goal ==
      
      Hide attached DWH database details from anyone incl. admins:
      * Do not show them in the UI
      * Do not permit to change them
      * Do not serialize them
      
      The aim is that customers cannot gain access to (parts of) credentials,
      and they cannot break a feature they are paying for by changing
      connection details.
      
      == Implementation ==
      
      The Metabase backend already contains provisions in the implementation
      of `metabase.models.interface/to-json` for `:model/Database` to hide the
      `details` of the database in HTTP responses, if the user lacks write
      permission on the database.  We utilize this by adding an
      `is_attached_dwh` column to the `database` table and rejecting
      `metabase.models.interface/can-write?` when this flag is enabled.  In
      the "admin" UI, we show a replacement text instead of the edit form when
      the flag is set.  (It might be correct to show this whenever `details`
      is absent.  See below for possible follow-up work.)
      
      However, several sections of the frontend code expected the `details`
      field to always be present.  In order to make `details` optional, as the
      backend seems to handle it, we fix the respective code to treat this
      case in the way that appears appropriate in the context.
      
      Database details are already generally excluded from H2 dump snapshots
      (see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing
      changes there.
      
      == How to test ==
      
      === New behaviour ===
      
      Setting the `is_attached_dwh` field hides the database details:
      
      1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
         - In addition to the fields you would normally set, also set
           `is_attached_dwh: true`.
         - This also works when adding this flag to a database that previously
           did not have this flag set.
      2. Start your Metabase instance.
      3. Verify the database shows up in the "admin" section
         (`/admin/databases`).
      4. Verify that clicking the database to see its details only reveals
         "This database cannot be modified."
      5. Verify that responses from the backend do not include a `details`
         field for this database.
      
      === Original behaviour ===
      
      Behaviour without setting the `is_attached_dwh` field is unchanged:
      
      1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
         - Only set the fields you would normally set.  Do not set
           `is_attached_dwh` (or set it to `false`).
      2. Start your Metabase instance.
      3. Verify the database shows up in the "admin" section
         (`/admin/databases`).
      4. Verify that clicking the database to see its details only reveal the
         regular edit form, showing connection fields like `host`, `user`,
         etc. with the values you configured.
      
      == How this will be rolled out ==
      
      1. Upgrade existing Metabase Cloud instances with data warehouse to a
         Metabase version that supports `is_attached_dwh`.
      2. Set `is_attached_dwh` in the database section of the config file for
         Metabase Cloud instances with a data warehouse.
      
      == Possible follow-up work ==
      
      In https://github.com/metabase/metabase/issues/25715, absent
      `database.details` was identified as a bug.  Since then, `details` was
      made `NOT NULL` in the application database, so this bug can no longer
      occur.  However, today backend responses can be missing the `details`
      field, if the current user lacks write permission to the database
      setting (see above).  Fully re-evaluating the fix to #25715 in this
      context is outside the scope of this PR.
      
      Closes: https://github.com/metabase/harbormaster/issues/5051
      Unverified
      592360c9
    • Ryan Laurie's avatar
      Flake Jail Update (#47407) · 268268b0
      Ryan Laurie authored
      Unverified
      268268b0
    • Emmad Usmani's avatar
      allow re-ordering and re-naming pie chart slices (#46607) · 0139fd78
      Emmad Usmani authored
      * allow re-ordering and re-naming pie chart slices
      
      * aggregate rows with same dimension value
      
      * show warning when dimension has unaggregated values
      
      * change colors from sidebar
      
      * implement renaming
      
      * styles for slice name widget
      
      * handle numeric slice keys for binned values relative dates etc
      
      * implement slice disabling
      
      * remove old colors setting
      
      * implement merging new and removing existing rows from query results
      
      * fix formatting bugs
      
      * port settings to static viz
      
      * fix bug with unaggregated data
      
      * address todos
      
      * add loki test
      
      * fix measure column settings widget erroring
      
      * fix settings sidebar crashing
      
      * add e2e tests
      
      * update snapshots
      
      * fix pie_chart.cy.spec.js CI-only flakes
      
      * fix #21504 repro failure
      
      * fix click action value
      
      * use nestedSettings instead of seriesSettings
      
      * fix settings sidebar crashing
      
      * fix row with 0 key not being draggable
      
      * fix flaky test
      
      * filter other slices from sidebar
      Unverified
      0139fd78
    • Thomas Schmidt's avatar
    • Nicolò Pretto's avatar
      locale query string support on public links and static embeds (#47186) · 76b0a3f5
      Nicolò Pretto authored
      
      * keep locale in url query params
      
      * e2e tests
      
      * ugly fix for the missing baseUrl error
      
      * applies suggestion from Kelvin to make code more demure
      
      * Update e2e/test/scenarios/sharing/public-question.cy.spec.js
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      
      * remove it.skip added by mistake
      
      * sort imports
      
      * handle native question/ SyncedParametersList too
      
      * shorter and more accurate comment :sweat_smile:
      
      
      
      * Update e2e/support/helpers/e2e-embedding-helpers.js
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      ---------
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Unverified
      76b0a3f5
  9. Aug 28, 2024
  10. Aug 27, 2024
  11. Aug 26, 2024
  12. Aug 23, 2024
  13. Aug 22, 2024
    • Romeo Van Snick's avatar
      Simplify finding metrics in Summarize (#46887) · 8dd2eeef
      Romeo Van Snick authored
      * Use global search for aggregation picker
      
      * Add names to aggregation picker items so they can be searched
      
      * Render info icon metric descriptions
      
      * Add unit tests for global aggregation picker search
      
      * Add test for searching metrics
      
      * Add a test for metrics descriptions
      
      * Sort metrics
      
      * Fix e2e test
      
      * Use Flex from metabase/ui
      
      * Handle markdown in metric description
      
      * Add test for sorted metrics
      
      * Update Markdown styling in metric description
      
      * Fix clojure formatting
      
      * Test for markdown in the Metric description
      
      * Fix lint
      
      * Fix test for markdown
      
      * Use simpler equality test
      
      * Fix overflow in test
      Unverified
      8dd2eeef
    • Mahatthana (Kelvin) Nomsawadi's avatar
  14. Aug 21, 2024
    • Nemanja Glumac's avatar
    • Ryan Laurie's avatar
      Create Question and Dashboard Sharing Menu (#46593) · 3964d71e
      Ryan Laurie authored
      * QuestionAlertWidget to FC + TS
      
      * update e2e tests
      
      * use regular alert for unsubscribes
      
      * Create Question and Dashboard Sharing Menu
      
      * Handle some edge cases
      
      * top notch unit tests
      
      * more testing and tweaking
      
      * fix imports
      
      * more tests
      
      * add alerts to question sharing menu
      
      * add tests for alerts
      
      * update e2e tests
      
      * use Oisin's toolbarbutton
      
      * fix rebase
      
      * prompt to save before sharing questions
      
      * show prompt to set up notification channels
      
      * fix import
      
      * update tests and hide on notebook screen
      
      * fixes
      
      * clean up pulse types
      
      * update e2e tests
      
      * fix a bunch more tests
      
      * more e2e test fixes
      
      * maybe green now? :fingers_crossed:
      
      * last one :pleading_face:
      
      * design updates
      
      * make channel setup modal nicer
      
      * simpler component props
      
      * lint fix
      
      * lint fixes
      Unverified
      3964d71e
Loading