39 Commits

Author SHA1 Message Date
Nick Fitzpatrick
cd9d166077 Fix trend viz in FE PDFs (#77612) 2026-07-17 11:08:38 -03:00
Romeo Van Snick
cf56c33cdd Delete react-router-redux and redux-auth-wrapper (#77590)
* Delete react-router-redux and redux-auth-wrapper

* Dedupe redux to a single v5 copy

Removing the @types packages dropped a transitive redux@3 pin that kept a
typeless redux at the top level and masked a redux@4-vs-RTK-v5 type conflict.
Force a single redux@5 so types stay consistent.

* Migrate remaining react-router-redux references

Drop the now-dead eslint import bans for the deleted package, remove the
obsolete redux-action cast in auth logout, and reword stale comments. Keep the
metabase/router provenance docs that name the package as their reference point.
2026-07-14 09:53:16 +10:00
Nick Fitzpatrick
6bf214f2c2 update Echarts to 6.1.0 (#75139)
* echarts 6.1.0

* adjusting BE test
2026-07-06 23:44:56 +05:30
Nick Fitzpatrick
6d294e5f4d Further pdf export improvements (#76016)
* use cssText

* include font props on <text>, <tspan>, and <textPath> nodes

* re-apply SVG transform after cssText copy in html2canvas patch

Chrome's getComputedStyle().cssText is empty, so the cssText copy wiped the Leaflet grid SVG's transform and offset its serialized bounds, re-breaking the #68751 PDF-export grid fix. Re-apply transform/transform-origin/transform-box after the cssText copy; Firefox keeps the bulk-copy perf win. Re-enable the GridMapPdfExport loki test with its baseline reference.

* resolve vars in svg props

* fix hidden row chart axis labels

* gauge value positioning

* fix gauge chart labels

* re-skip grid map loki test
2026-06-18 23:54:41 +05:30
Jakub Chodorowicz
b94b50a122 Gdgt 2495 workaround unsafe eval near membrane requirement (#74717) 2026-05-27 15:00:50 +02:00
Oleh K
7a2e92e21d Refactor command palette to distinguish between live and debounced search queries (#73921)
* Surface command palette static actions without waiting for debounce (GDGT-2409)

* Add test that static actions surface before search debounce

* Update palette tests for new processResults signature and PaletteResultList prop

* Rename appliedRemoteSearchTerm to debouncedSearchTerm, refactor debounce test

Address PR review feedback:
- Rename `appliedRemoteSearchTerm` to `debouncedSearchTerm` for clarity
- Replace the 200ms timeout in the static-actions test with an assertion
  on `/api/search` call count, decoupling the test from the debounce
  duration

* Fix command palette getting stuck on whitespace-suffixed queries

kbar feeds the raw search query to Fuse.js, whose Bitap-based scoring
penalizes the per-character length of the query. A query with trailing
whitespace (e.g. "AD.        ") tanks the score for every action below
the 0.3 threshold, leaving the panel stuck on its loading skeleton.

Set the `keywords` field on every search-derived action to kbar's raw
`searchQuery` so Fuse can match it verbatim. Combined per-key scores in
Fuse are multiplicative — a single perfect-match key drives the total
score to ~EPSILON regardless of how poorly other keys match — so a
single keyword identical to the input is enough to surface the action.

* Fix matching on leading spaces
2026-05-13 13:08:31 +02:00
Oleh K
528a373fac Add aliases to common actions in command palette (#73843)
* Add aliases to common commands in command palette (GDGT-2394)

Wire keyword-based aliases for searchable basic actions so users can
discover commands via verb-swap synonyms (e.g. "create q" finds
"New question", "add dashboard" finds "New dashboard"). Also relax
kbar's Fuse threshold from 0.2 to 0.35 so small typos no longer drop
matches.

- mergeKeywords helper in useRegisterShortcut: when a registration site
  overrides `name`, the original shortcut def name is appended to
  `keywords` so the original wording still matches.
- Localized verb-swap keywords on the create-/navigate-/browse- entries
  in shortcuts/global.ts and inline for create-action.
- patches/kbar: bump Fuse `threshold` to 0.35.

* Make bare navigate-* actions visible in command palette

processResults groups results by `section` and only renders the known
sections (basic, search, recent, admin, docs); actions without a section
are silently dropped. Six navigate-* actions (home, trash, user-settings,
personal-collection, data-studio, admin-settings) registered without a
section, so even an exact "Go to home" search showed nothing.

Set `section: "basic"` and an icon at each registration site, matching
the pattern already used by browse-*, create-*, and navigate-embed-js.

* Fix tests
2026-05-08 11:04:40 +02:00
Nick Fitzpatrick
9b4ddd2460 Updating to Mantine 8.3.18 (#72710)
* Updating to Mantine 8.3.18

* adjusting e2e

* green ci?

* fix stray failing test
2026-04-20 22:30:29 +05:30
Fraser
4864f0ae24 Revert "Further pdf export improvements" (#71208)
Revert "Further pdf export improvements (#71031)"

This reverts commit 536d6bf22f.
2026-03-20 19:45:09 +13:00
Nick Fitzpatrick
536d6bf22f Further pdf export improvements (#71031)
* use cssText

* include font props on <text>, <tspan>, and <textPath> nodes
2026-03-20 05:59:35 +05:30
Nick Fitzpatrick
b773f68f23 update html2canvas-pro (#70728)
* update html2canvas

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2026-03-13 12:13:20 -03:00
Nick Fitzpatrick
ba8074bb87 New password generation for users (#70646)
* New password generation for users

* update to use window.crypto
2026-03-12 16:31:12 -03:00
Maksym Yakubych
38bf8580ea fix: grid Map Pins Offset in PDF Export (#68751) 2026-02-10 12:48:25 -05:00
Anderson
e2ec2f6aff Fix broken PDF export layout due to CSP violation for inline styles (#66337) 2025-11-27 11:14:20 -03:00
Uladzimir Havenchyk
046df0694e chore: upgrade mantine/core patch to match installed version (#65340)
* chore: update mantine patch package

* fixup

* fixup

* fixup
2025-11-11 20:48:37 +03:00
Aleksandr Lesnenko
71eb726eb5 upgrade to echarts v6 (#64139)
* upgrade to echarts v6

* Update Loki Snapshots

* Fix BE test

* update gridlines helper function

* adjust test

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-11-05 11:45:47 -04:00
Nemanja Glumac
3177f079e8 Upgrade Mantine to v8.3.5 (#65050)
This commit removes our custom Mantine hooks patch because it was resolved upstream.
See: https://github.com/mantinedev/mantine/pull/8189
2025-10-27 21:13:25 +01:00
Uladzimir Havenchyk
90b57af0ae drop patch from cypress-esbuild-preprocessor (#65010) 2025-10-26 00:08:49 +02:00
Uladzimir Havenchyk
7b7d02442a deps: don't bring node polyfills into browser (#64740)
* deps: don't bring node polyfills into browser

* patch package

* fix lint

* bring back Buffer

* another attempt

* Revert "patch package"

This reverts commit 0aee5326018c25f3281400a9254c37fe2b4e7199.

* update password-generator

* try different config

* add fallback

* one more attempt

* one more attempt

* add back buffer

* one more time

* update rspack

* update rspack config

* drop crypto polyfill and patch package instead

* address review

* update patch
2025-10-25 06:54:41 +00:00
Denis Berezin
7fb62b782b Document Layout - add charts side-to-side (#63101)
* Add working table with 2 columns

* Table layout and dnd polishing

* ResizeNode

* Refactor to use grid container

* Add Card node title ellipsification

* cleanup, add min height

* Fix FlexContainer to work with ResizeNode

* Fix empty ResizeNode after card dnd

* Document layout no dnd kit (#63363)

* using tiptap drag and drop

* Fix some issues with dnd

* Add support for resize node, fix styles

* Remove comments

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>

* Fixes after merge comments

* Fix issues with dnd logic

* Fix issue where rearranging columns within a flexContainer didn't respect which side of a cardEmbed we dropped; it always inserted dragged column to the left.

* Fix issue where moving a cardEmbed out of a flexContainer and placing it right after doesn't wrap the card in a resizer

* Fix issues with dropzones and card id

* Fix issue with column resize handlers

* Fix issues with cards previews on dnd

* Feat: UXW-717 Reconcile comments with document layout (#63593)

* UXW-717 Add comment option to cardEmbed menu
* UXW-717 Wires up comment option in cardEmbed menu
* UXW-717 Stubs out CommentsMenu reorganization so logic can be reused inside cardEmbeds (button and menu item)
* UXW-717 Design tweaks per design feedback (and fixes ts error)
* UXW-717 Updates hover state of cardEmbed ellipsis menu trigger per design feedback

* Fix issues with funnel chart and resizer

* Fix issues with column rearrange

* Fix adding third column position

* UXW-739 Adds ResizeNode wrapper to charts added by metabot

* UXW-749 [1/2] Fix: Cutting/copying a chart from a group then pasting it (cmd+v) results in a chart without a resizeNode

* UXW-749 [2/2] Fix: Copying and pasting from one chart to another doesn't preserve the structure correctly

* Refactor dnd logic - consolidate all use cases in HandleEditorDrop

* remove redundant message and add_message icons

* actually remove redundant message icons

* replace references to old icons with new icons

* Fix issue with dropping a card into existing flexContainer

* Fix issue with moving a card from one flexContainer into another

* UXW-748 - Fix broken document when typing with a card selected

* Handle dropping cards onto paragraphs (#63754)

* Handle dropping cards onto paragraphs

* PR Feedback

* cleanup flex containers

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>

* small feedbacks

* breaking up document drop handler

* UXW-689 - add basic e2e tests

* type fix

* loki diff

* Add more e2e tests

* Fix typecheck

* happy types

* passing document.cy.spec

* Fix e2e tests

* e2e test for card resizing

* flex container column resize tests

* Add node deletion e2e tests

* Fix review issues

* Try to fix typecheck

* Refactor useCommentsButtonProps to a react component

* final PR feedback

* fix removing a card via menu

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-09-25 21:08:49 +04:00
Sébastien
03822446fb closes EMB-734 iframe+matchMedia crashing in Safari (#62407) 2025-08-20 17:14:34 +02:00
Timofey Kachalov
c69ef65bff feat(sdk): Use Mantine styles with CSS layer for the SDK (#61475) 2025-08-01 17:12:25 +04:00
Nick Fitzpatrick
ecbb96c04d Mantine V8 integration branch (#58773)
* update deps

* initial date migration

* default portal reuse target node to false

* remove timezone from MonthYearPicker value

* date picker adjustment for timezone

* unit tests

* fix Quarter Picker Types

* re-apply patch, fix up unit tests

* last adjustments?
2025-06-30 08:29:01 -06:00
Nick Fitzpatrick
8ebc12b933 Register Dynamic Shortcuts (#56812)
* Register Dynamic Shortcuts

* regex keys

* things more-less working

* adding admin shortcuts, patching kbar to pass keyboard event

* fixing type issues

* only emit events on keyboard shortcut executions

* remove wait
2025-05-05 17:35:30 +05:30
Nick Fitzpatrick
9daf822736 add patch to kbar for tinykeys update (#57116) 2025-04-25 01:11:47 +05:30
Nicolò Pretto
77e231de6c fix(sdk): don't set the color scheme on the host app (#54918) 2025-03-14 16:02:02 +01:00
Nick Fitzpatrick
1e4a44f00a updating mantine patch (#54598) 2025-03-03 12:13:18 -04:00
Nicolò Pretto
e88873a099 chore: remove suppressNextjsWarning() call from mantine (#53690)
* chore: remove suppressNextjsWarning from mantine

* also change cjs in case some builds uses that
2025-02-14 09:47:33 +01:00
Ryan Laurie
621ea1feca Mantine v7 (#51144)
* Mantine v7-1 squash

update deps

update UI configs

easy fixes

happy little typescript

updates after rebase

test fixes

fix rebase issues

admin-2, collections, custom-columns, dashbaord and dashboard-cards suites

fix clause popovers

fixing rebase issue

more rebase sadness:

more e2e

autocomplete adjustment

fixing nested popovers

adjusting a couple more pickers

more e2e fixes

fix mantine provider, searchbox errors

unit test adjustments

theme colors, filter labels

Relative Date Picker

more unit test fixes

* e2e adjustments

* [MANTINE] ci: find css variables that are used but never defined (#52947)

* ci: find css variables that are used but never defined

* only search in frontend and enterprise/frontend

* whitelist mantine css variables

* temporarily allow some css variables

* read mantine variables directly from mantine css file

* UI Regressions

* lint and type fixes. green unit test

* Cherry pick updates to the never defined variables script (#53049)

* Update bin/find-never-defined-css-variables/find-never-defined-css-variables.ts

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* test: checks that it doesn't confuse definitions with usages

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* more adjustments for e2e tests

* adjustments

* embedding sdk green, maybe unit tests?

* loki regressions

* test(sdk): migrate theme provider test to e2e to work with mantine v7 (#53290)

* test: migrate theme provider test to e2e to work with mantine v7

* re-put there things i removed by mistake

* preview and type fixes

* I think I'm making this better?

* fixing colors, unit tests

* scoping css vars and static classes, other things

* class prefix, scoping input css

* small adjustments

* shamelessly poach Nicolo's commit

* small fixes, should make Kamil happy :)

* finally green!

* type check

* chartsettingsinput fixes

* silly number types

* Adjustments for loki tests

* type fix

* undo Question View Download changes

* adjusting smart scalar

* updating loki reference

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-02-12 14:56:43 -04:00
Uladzimir Havenchyk
85f0815d4d chore: cleanup storybook patches (#52805) 2025-01-29 13:22:43 +03:00
Uladzimir Havenchyk
df32bd3af1 chore: upgrade storybook to v8 (#51699)
* updated some flaky screenshots
* simplified ci job
* updated types
* registered visualizations and added a way to register multiple visualizations in storybook
* replaced @storybook/testing-library with @storybook/test
2025-01-23 20:15:11 +00:00
Sloan Sparger
1fdc213d08 [Redux] Make core app use custom redux context (#52040)
* hacks solution together to test if everything passes CI

* real implementation, removes hacked approach

* patch types

* add test coverage for patched package

* add one more unit test
2025-01-14 09:36:45 -06:00
Mahatthana (Kelvin) Nomsawadi
3d5233bc6a [Milestone 2] Re-design transparent theme for static embedding and public links (#46428)
* Update popover dark theme on part of ParameterFieldWidget (#45813)

* Add filter visual tests

* Simplify embed CSS colors

* [WIP] theme filter popover

* Move theme to global node, so it affects portal too

* Fix embed colors

* Theme part of ParameterFieldWidget

* Add story for parameter with dropdown

* Update loki snapshots

* Update more popover style

* Update loki snapshots

* Remove outdated snapshots

* Update loki snapshots with production build

* Fix loki not working with `userEvent`

* Theme mantine popover

* Improve dark theme text-brand visibility

* Update loki snapshots from master change

* Fix new colors not working in SDK

* Fix flaky Loki tests

* Filter popover dark theme part 2 (#46284)

* Theme Date all options

* wip add month and year filter

* Fix wrong CSS custom property declaration

* Test hover state

* Update Loki snapshots

* Theme date month and year

* Add quarter and year tests

* Theme date single and date range

* Style relative date

* Update frontend/src/metabase/admin/datamodel/components/filters/pickers/DatePicker/DatePickerHeader.styled.tsx

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>

* Complete theming filter popover night mode (#46365)

* Style unit of time and number widget

* Attempt to fix flaky Loki snapshots

* Address white background checkbox on dark theme

* Style search filter single value

* Fix mis color

* Update snapshots

* Remove duplication on play functions since they're long

* Milestone 2 polishing (#46382)

* Matches the footer padding with header padding

* Update snapshots

* Add E2E to prevent further problem

* Try to reduce flaky Loki tests

* Remove unused color shades (#46421)

* Update no results illustration to work better on dark theme

* Update loki snapshots

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-08-05 10:20:34 +00:00
Uladzimir Havenchyk
8d841b1b0d ci: patch esbuild preprocessor to show errors in watch mode (#46074) 2024-07-26 00:22:06 +03:00
Mahatthana (Kelvin) Nomsawadi
da0c9cb645 Patch storybook to fix failed loki tests with runtime error (#44875) 2024-06-28 09:21:38 +01:00
Aleksandr Lesnenko
3e554323a7 bump echarts (#44695) 2024-06-25 17:14:43 +00:00
Aleksandr Lesnenko
6e87cb9306 Fix invalid areas when line style is step (#44107)
* fix area step

* specs
2024-06-13 11:08:22 -03:00
Jesse Devaney
72443c62b1 Fix data labels too dense with large single series (#42985)
* remove unused variable

* conditionally render labels sparsely if large amount of data points

* update loki snapshots

* refactor data label formatter conditions

* setup intelligent label plotting

* handle the case when there are no labels

* add sparse data label rendering to bar charts

* do not compute if no labels need to be shown or hidden

* add sparse data labeling to waterfall charts

* adjustment for large series waterfall labels

* revert change

* refactor name

* add sparse labels to stacked bar and area

* improve scaleFactor

* fix type errors

* remove unused labelFormatter

* update snapshots

* patch ECharts

- labels with no text, i.e. "", were still being considered as plot-able labels which was causing labels with real text "asdfec.." to be hidden because of overlap.
- This patch makes it so that labels with no text, i.e. "", are not considered to be candidates for overlap checking.

* update loki snapshots

* only loop over dataset once for getWaterfallChartDataDensity

* improve performance of chart data density calculations

* update loki snapshots

* update E2E spec

* update E2E spec

* increase cartesian label density allotment

* update loki snapshots

* update loki snapshots

* comment out node_modules cache since it cannot be skipped by commit and is breaking CI

* fix type errors

* Reset node modules if patches are changed

* refactor type naming

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-01 06:05:22 +00:00
Aleksandr Lesnenko
246c8a8387 dc.js to echarts migration (#41395)
Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: Mark Bastian <markbastian@gmail.com>
Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-04-26 20:14:40 -03:00