master
45 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
24a52962de |
UXW-3922 Add syntax highlight for AI system prompts (#79675)
* UXW-3922 Add syntax highlight for AI system prompts * Review fixes * Fix CI * Update Loki Snapshots * Update Loki Snapshots * Fix e2e --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
cbc6c3a858 |
Restyle Sidesheet to Figma and add the offset variant (GDGT-2480) (#82747)
* Restyle Sidesheet to Figma and add the offset variant (GDGT-2480)
Brings the common Sidesheet in line with the Figma spec and adds the
inset ("offset") variant the design system defines.
- offset?: 16 applies a 16px top/right/bottom inset and a 16px radius;
typed as the literal 16 so unsupported values can't enter the API
- 464px (29rem) default width, applied only when `size` is omitted so
the named sizes stay exactly as they were
- surface-primary background, xs_outline elevation, 24/24/16 header,
h4 title, and a 32px close control with a 16px icon
- Storybook: added an Offset story, and reduced the MDX page to a
summary. Each story embedded there rendered a real fixed-position
Sidesheet, so the docs page stacked them all on top of each other
and none could be read; the stories remain in the sidebar.
Mantine Modal internals (focus trap, escape handling, overlay, portals,
nested subpages) are unchanged; this is a restyle plus one additive prop.
* Use the design-approved sm width for Sidesheets
* Make Sidesheet offset a boolean option
* Move static Sidesheet styling to Mantine props
* Add Loki references for Sidesheet layouts
* Update Loki Snapshots
* Wait for Sidesheet before capturing Loki references
* GDGT-2480: Address review comments
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
|
||
|
|
121fa7febe |
GDGT-3240: SegmentedControl (#82657)
* GDGT-2463 update SegmentedControl to new Figma designs * Update Loki Snapshots * Update Loki Snapshots * Update Loki Snapshots * exclude `c` prop from SegmentedControl * remove disabled attribute from segmented control item * Show SegmentedControl overview story in light and dark themes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Update Loki Snapshots --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> |
||
|
|
97283f9c02 |
GDGT-3231: 1. Combobox: add Select, MultiSelect and Combobox stories with Loki snapshots (#82756)
* test(ui): add Select, MultiSelect and Combobox Overview stories with Loki * test(ui): address review, drop Combobox story and searchable sections * Update Loki Snapshots --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
bc75a88888 |
GDGT-2458: Accordion (#82562)
* test(ui): add Accordion Storybook story and Loki filter * feat(ui): restyle Accordion from Figma * fix(Accordion): keep theme selectors one class deep so call-site overrides still win * refactor: drop Accordion call-site overrides now covered by the theme * test(ui): add Loki reference for Accordion Overview story * fix(Accordion): hide the default chevron from assistive tech * test: update DataComplexityCards snapshot for the Accordion separated default * fix(RemoteSyncDependencyModal): drop overrides the new Accordion theme makes redundant, keep control transparent * fix(RemoteSyncDependencyModal): let the Accordion theme space the rows * fix(Accordion): keep icon grey on disabled hover, honour the radius prop * test(ui): add disabled hover row to the Accordion Overview story * Update Loki Snapshots --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
fa20179ff6 | Restyle Button to the Figma spec and migrate call sites (#82236) | ||
|
|
236a1cc9bd | Gdgt 2461 tabs (#82174) | ||
|
|
ca17b89463 |
GDGT-2478 PasswordInput (#82117)
* test(ui): add PasswordInput Storybook story * test(ui): add PasswordInput to Loki as baseline for restyle * feat(ui): restyle PasswordInput from Figma and add input-background token * test: cover PasswordInput visibility toggle in unit and e2e tests * fix(PasswordInput): use highlight border color in focused error mode by overriding Input styles * Update Loki Snapshots * test(ui): add Loki reference for PasswordInput Overview story * fix(PasswordInput): address review feedback - keep border width constant and use an inset ring for focus/error to avoid layout shift - tie right padding to the toggle button size so text clears it in lg - restrict size prop to sm | md | lg - order color keys alphabetically - explicit visibility assertion in the e2e spec * Update Loki Snapshots --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
c0949b1d38 | Gdgt 2465 popover (#81561) | ||
|
|
c7a5060ca8 |
GDGT-2462: Update Switch component (#81709)
* GDGT-2462: Update Switch component * GDGT-2462: Add Switch Loki references * Update Loki Snapshots * Address PR findings --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
5885d30ad0 |
GDGT-2486 Add elevation, radius, and spacing scale variables (#80481)
* GDGT-2486 Add elevation, radius, and spacing scale variables
* GDGT-2486 Remap scale tokens in files merged from master
* Address review
Review fixes for the GDGT-2486 scale migration:
- Revert double-shifted tokens from the merge-remap pass: it re-applied
the old-to-new mapping to 22 files already remapped by the first pass,
shifting spacing values one extra step (e.g. xl 24px -> xxl 32px).
- Fix codemod escapes where old key names kept their name but changed px:
Modal default padding (lg->xl, 24px), MultiSelect radius (sm->xs, 6px),
MetricSearchInput radius-sm, ThemeEditor PreviewPanel radius-md,
ColumnInput theme.spacing.xs->xxs, ChartTypeSettings Space h props,
TableRowForCacheableItem icon placeholder w (md->lg, 16px),
ResizeHandle/ResizableBoxHandle grip h (xs->xxs, 4px).
- Pin Group/Stack default gap to "lg" (16px): Mantine's default is
"md", which is 12px in the new scale (was 16px in the old scale).
- Allowlist the runtime-defined --mantine-spacing-xxs/-xxl and
--mantine-radius-xxs CSS variables in find-never-defined-css-variables
(fixes fe-lint CI).
- Add theme.unit.spec.ts covering the spacing/radius/shadow scales,
dark-mode shadow set, whitelabel independence, and a guard asserting
every scale-based component default resolves to a defined key.
- Derive Card/Paper story argTypes options from the real scale.
- Augment MantineThemeSizesOverride so the custom scale tokens appear in
editor autocomplete for p/m/gap/radius/shadow props.
- Update the emotion-migrate and metabase-ui-component-from-figma skill
token tables to the new scale (spacing/radius values, shadow tokens,
snap tables).
* Update Loki Snapshots
* Address review: fix h/w style props missed by the scale codemod
The codemod did not remap height/width style props, so every bare h=/w=
scale-key value silently changed px with the new scale. Remap each to the
px-preserving key (xs 4px->xxs, md 16px->lg, lg 24px->xl, xl 32px->xxl):
- PaneHeader breadcrumb row h xl->xxl (32px, restores data studio
pane header height)
- BrowseDatabases logo boxes h/w xl->xxl (32px)
- DatabaseConnectionStringField rows h lg->xl (24px)
- DatabaseEngineList logo Center h/w lg->xl (24px)
- Metabot chat chevron flexes h/w md->lg (16px)
- MetricsFilterPill h lg->xl (24px)
- DatasetNotebook divider h xs->xxs (4px)
- DataReference NodeList icon w md->lg (16px)
- transforms-python ResizableBoxHandle grip h xs->xxs (4px)
Audited: no remaining bare h/w/maw/mah/miw/mih old-key props whose px
changed (verified line-identical against master for every occurrence).
* Address review: fix bdrs and responsive-object size tokens missed by the codemod
Two more escape classes from the scale codemod, found by a full sweep of
every touched-token form (string style props, responsive objects, CSS
vars, theme accessors) with each line compared against master:
- bdrs style prop (border-radius): remapped px-preservingly at 69 sites
in 58 files (xs 4px->xxs, sm 6px->xs, md 8px->sm). The codemod remapped
radius= but not its style-prop alias bdrs.
- Responsive object values (e.g. p={{ base: "md", sm: "xl" }}): remapped
the token VALUES at 9 sites in 6 files (base/sm/md breakpoint keys are
untouched; only their spacing values shifted: md 16->lg, xl 32->xxl,
xs 4->xxs).
Sweep result after fixes: zero remaining line-identical old-key token
references to spacing xs/md/lg/xl, radius xs/sm/md, or shadow xs/md in
any form. Intentional survivors unchanged: radius/shadow/bdrs "lg"
(disclosed broken-key-now-16px class), spacing/radius sm where the
px value did not change.
Verified: tsc, eslint (changed files), metabase/ui jest suite.
* Address review: fix remaining token escape forms (object props, braces props, style objects)
Final codemod escape classes from the exhaustive token sweep, all
remapped px-preservingly:
- Object-literal / default-parameter prop values (15 sites / 8 files):
ItemList picker-item default containerProps pb xs->xxs (4px, the
reported gap), FormFooter pt lg->xl, SlackSetup pt lg->xl,
EmbeddingSecretKeyWidget mb xs->xxs, CreateDashboardForm labelProps
mb xs->xxs x2, databases styles mb lg->xl, NotebookDataPicker
menuDropdownProps mt xl->xxl, Banner story py md->lg
- Braces-wrapped string props: CloudSMTPConnectionCard p lg->xl (24px)
and gap md->lg (16px), SettingsLdapForm mt xs->xxs,
DashboardLeaveConfirmationModal mb lg->xl
- style-object CSS properties: DatasetNotebook borderRadius xs->xxs
- Ternary token values inside responsive objects: SummarizeStep gap
md->lg (16px)
Sweep now returns zero real misses across every checked form: string
style props (incl. h/w/bdrs), braces props, responsive objects with
ternaries, object-literal/default-param props, style-object CSS props,
CSS var() references, theme.* accessors. Remaining grep hits are
untouched scales (lh, fz, size, breakpoints) or px-identical sm values.
* Address review: preserve Mantine spacing defaults exposed by Loki
* Update Loki Snapshots
* Address review: fix remaining scale regressions and visual guards
* Address review: make Loki update capture new references
* Update Loki Snapshots
* Address review: keep only targeted Loki references
* Address review: assign ticket component elevations
* Update Loki Snapshots
* Address review: tighten MonthPicker header spacing
* Address review: refine elevation visual stories
* Update Loki Snapshots
* Address review: keep renamed Menu Loki story selected
* Update Loki Snapshots
* Address review: preserve inherited Mantine defaults
* Address review: allow stock Mantine shadow tokens
* Address review: replace token audit test with ESLint rule
* Address review: drop unrelated whitespace-only dev/src changes
* Address review: use rem() in radius scale and rem docs
* Update Loki Snapshots
* GDGT-2486: Address PR comments
* GDGT-2486: Adjust negative tokens
* GDGT-2486: Address review findings
* Update Loki Snapshots
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
|
||
|
|
05300912fb |
Radio component redesign (#80372)
* Redesign Radio * Add Radio stories to loki filter * disallow radio labelPosition * use StoryBoard in radio stories * add new story's snapshots * Radio.Card: border, leftSection, migrate call sites - card border 0.5px border-neutral-strong, none when disabled - children disallowed, leftSection slot for icons - EditUserStrategyModal + DataSegregationStrategyPicker on label/description * update loki snapshots * Icon color prop instead of css module in DataSegregationStrategyPicker * remove extra div * make the indicator in the radio card optional * fixed radio size, no size prop * radio card body via mantine text/stack * forwardRef radio card * radio card border: highlight when selected * update loki snapshots * drop size="xs" from radio call sites * fix card growing on select, interactive card stories, optional checkbox card indicator * skip interactive card stories in loki, update card snapshots |
||
|
|
c433278e06 | Gdgt 2472 loader (#80586) | ||
|
|
11be7cb3e7 |
Restyle NavLink with primary and secondary variants (#80640)
* Add primary/secondary NavLink variants and sibling components (GDGT-2469)
Restyle the design-system NavLink from Figma:
- Add `primary` (brand-fill selected) and `secondary` (subtle gray selected)
variants, with Default/Hover/Pressed/Selected states.
- Add the `icon-{primary,secondary,disabled,brand}-inverse` color tokens.
- Add `NavLinkButton` and `NavLinkBadge` sibling components for the right
section; both invert automatically on a selected `primary` item (no prop),
the button also has its own hover/press and stops click propagation.
- Give NavLink a `leftIcon` prop so it renders and colors the leading icon
itself instead of styling the section slot.
- Add a two-variant state-matrix Storybook showcase (Loki-covered).
* Migrate NavLink call sites to primary/secondary variants (GDGT-2469)
- Admin nav: `admin-nav` -> `secondary`
- Entity picker: current level -> `primary`, other levels -> `secondary`;
search results -> `primary`
- Remove the now-unused `default`/`mb-light`/`admin-nav` variant CSS
* Revert NavLink `leftIcon` prop back to `leftSection` (GDGT-2469)
Drop the polymorphic NavLink wrapper and colour the leading icon via the
`.NavLinkSection[data-position="left"]` CSS overrides again.
* Update Loki Snapshots
* Cleanup
* Update Loki Snapshots
* Add Loki reference for the NavLink Overview story (GDGT-2469)
* Update Loki Snapshots
* Address NavLink review comments (GDGT-2469)
- Migrate the remaining `default` NavLink (embedding SimpleDataPicker) to
`primary`, restoring its selected styling
- Render NavLinkButton as a `<div role="button">` (valid inside a NavLink's
`<a>`) with keyboard activation, instead of a `<button>`
* Update Loki Snapshots
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
|
||
|
|
27bfc0d005 |
Checkbox component redesign (#80262)
* checkbox redesign * small fix * fix disabled checkbox visual size * disallow checkbox labelPosition * add new loki tests * update loki snapshots * fixup! update loki snapshots * fix e2e specs relying on checkbox Icon-check/Icon-dash classes * checkbox card border add border-highlight token, use it for selected card * disallow checkbox size single 16px size; xs/sm were both 16px and md was unused * disallow checkbox card children * drop redundant role from checkbox icon * checkbox card body via mantine text/stack * forwardRef checkbox card * drop border on disabled checkbox card * drop disabled checkbox border ring alpha border over alpha bg stacked into a visible ring * hide unchecked card indicator icon mantine hides indicator icon via color:transparent; .icon color override defeated it * update colors loki snapshot |
||
|
|
789d334847 |
Explorations (#73244)
* Fixed failing CI * Add query timestamp, refactor error marker * no-mbql-introspection pass * Order temporal-axis exploration variants by date, not aggregation When the row cap fires on a time series, aggregation-desc ordering keeps the highest-count buckets scattered across the full range: gaps in the x-axis, old spikes beating recent data. Temporal axes now order by the temporal breakout desc (aggregation desc as tiebreak) before the limit, so the most recent contiguous window survives. - time-facet: order by the temporal breakout (second breakout) desc - default: branch on dim type — temporal dims by recency, categorical dims keep aggregation desc - per-value-time-series: gains the same date-desc cap (had none, so a single fine-grained series could blow query-caching-max-kb) - all three also filter the NULL date bucket: it can't render on a time axis, and its position under ORDER BY DESC is warehouse-dependent (Postgres NULLs first, MySQL last), making cap survival non-deterministic otherwise - temporal-pattern-day/hour unchanged (bounded, no cap interaction) * Added debug info to interestingness calculations * even less mbql introspection * oops, delete .scratch * Sidebar UI fixes - error marker, loading shimmer * Interestingness >= 0.7 * Adjust prompts list animation * Fix e2e * Note that the LLM query planner is a POC, not used in production * Fix searching for explorations * Use llm-metabot-provider for everything * Log interestingless calculation as info for now * Log interestingless calculation back as debug * Fix FE lint * fix ai summary showing dirty while generating * Use llm-metabot-provider * collection breadcrumbs * add back null values for temporal variants * order by for temporal pattern variants * fix top-n-other * doh, fix temporal pattern queries * fix name in viz header, don't show be error in tooltip * sort numeric bins in heat map header, fix tests * UXW-4483 Add matching colors for category + breakout charts (#75912) * Fix CI * Fix units, fix loki * UXW-4522 Update last query run timestamp in background * Fix loki * Fix e2e * Improve Explorations viz types (#75958) * UXW-4483 Add matching colors for category + breakout charts * improve viz types first pass * add error boundary * add row chart support for dimension_value_colors * Fix typecheck * fix tests * better handling of segments with row fallback, fix null color bug --------- Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * UXW-4402: Make explorations respect sandboxing/impersonation/db routing (#75572) * Make explorations respect sandboxing/impersonation/db routing * some self-review fixes * more cleanup * test fixes * doh * Fixing CI failures * capitalize 'By' consistently * Fixed CI failure * add loki snapshots * Review fix * Fixes after merge * Rework Explorations UX (#76300) * comment on exploration viz first pass * wip * wip * wip * UX changes first pass finished * code cleanup, fix, add tests * address review comments * Code cleanup --------- Co-authored-by: Nathan Voxland <nathan@metabase.com> * Refine explorations with metabot (#75326) * teach metabot about new exploration ux * refine explorations * address self-cr * pass over FE * CR response * fix test * Add :model/Exploration to api + eid-translation model-imports These modules reference :model/Exploration after merging the latest explorations base; declare the imports to satisfy model boundaries. --------- Co-authored-by: Kevin Kelleher <kevin.kelleher@metabase.com> * Harden explorations runner: - planner crash recovery - Bound timeline scoring - add metrics * UX tweaks * Additional logging of errors on ai summary, plus increased thinking budget * Improved timeline interestingness calculation * Handle sonnet 5 etc better * Make explorations groups a real thing (#76643) * Rename ExplorationThreadGroup model to ExplorationBlock Explorations organize their queries in a hierarchy: an Exploration has Threads (one per run), a Thread has Blocks, and a Block is one metrics-by-dimensions grouping that renders as a single sidebar heading. That persisted grouping entity was named ExplorationThreadGroup, and the word "group" was overloaded across the backend and frontend. Rename the entity to Block — the name the frontend already uses — so the larger data-model changes that follow start from one clear name. No behavior change. Renames :model/ExplorationThreadGroup -> :model/ExplorationBlock and table exploration_thread_group -> exploration_block. - Append a renameTable changeset rather than editing the createTable in place: the original is already applied to running dev DBs, so an in-place edit would fail checksum validation and force a DB rebuild. - Rename the model namespace/file; update all call sites, the require alias (:as block), and insert-blocks!. - Update model registrations (resolution, serdes models, copy, entity-id test) and re-sort the entries. - Refresh the model's docstrings to describe a "block". The planner's :thread-groups ctx key and the read-side group-tree are left untouched here; they belong to later read-side work. * Persist exploration pages with stable ids reconciled across reruns Within a Block, an Exploration's queries are organized into Pages: a Page is the bundle of queries for one (metric, dimension, query_type). Until now a Page existed only as a derived, content-addressed key computed at read time, so anything that wanted to point at a Page had to reference a string that changed whenever the grouping definition changed. This makes a Page a real persisted row whose surrogate id is its identity, so comments (and stars, coming next) can anchor to a Page and survive both a rerun — where queries are deleted and regenerated — and a future re-grouping. Introduce ExplorationPage: the persisted (block, card, dimension, query_type) page within a block. - New exploration_page table + model, FK to exploration_block (cascade) and report_card. Registered in resolution, serdes (excluded), copy, and the entity-id test. - Add exploration_query.page_id (NOT NULL, FK, cascade): the reconciler stamps it on every query, so it's required from the start. group_id stays for now as the block pointer the read-side and deep-link URLs use; dropping it waits for the read-side rework. - Reconcile in insert-plan-rows!, the single insert point for both initial Start and rerun: find-or-create a page per distinct key (stamping page_id), then GC pages left with no queries. reset-thread- for-rerun! is unchanged — pages survive a query delete (cascade is page->query), so find-or-create recovers the same page ids on rerun. - No DB unique index on the key: dimension_id is text (not portably indexable on MySQL) and planning is single-threaded, so uniqueness is enforced by find-or-create and matching is done in Clojure. - Migration changesets appended (the table/group_id changesets are already applied to the running dev db). Tests cover page-id stamping, rerun id-stability, orphan GC, and perms. * Return nested blocks→pages from the read API; drop query.group_id An Exploration Thread's structure is Blocks, each containing its Pages, each Page bundling the ids of its queries. Until now the backend instead returned a hand-rolled flat list of typed nodes (sidebar/singleton/page) linked by parent_group_id and keyed by auto:<...> strings, which the frontend then re-nested. Now that Blocks and Pages are real rows, return the nested shape the tables already encode: GET /:id returns :blocks, each with its :pages, built from ExplorationBlock + ExplorationPage rows and queries grouped by page_id. - New metabase.explorations.blocks (renamed from .groups): blocks-tree builds the nested shape; block headings + page names + score-sorting ported over; block-display-name made public for the LLM planner ctx. - Deep links go to a page by id: page-url → /question/research/<exp>/ page/<page-id>; the AI-summary and document-append builders pass the primary query's page_id. - Drop exploration_query.group_id (and its FK/index); a query reaches its block through its page now — build-row-context (used by the runner to finalize each row's MBQL) resolves the block via the page, which is what the group_id read there used to do. - API schemas: ExplorationQueryGroup → ExplorationBlockNode + ExplorationPageNode. - Migration changesets appended (the table is live on the dev db). - Rewrite the read-model + endpoint tests for the nested shape; every ExplorationQuery test fixture now hangs off a page (page_id NOT NULL). The create payload key stays :groups for now (separate input contract, touches the data-picker flow). FE consumption of :blocks lands next. * Consume nested blocks→pages on the frontend The frontend renders an Exploration Thread as sidebar headings — one per Block — with a navigable item per Page (a Page being the bundle of queries for one metric/dimension/variant). It used to receive a flat typed-node `groups` list and re-nest it itself; this switches it to the nested `blocks` array (block → pages) the read API now returns, and renames the navigable unit from "group" to "page" throughout. Users see the same sidebar and charts — this lines the frontend up with the backend's shape. - exploration.ts: add ExplorationBlockNode / ExplorationPageNode; thread `.groups` → `.blocks`; remove ExplorationQueryGroup / its display-type; the navigable id is now a page node id (kept as an opaque string). - Sidebar utils build the tree directly from blocks→pages (one heading per block, one child per page); score-sorting + empty-block filtering preserved. - The navigable unit is renamed group→page end to end: the route segment becomes /page/<id>, matching the backend's AI-summary deep links. The selection/url/comment-draft id stays a string via String(page.id), so the existing string-keyed plumbing is unchanged. - Visualization toolbar/header/comment-draft props renamed group→page; the mark-as-interesting handler is left a stub for the stars feature. - Specs, stories, and test-utils rewritten to the nested shape. The create-payload request key stays `groups` (separate input contract). * Retain comment-anchored pages across rerun GC; point comment URLs at /page/ A Page bundles the queries for one (metric, dimension, query_type), and a comment can be anchored to a Page — comment.child_target_id holds the page id. On a rerun an Exploration's queries are deleted and regenerated, and any Page left with no queries is garbage-collected. A Page a comment points at must survive that cleanup even when it ends up empty, or the comment would resolve to nothing. This makes the rerun GC comment-aware and moves comment deep-links onto the page route. - gc-orphan-pages! now retains an orphan page when some "exploration"- targeted comment's child_target_id equals the page id (compared as strings). Empty + no comment is still GC'd as before. Page ids are globally-unique PKs, so matching on child_target_id alone is unambiguous. - exploration-comment-url: /group/<child> → /page/<child>, matching the page route and blocks/page-url; stale "group ID" docstring fixed. - explorations imports :model/Comment for the retention lookup (comments doesn't depend on explorations, so no dependency cycle). - No backfill: the dev Postgres has zero exploration comments and zero auto:* child_target_id rows, so the optional migration is skipped. - Test: comment on a page → drop that page's selection → rerun → the page is retained and the comment still resolves; a no-comment empty page in the same rerun is still GC'd. * Generate short and long page names from metric, dimension, and variant A Page — the bundle of queries for one (metric, dimension, query_type) — is shown in the sidebar under its Block's heading, but is also referenced on its own elsewhere (comment deep-links, AI-summary chart titles, search). Page names are derived, not stored, so a Page needs both a short label that omits whatever its Block heading already shows (e.g. under a "Number of Orders" heading: "By Category over time") and a full, self-describing label for context-free places ("Number of Orders by Category over time"). This generates both from the Page's parts — the metric name, the dimension name, and a short per-variant qualifier — rather than by string-slicing a finished name. - variants/variant-qualifier: query_type → a short, param-free localized qualifier ("over time", "(Day of week)", ...) or nil for the default breakdown. Lives next to query-name so all variant naming is in one place. Unit-tested. - blocks: page-long-name and page-short-name generate from parts (metric + dimension + qualifier) using tru templates and the block's anchor; page-node emits :name and :long_name. - API ::ExplorationPageNode and the FE ExplorationPageNode type gain :long_name (FE display wiring left for separate work). - Same-dimension pages that differ only by variant (default vs top-n-other) are now distinctly named instead of colliding; a blocks-tree test that asserted the collision now asserts they differ. * Add ability to star pages, sidebar tabs UX (#76755) * add ability to star, sidebar tabs * - renamed "user interestingness" to "starred" - Let starred just be true|false, no null - Removed DELETE starred API, just PUT now --------- Co-authored-by: Nathan Voxland <nathan@metabase.com> * Fix CI: test compile error, migration boolean type, e2e formatting - documents/search_test.clj: qualify text->prose-mirror-ast with the documents.test-util/ alias in the exploration-thread exclusion test. The unresolved symbol broke backend test compilation, which cascaded to every app-db/driver test job and clj-kondo ("0 tests" everywhere). - 20260428_explorations.yaml: use ${boolean.type} instead of bare boolean for exploration_page.starred (required post-v49 so MySQL uses BIT(1)). - oxfmt formatting for two explorations frontend files (fe-lint). * Update e2e specs for reworked comment URL + explorations sidebar - comment helper: match the node comment link by path only. The `?new=true` marker was removed from comment URLs (base commit "respect query params in all urls"); the CommentsMenu unit test was updated but this e2e helper was missed. Verified the comment flow still works (opening a node's thread shows the new-comment editor). - explorations spec: align with the reworked sidebar — * `by <dim>` leaf label is now `By <dim>` * Scratchpad doc test: only Scratchpad is created synchronously; the AI Summary doc is created asynchronously, so stop asserting it (and the removed "Findings" grouping) at creation time. * AI-summary completion test: the AI Summary doc row now hangs under the thread heading ("Initial investigation"), not a "Findings" group. * remove the two "Add to document" tests — that control was removed. * Fix stylelint rule-empty-line-before in explorations CSS modules Add blank line before nested &:hover rules in ActionToolbar.module.css and ExplorationGroupVisualization.module.css. These surfaced in fe-lint's lint-css step once the oxfmt formatting failure was resolved. * - cleaned up migration file - Improve group renaming in code - preserve starts between re-runs like comments * Fixing CI failures --------- Co-authored-by: Kevin Kelleher <kevin.kelleher@metabase.com> Co-authored-by: Nathan Voxland <nathan@metabase.com> * Don't send empty messages to the LLM * address review comments from 76755 * UXW-4765 Hide charts (#77488) * UXW-4765 Hide charts * Review fixes * Fix the failing explorations unit tests and Loki stories (#77564) * Fix the failing explorations unit tests and Loki stories at the branch tip * Restore the original all-hidden copy and drop thread headings from it * Delete the outdated ExplorationGroupVisualization stories and their Loki references * Rephrase the hide toast to put the chart name first * UXW-4764 Remove interestingness badges on results (#77544) * UXW-4764 Remove interestingness badges on results * Drop e2e assertion for the removed sidebar interestingness markers * Colocate the interesting and error markers with their only consumers * Remove the interestingness marker from the timeline picker too * fix types, lints, formatting * Uxw 4779 update tab menu to match designs (#77543) * UXW-4779 Update sidebar tab menu to match designs * Show a pointer cursor across the whole SegmentedControl * Give the icon tabs img semantics and hide the decorative icon names * Let getExplorationSidebarTabsInfo own the tab icon config * Revert the SegmentedControl root pointer cursor, Mantine already puts it on the labels * Regenerate modules config after master merge The merge left 'explorations' and master's new 'entity-retrieval' out of sorted order, which metabase.core.modules-test asserts on. * Float the action toolbar pinned to the bottom of the chart canvas (#77667) * fix types * revert timelines in documents * Review fixes: stop requiring the QP's internal cache.impl from other modules Explorations code that saves and loads query-result snapshots was requiring metabase.query-processor.middleware.cache.impl directly — an internal namespace of the query-processor module that other modules aren't supposed to reach into. Since the module's :api set is generated from actual usage, those requires had put cache.impl on the module's public surface — something master never exposed. Modules talk to each other through a small public facade (metabase.query-processor.core) instead. The two helpers those callers need — do-with-serialization (write a QP result as a gzipped blob) and with-reducible-deserialized-results (read one back) — are now re-exported from the qp.core facade, and the explorations callers go through it. One consumer can't: queries/cached_result.clj is itself loaded while qp.core is loading, so requiring the facade from there would be a circular-load error at boot. It gets a proper home instead — a new small, documented public namespace, metabase.query-processor.result-serialization, re-exporting the same two helpers. With nothing outside the module requiring cache.impl anymore, the regenerated :api drops it, matching master. * Review fixes: explorations planner and AI-summary polish - Nested cardEmbeds: the AI-summary postprocessor wrapped only top-level cardEmbed nodes in resizeNode containers, while the card materializer walks the whole document — so a cardEmbed the LLM emitted inside e.g. a blockquote got a real card but rendered collapsed to zero height. The wrapper now walks the tree too (skipping already-wrapped nodes). - Awareness-tier sort validation: phase 2 validates that embedded categorical charts carry an explicit sort instruction, but the validation set was built only from top-tier breakouts — an awareness-tier categorical chart escaped validation entirely, and its prompt block (slim-block) never told the model a sort was required. Both tiers are validated now and slim-block emits the same per-chart sort directive as full-block. - Contextual-scoring gate order: safe-score+describe resolved its scoring context (a Card select and a SQL compile) before checking whether the row is scorable at all (chart config present, creator known, non-blank thread prompt) — wasted DB reads and a query compile for every unscorable row. The cheap gates run first now. Its docstring also claimed the LLM gate throws and is swallowed; it actually returns nil from a pre-flight cond. - Discovery-cache TTL: the top-K category discovery cache was a process-lifetime LRU, so a stale top-K result could be served forever on a long-lived instance; entries now also expire after 15 minutes. - Chart-name i18n: filtered-subset chart names built their multi-value summary as (str (count values) " values") — a hardcoded, unpluralized English fragment inside an otherwise-translated name. It uses trun now. - Docstring/comment corrections: effective-cardinality documented (and branched on) a :num-bins bucket that no caller can produce — branch and docs removed; run-one-plan-iteration! said it runs "the LLM planner" when the default is the mechanical one; a variants-test section comment claimed temporal variants add a not-null filter that no variant adds. Also repoints this module's result-blob serialization calls at the qp.core facade (the consumer half of the cache.impl cleanup in this stack's first commit). * Review fixes: explorations API permissions, documents, and search - Creating an exploration accepted arbitrary card ids (in blocks) and timeline ids without checking the caller could read them, so you could attach someone else's private metric or timeline and see its name/events later. Both are read-checked at create time now, and timeline hydration filters out timelines the viewer can't read. A duplicated timeline id used to hit a unique constraint and 500 the request; ids are deduped. - The restart endpoint re-selected the Exploration row after resetting the thread, but the reset never touches that row — the redundant select is dropped. - GET /api/document listed documents that belong to exploration threads, which search, recents, and collection items all deliberately hide. It applies the same filter now — which as a side effect removes an N+1 pattern where each listed doc could trigger several permission queries. - The document validator rejected {:type "doc" :content []} — the exact empty document the backend itself creates for new threads. An empty root doc is valid now. - Search: is_published was deliberately hidden from search responses on master (#66841) and this branch accidentally re-exposed it — hidden again in both search engines. Exploration descriptions are searchable in the legacy engine too, matching the new engine. - Data picker: metrics and dimension groups now use the same interestingness filter (a metric could previously reference dimension ids that appeared in no group), search matches the displayed "<group> - <dimension>" text, and a collection-ids query that ran twice per request runs once. - Consistency: the create event publishes after the transaction commits (observers could previously fire before the data was visible). * Review fixes: metabot / LLM infrastructure - Asking Claude for extended thinking while also forcing a tool call (tool_choice "required") produced a request Anthropic rejects with a 400. The guard that already handled this for structured output now covers the general tools path too. - The e2e guard that stops tests from hitting a real LLM provider threw a raw MalformedURLException on unparseable URLs; it now fails closed with its normal friendly message — and it was moved out of a catch-all that would have rerouted it, so it fails loudly. - The timeline tools handed the LLM broken XML (an attribute quote and a tag never closed) and interpolated user-written names/descriptions unescaped, letting content break the markup. Output is well-formed and escaped. - Hardening/docs: the retryable-error check bounds its exception cause-chain walk at 10 (a cyclic getCause could loop forever); the contextual-interestingness response schema now really forbids extra properties (its docstring claimed it already did); docstrings about thinking model buckets, return shapes, and inputs corrected. - Also repairs three test breaks that already existed at HEAD: an arity mismatch from the OpenRouter merge, a test asserting thinking blocks are dropped (they now stream as reasoning parts), and tests that didn't stub the LLM gate's newer usage/permission checks. * Review fixes: lib-metric, metrics transforms, startup sync, interestingness - group-by-source was re-exported for JVM Clojure but missing from the ClojureScript branch of lib-metric.core; added. - Metric/measure display-info inherited a default :long-display-name even where the method overrode :display-name, so the two could disagree; they're set together now. - A failure in the startup metric-dimension sync aborted server boot entirely; it's wrapped to log an error and continue. - The interestingness "leftovers" backfill loaded every unscored field for the database into memory in one select; it now streams one field at a time, and the namespace docstring mentions this second recompute trigger. - Added a unit test covering the dimensions :out transform (kebab-key renames + type-value keywordization). * Review fixes: enterprise perms/sync/deps, cached card query, test quality - Remote sync: an event payload that simply omitted a key used to satisfy a nil condition (e.g. "exploration_thread_id must be nil") — conditions now require the key to be present with the right value, checked with (find object k), which distinguishes a present-but-nil entry from an absent key. Vector values in removal conditions rendered as broken equality clauses; they render as IN. - Dependency graph: smartLink nodes with nil/placeholder ids added nil to the dependency set (the sibling cardEmbed branch already guarded this); guarded, with regression tests for both branches. - Test quality: the revisions exclusion test asserted the impl against its own private set, so it could never fail; it checks a hardcoded expected list now. Exploration bookmarks get real API coverage (create/list/delete/ordering/archived), and a mislabeled test string was fixed. * Review fixes: v4 instance-analytics views with explorations usage sources The AI-usage analytics views translate machine source names ("exploration", "contextual_interestingness", …) into human-readable labels with a SQL CASE. The explorations stack added its new sources to the v1 SQL files — but the views actually installed on instances are v3, and nothing reinstalled them, so users saw the raw machine names fall through the ELSE branch. Adds v4 of ai_usage_log and metabot_conversations (v3 plus the new CASE branches, with one consistent "Explorations" label — v1 said "Exploration" for the source but "Explorations" for the profile), a migration that reinstalls the views at v4, an updated pointer comment in usage.clj, and a parity test that fails whenever a known source/profile is missing a CASE branch in the latest views — exactly the drift that happened here. * Review fixes: frontend (minimal) and e2e Only the low-risk frontend fixes from the review pass, plus the e2e test fixes; the other frontend findings are deliberately left out to keep this branch's FE diff small. - getDimensionIcon existed byte-for-byte in two files; the duplicate module is deleted and its one importer now uses the copy in common/utils/columns.ts. - e2e: an assertion that searched for text inside another text node (and so always passed) is meaningful now; readSelectedText no longer breaks Cypress's retry behavior by asserting after a .then; and the seemingly pointless GET /api/metric/:id in seedMetrics got a comment explaining the side effect it exists for (it persists metric dimensions). * Remove the LLM query planner Explorations plans queries with the mechanical planner only now. Removed: the LLM planner namespace, its prompt templates (plan.selmer / repair.selmer) and prompt loader, the prompt-markdown renderers in the planner-context namespace, the explorations-query-planner setting (mechanical/llm/auto), and the :skip-no-llm exit for "planner requires an LLM but none is configured". pick-planner! now always returns the mechanical planner — kept as a seam so tests can stub it and a future planner has an obvious dispatch point. The planner-contract protocol and the shared context builder stay (they are planner-agnostic), and the query_plan_transcript column stays (every planner writes a transcript); its remark no longer describes an LLM exchange. * remove graph._dimension_value_colors (per bar colors) * Add row count to explorations API (#77740) Already available, we just need to persist it and thread it through the API. * Format fix * Exploration UX... um explorations. (#76901) * click thru * better comment links * chart avatars * avatars * allow subsubexplorations * disable explore further for Other group in top n charts and dimension anchored blocks * fix explore further for binned numeric columns * comment highlighting, remove avatars * comment label formatting * map and table highlighting * use built in viz click actions popover instead of custom * fix comment badge in dark mode * self review cleanup * fix and simplify new thread toast * fix be lints, add tests * fix tests * add fe, e2e tests * - POST /:id/explore-further now verifies the clicked page belongs to this exploration before copying its block, closing a hole where any page in the instance could be copied into any writable exploration. - key on the stable :explore-filters spec instead of a hash of the per-row-reconstructed :dataset_query (which minted fresh :lib/uuids and so never hit). build-row-context exposes :explore-filters on the row context for the cache to key on. Also reuse metabase.util/capitalize-first-char in the block title and thread name helpers instead of hand-rolled str/upper-case. * Code cleanup * Gate exploration derived metadata by viewer's permissions * fix lints * Code review improvements * Den/uxw 4741 explorations new sidebar (#77674) * Update tabs view, add filter button menu * Fix tests * Add sidebar items vertical lines + icons * Other sidebar changes - viewed state, sticky hierarchy * Show sub-explorations near it's parent item * Fix issues * Self review * Fixes after merge * Self review * Review fixes * Fix empty states * Review fixes --------- Co-authored-by: John Swanson <john.swanson@metabase.com> Co-authored-by: Kevin Kelleher <kevin.kelleher@metabase.com> Co-authored-by: Nathan Voxland <nathan@metabase.com> Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * Explorations self-review cleanup (#77717) * Consolidate the explorations migration in place The 063 explorations migration had grown by accretion: tables were created and then altered by later changesets in the same unreleased file. Since the branch convention is to edit unmerged changesets in place, the final shapes are folded into the createTables: - exploration_query gains params, nullable dataset_query/entity_id, and page_id inline (the page_id FK and index stay separate — exploration_page is created later in the file, so they can't run earlier). - stored_result gains data_access_token inline; its backfill changeset was deleted outright — created and backfilled in the same release, it could only ever run against an empty table. - exploration_query_result gains chart_stats / metric_description / chart_description inline, which also retires the randomly-named changeset id v63.gr324asd. - idx_eqti_query_id deleted: the unique constraint on the same leading column already provides that index. The completed_at and analysis_started_at backfills are deleted outright: the explorations feature merges to master in one piece, so at upgrade time no instance can have pre-existing exploration threads to backfill. (They were also dangerous — they stamped columns the cancel endpoint and the completion handler gate on being NULL, permanently locking out any thread in flight during the migration.) Cosmetics: backfilled default docs are named "Scratchpad" to match runtime (the backfill said "Findings"); stale remarks corrected (chart_stats is EDN not JSON, the real query_type variant list, what collection_id actually defaults to). Existing dev databases will need a migration reset. * Set exploration thread started_at in the INSERT The thread was inserted without started_at and then immediately updated to set it, on the theory that the background worker must not see the thread before its dependent document/block/timeline rows exist. The whole create shares one transaction, so intra-transaction ordering is invisible to the worker (it reads on another connection; the commit is atomic) — the flag can simply be set in the INSERT, saving a write. * Guard exploration restart against in-flight work The restart endpoint could fire while the planner was still working on the thread, deleting its rows mid-plan and wedging the thread in a state no worker would ever pick up again. reset-thread-for-rerun! is now a CAS: it applies only to a terminal thread (completed_at set) with no query still mid-execution, and the endpoint returns 409 ("cancel it before restarting") otherwise. A successful reset leaves the thread exactly in the shape the planning worker's claim predicate picks up. The endpoint also published :event/exploration-update, which provably did nothing: restart changes no Exploration column, and the revision system skips unchanged objects. The publish is removed; the AI-summary doc reset still records a Document revision, which is what /mine's last-touched ordering composes. * Route mid-stream LLM errors through the provider-friendly rethrow LLM responses stream lazily; a connection timeout between SSE chunks escaped as a raw SocketTimeoutException because the provider error handling only wrapped request setup — the reduction happens later, in the agent loop. Every provider adapter's SSE reducible (claude, openai, openrouter, azure, bedrock) is now wrapped so consumption-time failures get the same translation as request-time errors. * Grant the read-only timelines scope under metabot-nlq The explorations metabot profile instructs the model to use the timeline tools, but those tools were granted only under :permission/metabot-other-tools while the profile is gated on NLQ — so for NLQ-only users they were silently filtered out of scope while the prompt kept referring to them. agent:timelines:* (whose only member is the read-only list/details scope) is now granted under both permissions. * Don't retry deterministically-failing fields in the interestingness leftovers pass The leftovers pass selects on dimension_interestingness IS NULL, so a field whose scoring deterministically throws was re-attempted on every sync forever. A per-process attempted-marker now skips fields that already failed in this process; a restart re-enables retry, so transient failures still converge. Process-local by design — no schema change, and no sentinel score leaking into product surfaces that read the column as a number. * Fail closed when a sandboxed field's user attributes are missing sandbox-token-for-table returned nil when the field was sandboxed but the user's sandbox-attribute lookup came up empty — and the downstream compatibility gate reads nil as "unrestricted". That's fail-open. It now returns a user-scoped "indeterminate" sentinel that matches nobody else's token (two indeterminate users don't match each other either): fail-closed. Also adds direct and end-to-end tests for the impersonation and routing token producers, which previously had none. * Require the (card, stored_result) pairing on the cached card-query path POST /api/card/:id/query with a stored_result_id read-checked the card but then served whatever snapshot id the client sent — nothing verified the snapshot actually belonged to that card. The pairing must now exist in stored_result_use (404 when it doesn't, so an unpaired probe can't confirm a snapshot exists). Both materialization paths already insert the pairing rows, and the table ships in the same unreleased release, so no legacy data lacks them. The viewer-lens check also denied a nil dataset_query only by accident (a schema exception swallowed by the catch — and in prod, where mu/defn logs instead of throwing, it would have failed open); it denies explicitly now. Plus: consistent t2/select-one forms in the endpoint, a stored_result_use docstring update, and the generated module config picking up the new StoredResultUse consumption. * Apply the personal-collection default when it resolves after first render The "default new explorations to my personal collection" logic captured personalCollectionId once in a useState initializer — if the selector resolved after the first render, the default never applied. It now reconciles when the id arrives, without overriding an explicit user choice. * Move the explorations migrations to v64 The v63 release branch has been cut, so the explorations feature will ship in v64 and its migrations belong in the 064 directory. Both files move (20260428_explorations.yaml and 20260519_exploration_bookmark.yaml) and every changeset ID is reprefixed v63. -> v64. No changeset content changes. Since we're already editing unreleased changesets in place on this branch, existing dev databases needed a migration reset anyway. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * v_metabot_conversations v4: restore include-deleted semantics lost in merge Master's #77542 (conversation branches) and this branch both created metabot_conversations/v4 in parallel: master's dropped the deleted_at IS NULL filters so soft-deleted (rewound/regenerated) messages are counted; ours added CASE branches for the new explorations usage sources and profile. The 'Merged from master' resolution kept only our copy, silently losing the deleted-message semantics — which is why deleted-messages-included-test and last-message-at-test fail: they assert master's behavior against our view. This drops the three filter lines from each dialect's v4 file so v4 is the union of both changes. Both installing changesets (our v63 and master's v64) are runOnChange: true and checksum the referenced file, so every instance reinstalls the corrected view on upgrade — no new version or migration needed. * Drop the redundant v_metabot_conversations v4 installer Master's #77542 (064/20260713_metabot_analytics_views_include_deleted.yaml) already installs metabot_conversations v4 via a runOnChange changeset against the same SQL files, which now carry both sides' changes: the explorations CASE branches and the include-deleted semantics. A second installer here was redundant — and would have collided with master's changeset IDs (v64.2026-07-13T00:00:00/01) had this file been mechanically renumbered to v64 like the other explorations migrations. The ai_usage_log v4 changeset stays: nothing on master installs that view. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * Move the ai_usage_log v4 migration to 064 Same reasoning as the explorations tables: v63 is cut, this ships in v64. The changeset ID takes the next free slot for its date (v64.2026-07-13T00:00:02 — master's include-deleted file owns 00 and 01) rather than a mechanical v63->v64 rewrite that would have collided. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> * Show a crossed-eye indicator with a tooltip on hidden pages in the exploration sidebar (#77907) * Explorations no AI Summary (#77878) * Extract AI Summary + document-in-exploration out of explorations Removes the LLM-generated "AI Summary" feature and the ability to display a document within an exploration. The feature-restoring (inverse) commit is kept on branch `explorations-ai-summary`; cherry-pick it to bring the functionality back. Backend: - Delete the explorations.ai-summary.* pipeline, composite, document-perms, prompt templates, and their tests - Drop exploration->Document creation, the /thread/:id/documents endpoints, the :documents hydrate, ai_summary_document_id, and the AI-summary reset - Revert the documents-module coupling: content-visibility gate, the document.exploration_thread_id FK/column, the view-log skip, and the GET /document list filter; delete documents/validate.clj - Drop the collection-items show_exploration_documents option and the exploration-doc exclusions in recents / search / serdes / remote-sync; drop the search exploration-thread-id attribute - Remove the ai_summary_document_id and document.exploration_thread_id migration changesets (edited in place) Frontend: - Delete the ExplorationDocument component and its tests - Remove the AI-summary sidebar node, completion toast, and the document API / urls / types; keep the shared comments sidesheet and page routing * Extract static card-embed in documents out of explorations Removes the static (cached-snapshot) card-embed capability from documents, so it can land on its own branch (`static-embed`) independently of the AI-Summary feature. The feature-restoring (inverse) commit lives on `static-embed`. Keeps the base `stored_result` model, the exploration query-result cache, and the cached-result permission helpers (`assert-can-view-cached-result!`) that the exploration `/query/:id` streaming endpoint uses. Also keeps the general `report_card.document_id` "card in a document" feature (it predates this work). Removed: - The cached-result serve path (`cached-dataset`, `apply-sort`, `deserialize-cached-result`, `allowed-chart-sorts`, `viewer-can-view-cached-result?`) and the `stored_result_id`/`sort` branch of `POST /api/card/:id/query` - `stored_result_use.card_id` (column + model arm; keeps `exploration_id`) - The documents serdes static-node filter (reverted to master's live-only rewrite) and the prose-mirror static docstrings - Frontend: the tiptap `cardEmbed` static rendering (the `stored_result_id` + `sort` + `chart_href` trio) across the CardEmbed node/menu, document hooks, redux, and `card.ts`; deleted the CardEmbedNode static unit spec * Fix pre-existing cljfmt/oxfmt formatting to unblock CI These 4 files (a stray blank line each) are unchanged from the base explorations branch — the format checks were failing on inherited, not extraction, changes. * more documents cleanup * Update Loki Snapshots * change references from entity (which was page or document) to just page --------- Co-authored-by: Kevin Kelleher <kevin.kelleher@metabase.com> Co-authored-by: Metabase Automation <github-automation@metabase.com> * Restore fix * Fix Metabot exploration tools streaming empty results to the client (#77990) Since |
||
|
|
e7211002cf | Static viz imports optimization (#77658) | ||
|
|
a9e1b0edf7 | GDGT-2454 Badge (#74714) | ||
|
|
94144e3411 |
Add KeyboardShortcut component and restyle Kbd (#75895)
* WIP: restyle Kbd from Figma + disabled state and showcase Restyle the Kbd component to the GDGT-2473 Figma spec: flat surface fill, no border/shadow, 4px radius, Lato Medium 12px. Add a thin metabase/ui wrapper exposing a `disabled` boolean prop, a CSS `:hover` state, and a Storybook showcase matrix. * Add sequential shortcut examples to Kbd showcase * Add KeyboardShortcut component, simplify Kbd, migrate palette Per design discussion: drop Kbd's hover/disabled states (Kbd is now just a restyled building block), add a KeyboardShortcut component that composes Kbd — simultaneous keys adjacent (no "+"), sequential steps joined by a localized "then", with a canonical modifier order and symbol/casing normalization. Migrate the command-palette shortcuts modal to it (replacing its local renderer) and list multiple shortcuts comma-separated. * Add KeyboardShortcut Overview story to Loki visual regression tests * Render Shift as a word in KeyboardShortcut, not a symbol Per design: drop the SHIFTKEY (⇧) mapping so Shift always renders as the word. * Extract KeyboardShortcut key parsing to utils with unit tests Move formatKey/parseShortcut into a colocated utils.ts and cover them with unit tests (each formatKey branch + chord/sequence/modifier-ordering for parseShortcut). |
||
|
|
348c513d47 |
Restyle Chip component according to Figma spec (#74769)
* Rework Chip story and add reusable Storybook showcase helpers Turn the Chip story into an overview showcase (sizes section plus a column per variant with all interactive states, hover/pressed via storybook-addon-pseudo-states) and extract the layout into a reusable metabase/ui/stories/showcase module: StoryShowcase, StorySection, StoryRow, StoryCode, and StoryJsx (a small JSX syntax highlighter). * WIP: restyle Chip to Figma spec with semantic tokens Restyle the Chip to match the updated Figma spec (GDGT-2483) using semantic --mb-color-* tokens throughout — light/filled variants, sm/md sizes, and the full state matrix (default / hover / pressed / selected / hover-selected / disabled / disabled-selected). Sizes are wired via a Mantine vars resolver; per-state styling is keyed off data-variant on the root and data-checked/data-disabled on the label. Adds data-force-* hooks so the showcase can render hover and pressed states statically. Migrates the two existing call sites (BaseSMTPConnectionForm, WebhookForm) from the invalid variant="brand" to variant="filled". * wip: chip * Align Chip colors with updated Figma semantic tokens Switch to the post-refactor (GDGT-2517) role-based tokens design now binds in Figma: neutral background_surface-secondary(-hover/-pressed) for unchecked states, background_surface-brand-subtle + text-brand-strong for selected light, background_surface-brand-strong for selected filled, and the corresponding -hover variants. Also renames background-disabled/text-tertiary to background_surface-disabled/text-disabled. * Add Chip Overview story to Loki visual regression tests * Format * Add Loki reference for Chip Overview story * Remove redundant comments from Chip restyle * Cleanup * Address review comment * Cleanup |
||
|
|
b56c33b6be | adjust styling on parameter placeholders (#71577) | ||
|
|
38bf8580ea | fix: grid Map Pins Offset in PDF Export (#68751) | ||
|
|
862dc50c64 |
Fix ChartTypeDropdown overflowing (#68455)
* Forcing overflow policy on ChartTypeDropdown * tpyo * refactoring to enable testing this with loki * fixed story * loki * screenshot * removed useless unit test |
||
|
|
2ebcd1631c |
Various Data Studio Table Adjustments (#66795)
* Various Data Studio Table Adjustments * remove unneeded comment |
||
|
|
be8686b577 |
feat: make metabot logo follow the bran colors (#65358)
# Conflicts: # frontend/src/metabase/common/components/MetabotLogo/MetabotLogo.stories.tsx # Conflicts: # loki.config.js |
||
|
|
2fb4793c24 |
fix large command palette subtext elements, add loki testing (#65369)
* fix large command palette subtext elements, add loki testing * how did I miss this? * updating Overlay demo |
||
|
|
35f1f1903d |
Make Metabot logo gray when brand color customization is defined (#64566)
* Make Metabot logo gray when brand color customization is defined * Add MetabotLogo stories and test them with Loki Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com> --------- Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com> |
||
|
|
d4eee39154 |
Misc Dark Mode Fixes 1 (#64484)
* alert colors * undo text color * better modal contrast * Update Saturated Yellow color, Update collection authority form picker * tooltip secondary color * Emoji picker transparancy * make-yellow-not-💩 * fix types * Update Loki Snapshots * add border to ye olde model * cleaning up after nick again * Alert color and type adjustments * dashboard autoconnect toast styling * entity-picker e2e * Update Loki Snapshots --------- Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com> Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
984a2564fc |
Fix regression - small cta for large upsell banner and big card (#62009)
* Fix regression - small cta for large upsell banner and big card * Extract upsell styles to per component css modules * Regression - bring back margins to cta in large upsellbigcard * Add upsell components to loki visual tests * Fix too big margin in upsell large variant * Align storybook story with the real usage * Update Loki Snapshots * Allow custom button styling on UpsellCard, move custom styles card instance --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
15ae50ace3 |
Documents Feature (#61285)
* remove references to static questions * Ditch overall sidebar for now (#61523) * Remove list of cards sidebar * Some type fixes * Review fixes * feat: associate in_report cards w/ report_document * feat: associate cards with reports in create * better markdown serde * switch to prosemirror ast * chore: add enterprise card test * remove snapshots * less redux * send used card ids * drop flushSync error * remove replace question, drop refresh question * fix backend not starting * saving new report should not show LeaveRouteConfirmModal * polish * Insert into reports from metabot (#61642) * insert from metabot * Metabot plugin and hook * make stuff nicer * cleanup * no more snapshots * run build and docker uberjar on push * remove trigger for uberjar * Print Report * cleanup * always create a card clone when embedding * always clone non in_report cards * disable metabot sidebar on mob+b * stop header bouncing * jumping layout when loading * why scroll to bottom when opened * gross emojis * cleaning up emoji ui a bit * icons * fe: reports -> documents * update metabot question creation parsing * keep report cards and collections in sync (#61686) * do not leak prosemirror styles into charts * chore: rename everything to document (#61743) strip out snapshotting code * fix FE usage of documents api * fix embedding dashboard-only cards to documents * uxw-366: Navigation back to the report from a drill through can be difficult - can we add the back button like for dashboards * mention all entities * split mention vs command, allow mentioning other entities * paste smartlinks * missing import * fix links to tables * fix layout * auto focus on title on new documents * UXW-404 Improves image formatting * Tweaks metabot block styling, wires up "stop generating" functionality * Fix issues with multiple in-flight requests * Adds subtle animation to "Working on it..." message * Document Metadata * Fix some CI issues * Persist cards when saving document (#61818) * chore: remove document version model * persist cards only when saving documents * chore: remove in_document type * feat: return document creator * feat: save cards with parameters pass in as cards in POST and PUT requests to documents * chore: exclude doc cards from where shouldn't be search, recents, collection items * chore: fixup search and card tests * contract * feat: update document ast with new card ids * fix: report -> document in collection api * fix: ws * feat: clone cards not associated with document * chore: add tests for document permissions * fix contract * fetch root collection * update message * must be working now * fix sidebar --------- Co-authored-by: Edward Paget <ed.paget@gmail.com> * wip but working sql query editor in documents * feat: revision history for documents * feat: include revision info in collection tree res * document entity * Fix issue where temporary implementation of metabot block can't create questions * feat: allow documents to be archived * Document Collection Item Caching * Fix issue where submitting empty metabot prompt (by hitting "Run" or cmd+enter) makes it spin forever * fix UXW-412 again * feat: allow documents to be bookmarked * fix: hide documents in collection items if not EE * fix: add perms info to documents in collections * fix: always add documents to bookmark lookup * feat: add document delete endpoint * fix: require non-blank string for name * App Bar Breadcrumbs for documents * fix: tests and lints * fix: ordering of migrations for mysql * fix: for OSS tests * fix: tests and kondos * fix: module sort * New metabot documents API * UXW-400: formatting floating menu * UXW-416: replace question should replace only 1 question * swap icon * l10n * fix: bad var reference in tests * undo moves should work once archived is boolean * Show tooltip with precise time in document metadata * Updates MetabotEmbed to work with upcoming BE changes * Updates MetabotEmbed to always use draft cards * Updates MetabotEmbed "stop generating" functionality to work with regular (non-streaming) api call * Updates MetabotEmbed to use most up-to-date api contract * Stubs out the necessary updates to make MetabotEmbed work with an UnsavedCard from the BE rather than a full Card * Updates MetabotEmbed to use most up-to-date api contract * fixed drills & query editing for metabot cards * fix: foreign key indexes * Replaces hard-coded metabot-generated card title with title from the /generate-content response (or translates a default title if none provided) * fix: add entity id column to documents * add title to untitled docs * UXW-453 Fix 404 when clicking draft card title * Handle URL slugs, remove version code from document page, handle 404 and 403 * UXW-459 Fix issue where creating a new document when starting from another document overwrites the existing document (and shows previous document's metadata in new document) * hide object detail row in document tables * UXW-459 Fix issues with LeaveRouteConfirmModal and new documents * UXW-461 Prevents jump when Save button appears/disappears. Also adds subtle fade-in transition when it appears. * UXW-461 Save button always shows up for new documents (and user has necessary permissions) * improved mention and command * clean * fix replace question * do not show bubble menu on disallowed nodes * MetabotEmbed polish: * Prevents prompt from highlighting when you hit "Run" (potentially bringing up the editor bubble menu). * Prevents useEffect hook from running way more than it needs to. * Adds margin below MetabotEmbed. * Hitting escape with nothing in the textarea will now remove the MetabotEmbed block. * Makes layout less janky when Metabot responds with a long error message. * Localizes "Created with Metabot" text * drop emojis * no emojis and markdown downloading * fix metadata fetching * initial e2e tests * fix: set null on collection cascade for documents mirrors behavior for dashboards and cards * fix: remove documents token hack * feat: documents in search Also supports view_counts and last_viewed_at for documents * fix: emit documentment read on api get * fix: in_place search fixes and test fixes * fix: migration order * fix: set type to :question dashboard_id to nil * fix: more in-place search fixes for documents * fix: final in-place search test fixes * fix: handle inadvertent documents in oss tests * mention + command feedback * placeholder * fix command search * Fix issue where charts sometimes don't get added via metabot when inserted in the middle of a document * fix command * feat: support pinning documents * fixup! pinning reconcilation with documents * feat: support serdes on documents (#62032) * fix: kondo warning on unused var * updated styles * bump padding * Markdown Loki Test * UXW-462 Adds database picker in metabot block * UXW-462 Fix issue where sometimes custom tiptap node tries to re-render too quickly resulting in an error * refactor * feedback on the command * UXW-462 Fix issue where you can write markdown in metabot blocks * improve state management UXW-463 UXW-450 * Updates "Created by Metabot" line based on design/user feedback * feat: add documents to recents * fix: whitespace and round-trip serdes test * fix: whitespace exclusion path * fix: token features in recent views test * Able to generate sql charts * fix: casing in tests * Changes how mention text is referenced in the documents metabot prompt serializer. It uses a cache in the documents slice now. It was using a node attribute before but that was hacky and it messed with the "is dirty" calculation. * more e2e tests * Fix issue where metabot nodes sometimes yield a false positive in hasUnsavedChanges because they updated their own attributes * Update menu items (#62072) * Update commands and remove descriptions * Removes unused code --------- Co-authored-by: Brad Anderson <brad@metabase.com> * feat: return can_restore, can_delete for docs * Updates Document type with newly added properties * Fix issue where "Delete permanently" errors out instead of deleting * Move, Archive, and Bookmark in documents page * bury shame * UXW-472 Adds ArchivedEntityBanner for documents * fix: remove extraneous precondition migration * UXW-451 Adds some light dataset error handling * Reverts probably-accidental change * feat: check for name length * Reports fix fe ci (#62046) * Fix some CI issues * Fix some CI issues * Fix typecheck issues * Fix lint * Fix unit tests * Fix e2e tests * fix pivot query editing in documents * better command popover positioning * UXW-473 fix layout * fix z-index * only include tables you can use for native query builder * Fix typecheck * Light documents metabot cleanup * Fix issue where browsers spell check areas that shouldn't be spellchecked (e.g. "Ask Metabot ...") * Removes package-lock.json that was accidentally added in |
||
|
|
e4a6d8a81e |
feat(sdk): Revamp TableInteractive visualization component: update header styles, add text wrapping, and row indices (#54399)
* use tanstack datagrid for the table visualization implementation |
||
|
|
b7e0843d42 | fix tooltip content overflows (#54444) | ||
|
|
493430dffd | Adding DatePicker, Embed, Overlay and other loki tests back (#54310) | ||
|
|
34624003cf | bump tolerance (#52408) | ||
|
|
fbf0e7a3ad | Fix error button hover color (#52373) | ||
|
|
2ed72d106b |
Fix static embedding missing dark theme on some date widgets (#51661)
* Fix date widgets dark theme
* Update more outdated loki snapshots
* Add a story to theme date filters missing dark theme
* Theme relative current widget and co.
* Theme date exclude widget
* Theme relative date interval widget and co.
* Update more snapshots from border color change
* Fix comment on the wrong line
* Fix light theme story switching + mock relative date stories
* Review: Remove unused function arg
* Update snapshots that change once a year 🤦
|
||
|
|
76cb82a047 |
Theme Mantine DatePicker (#46816)
* Remove unpassed props * Add tests * Theme mantine date picker |
||
|
|
6fb1e51d8f |
Fix unintentional color changes (#46516)
* Sync storybook colors with the main app * Fix Metabase badge color * Fix wrong mixed brand colors * Add mistakenly removed colors * Update comments * Correct `brand-light` color * Fix wrong Mantine button color when passing `color` prop * Update loki snapshots |
||
|
|
b85747312c |
bump loki tolerance (#46600)
* bump loki tolerance * fix loki-update command * Update Loki Snapshots --------- Co-authored-by: Metabase Automation <github-automation@metabase.com> |
||
|
|
ffa54f0f45 |
[Milestone 1] Re-design transparent theme for static embedding and public links (#45633)
* refactor: Simplify code (#44275) * Remove dead code * Remove values same as default options * Simplify hook API: Removing unused argument * review: Remove redundant code * Update look and feel copy (#44277) * Update static embed tab name * Update copies + rearrange settings * Use Mantine Select * Fix E2E tests by applying new copies * Fix unit tests * Fix more E2E tests * review: Add a comment on Mantine `value` quirk * Adjust spacing and relevant tests * Move `transparent` theme to its own toggle option (#44362) * Reorder the function to match the visual order * Make function name consistent * Introduce the new background option (do nothing yet) * Remove redundant exports * Tighten up values to reduce confusion * Make the parameters order consistent * Only show background option on dashboads (spec) * Allow dashboard embed background to be transparent * Make filter background and header/footer transparent * Fix type error * Fix unit tests * Fix E2E tests * Fix checkerboard pattern not showing when no background * Add unit tests * Add missing copy update * Remove remnants from outdated solutions within the PR * Improve code comment references * Fix E2E tests since the last copy change * Fix type errors from merging master * Update light theme style (#44488) * Add background to dashboard filter on light theme * Make position sticky works with transparent background * Fix sticky filters not working on theme=transparent * Fix unit tests * Simplify IntersectionObserver components + fix E2E tests * Add storybook for embedded dashboard * Clarify the use of ExplicitSize context * Remove unused code * Formatting * Review: Better mock `isWithinIframe` * Update dark theme to match the new design (#45134) * Update light theme checkerboard colors * Update checkerboard colors * Consolidate dashboard light/dark border style * Use `--mb-color-text-primary` for light theme dashboard * Update embed dashboard dark theme primary color * Migrate dashboard text-secondary color * Migrate text-tertiary color * Migrate gold, axis, and split line to CSS custom properties * Fix failed e2e tests * Fix static viz not working * Update loki snapshots * Remove unnecessary CSS custom property * Make diff more consistent * Address review: reusing type * Support backward compatibility when passing `theme=transparent` (#45214) * Match preview query with the actual code query * Handle backward compatibility when `theme=transparent` on dashboard * Add unit tests * Address review: Make tests less repetitive * Update Metabase banner upsell UI (#45424) * Prepare folder for nested components * Update upsell UI - add `fullWidth` variant - align title to the left * Fix Upsell banner having horizontal scroll on full width * Add new Metabase banner upsell component * Fix unit tests * Address review: Fix typo Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com> * Address review: Move upsel UI to `admin/upsells` Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com> * Remove unnecessary ESLint disable comment We can remove it since the file is in admin folder, and is already excluded from the rule. * Address review: remove default value property Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * Address review: Extract magic number --------- Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com> Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * More UI updates (#45450) * Update dark theme text colors to match the new design * Update powered by metabase logo * Update loki snapshots * Fix unit tests * Fix formatting * Fix wrong dark theme metabase logo badge color * Address review: Compress SVG with svgo Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * Fix E2E tests * Update loki snapshots * Clarify Metabase base colors with comments --------- Co-authored-by: Denis Berezin <denis.berezin@metabase.com> * Add more tests (#45628) * Add static embed question stories * Add loki snapshots * Add transparent theme for static dashboard tests * Add transparent theme tests for static questions * Assert `background` option in analytics tests * Remove tests for logic that has been moved * Update loki snapshots * Fix failed E2E tests from merging master --------- Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com> Co-authored-by: Denis Berezin <denis.berezin@metabase.com> |
||
|
|
ee38f0e449 |
feat(sdk): apply theme options to tables in static dashboard (#44007)
* apply cell background color * add id column overrides * do not add transparency to id column cell when overridden * fix static dashboard theming * update loki reference image * add style resets and regenerate loki snapshots * add style resets and regenerate loki snapshots |
||
|
|
ea2d0a7e03 |
Highlight the table cell data in dashboards when the cell is an ID column (#43728)
* highlight id cell column * add simpletable stories * add simple table test data * add loki reference image * Update frontend/src/metabase/visualizations/components/TableSimple/TableCell.styled.tsx Co-authored-by: Denis Berezin <denis.berezin@metabase.com> --------- Co-authored-by: Denis Berezin <denis.berezin@metabase.com> |
||
|
|
9d61985fcc |
feat(sdk): font size scaling and adjustment for visualizations (#43264)
* support test utilities in sdk import * add relative unit default chart font size in embedding defaults * make font size follow sdk root * feat(sdk): add font size settings to axis ticks * feat(sdk): add font size settings to series labels * re-add hasTimelineEvents from merge commits * apply default font size at the theme level * add table header cell font size * calculate cell font size based on 12.5px * rename theme.chart to theme.cartesian * refactor visualization theme * refactor default viz theme * remove chart style config * add goal line * pass font size to chart measurements * use px as reference unit * support row chart viz * add missing echarts font size * add table cell font sizes * use css variables for funnel color * fix theme type in smart scalar story * add bar chart to storybook for visual test * add line chart to storybook for visual test * add loki reference images * add loki reference images for row chart * add loki shared reference images to stories filter * update loki reference image * synchronize base font size * add theme provider to funnel test setup * add missing default visualization theme * add unit test for get size in px * update loki reference image * fix static viz build error |
||
|
|
8fc52d228b |
feat(sdk): expose color and typography options for smart scalar in embedding SDK (#42915)
* feat(sdk): allow overriding positive and negative values * docs(sdk): add positive and negative colors to docs * feat(sdk): add smart scalar font size * feat(sdk): add smart scalar line height settings * feat(sdk): get rid of custom embedding mantine theme type * wip: setup storybook and loki for smart scalar * fix missing state for rendering visualizations * docs(sdk): add scalar customizations to readme * test(sdk): add test cases to loki * add smart scalar reference image * use css variables for brand * make embedding theme options partial * fix scalar value wrapper line height * update loki snapshot --------- Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com> |
||
|
|
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> |