This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Apr 18, 2025
-
-
Romeo Van Snick authored
* Resolve dimensions while compiling * Use resolver in pratt compiler instead of resolver pass * Remove legacy resolver * Add missing imports * Add startRule to compiler in test * Use helper to calculate argtype * Provide a default implementation of argType * Return expressionParts from compiler * Convert resolver tests to use compiler * Remove superflouous comment * Convert MAP_TYPE to a function * Rename field-resolver to resolver * Simplify resolver check * Move resolver-related code into resolver module
-
Nick Fitzpatrick authored
* pinned questions show moderated status, handle their own caption title * unit tests, description * fixing grid spacing * e2e test adjustments * fix for verified skeletons * update quetion embed test, dashboard embed test
-
- Apr 17, 2025
-
-
Alexander Polyankin authored
-
Ryan Laurie authored
* Refactor Upload Settings to use RTK + Mantine
-
Oleksandr Yakushev authored
* perf: Optimize duplicate-model-ids and search/ingestion functions * [test] Mock javascript-visualization in m.pulse.send-test to speed up tests
-
Braden Shepherdson authored
Fixes [QUE-701](https://linear.app/metabase/issue/QUE-701), [QUE-778](https://linear.app/metabase/issue/QUE-778), [QUE-777](https://linear.app/metabase/issue/QUE-777), [QUE-776](https://linear.app/metabase/issue/QUE-776), [QUE-703](https://linear.app/metabase/issue/QUE-703), [QUE-704](https://linear.app/metabase/issue/QUE-704). ### Description Directly implements `:ident` calculation for legacy MBQL in the QP! Also changes the spelling of compound idents to eg. `join[JoinClauseIdent]__InnerColumnIdent`, `native[CardEntityId]__COLUMN_NAME`, etc. The advantage of this is that NanoIDs cannot contain `[]`, whereas they do contain `_`s. Then we can make sure there's no missing `entity_id`s (a common issue) by looking for `native[]`. `native____` might have happened by accident is the NanoID started with two underscores. This is an unfortunately large PR, but I don't think much can be done to help that. The output of `annotate` becomes `Card.result_metadata`, which is a key **input** to `annotate`. So we have to tackle legacy metadata end to end to produce a healthy PR. (A prior attempt to use the lib and match up the results turned into a cluster of hacks, and required half of these changes anyway, so this direct approach seems more sound.) Most of this logic lives in the `annotate` post-processing middleware, with some support from `add-source-metadata` pre-processing. #### Idents This generates correct idents for proper fields, expressions, aggregations, breakouts, explicit and implicit joins, native queries and models (native and MBQL). #### Safety checks and Guarantees Also adds and strengthens several safety checks in the library and elsewhere. The guarantees I hope we can count on at this point are: - Cards are saved with correct `:ident`s in their `:result_metadata`. - Cards with old `:result_metadata` get (correct) `:ident`s added on read. - Lib can now rely on getting correct idents for all input cards! - Therefore the lib (BE + FE) can compute the ident for **every column**. #### Placeholder idents For native queries, we can only get `result_metadata` from executing them. The usual flow is: - Write the query - Send it as an ad-hoc `/api/dataset` request - Get back `result_metadata` - Save it, passing the `result_metadata` back to the BE. We need a card `entity_id` to create idents for a native query, but an ad-hoc query doesn't have a card yet! The BE now generates a placeholder `entity_id`, which gets replaced on save with the new card's actual `entity_id`. These placeholders contain (1) illegal NanoID characters, and (2) a NanoID, which means they cannot be mistaken for non-placeholder NanoID, and that they are still globally unique, so there's no caching concerns.
-
Romeo Van Snick authored
* Move diagnostics to separate dir * Use correct type for startRule arg * Split up diagnostics into sepearate files per check * Use throw for checks that don't yet * Pull out syntax checks into separate function * Split up lib.diagnoseExpression into helper * Return expressionParts from compiler * Add vist helper that walks Lib.ExpressionParts * Convert check-known-functions to use Lib.ExpressionParts * Convert check-supported-functions to use Lib.ExpressionParts * Convert check-comparison-operator-args to use Lib.ExpressionParts * Convert check-arg-count to use Lib.ExpressionParts * Convert check-case-or-if-arg-count to use Lib.ExpressionParts * Convert check-arg-validators to use Lib.ExpressionParts * Remove legacy visitor * Also pass expression clause to diagnostics * Use pMBQL in diagnose-expression * Stop passing expression to diagnostic checkers * Rename visit to visitor
-
Timofey Kachalov authored
-
Timofey Kachalov authored
-
Phoomparin Mano authored
* replace the export button in dashboard header * use the same download button style for both * add styles for compact download button * change the compact export button style * add download button logic * update data-testid * update dashboard tests in public-resource-downloads * use getDashboardCard helper instead * move question result download to header * remove PDF export localized test * add PublicOrEmbeddedDashboardView loki diffs * use text-primary instead of text-dark for download icons * simplify downloadAndAssert embed logic * simplify classnames merging * revert ExportPdfMenuItem * cleanup TitleAndDescriptionContainer * revert LegendCaption * show the header if headerButtons is not null * standalone question download results only shows up on card hover * always show header if there is a header button * add floating headers when title is hidden * add comment on floating header buttons * use accessible label selectors instead of data-testid * replace question-results-download-button testid with accessible label * cleanup downloadAndAssert logic * update tests * support shared selector * update unit test for PublicOrEmbeddedDashboardPage.enterprise * update unit test for PublicOrEmbeddedDashboardPage.premium * update unit test for PublicOrEmbedded * update localization tests * localize aria-label and re-add label tests * make aria-label "Download as PDF" for all instances * fix question tests on locale hash params * fix tests on disabling downloads * add realHover case to downloadAndAssert * update testid in LegendDescriptionIcon * update public-resource-downloads cypress test * use visibility checks in tests * restore ellipsis button size * restore hover parent state to standalone question * update localization tests that referenced PDF export button * remove eslint-disable directives * update ChartSkeleton * update ChartSkeleton * lift spacing to LegendCaption * use lighter colors for dashcard downloads * add new loki snapshots * use the auto refresh text for locale tests as pdf export text is gone * use the lighter color for all download icons * add new loki snapshots * update test assertions for locale tests
-
appleby authored
-
Tyler Plude authored
-
bryan authored
-
Nicolò Pretto authored
* fix(sdk): use instance locale if no locale is passed * update docs * we do support country codes, we have tests for it * Update e2e/test-component/scenarios/embedding-sdk/locale-on-provider.cy.spec.tsx Co-authored-by:
Phoomparin Mano <poom@metabase.com> * remove manual fallback to "en", site-locale is never undefined as it has a default --------- Co-authored-by:
Phoomparin Mano <poom@metabase.com>
-
Timofey Kachalov authored
-
Sloan Sparger authored
-
Edward Paget authored
Avoids hitting the postgresql query parameter limit when there are more than MAX_UINT16 tables in a database, also should be more efficient to fetch this in a single query.
-
Kamil Mielnik authored
* Use Mantine instead of styled components * Fix centering * Add task and status params * Add TaskStatusPicker * Make picker clearable * Add task picker * Put filters and pagination together * Translate task status * Break down logic * Move loading and error state * Always render something * Make task picker searchable * Add empty state to the table * Fix clear button being transparent * Add useUrlState * Use useUrlState in TasksApp * Move UrlState to its own file * Sort * Rename file * Rename * Clean invalid query params on mount * Prettier * Use Action * Ignore invalid pages * Reuse variable * Fix tests * Add test * Add label to clear button * Remove redundant condition * Add assertions * Improve typing * Be explicit about empty string handling * Add url state to logs * Add download button * Disable the button instead of hiding it * Add query input * Add clear button * Improve copy * Typo * Fix unit tests setup * Improve empty state message * Support location in setup * Add a test for empty state message when filtering * Add a test * Add download button assertions * Add e2e tests * Simplify assertion * Remove redundant element * Add debounce * Fix timezone issue * Extract TasksTable * Move use-url-state to its own directory * Add unit tests for useUrlState * Add test * Refactor * Add more tests * Fix missing import * Add task endpoints mocks * Add TasksApp tests boilerplate * Add pagination test * Add tests for filters * Add more tests * Update tests * Update tests * Add more assertions
-
Romeo Van Snick authored
* Remove unused hooks * Simplify error creation in pratt parser * Simplify CompileError construction and remove unused data
-
Kamil Mielnik authored
* Use Mantine instead of styled components * Fix centering * Add task and status params * Add TaskStatusPicker * Make picker clearable * Add task picker * Put filters and pagination together * Translate task status * Break down logic * Move loading and error state * Always render something * Make task picker searchable * Add empty state to the table * Fix clear button being transparent * Add useUrlState * Use useUrlState in TasksApp * Move UrlState to its own file * Sort * Rename file * Rename * Clean invalid query params on mount * Prettier * Use Action * Ignore invalid pages * Reuse variable * Fix tests * Add test * Add label to clear button * Remove redundant condition * Add assertions * Improve typing * Be explicit about empty string handling * Extract TasksTable * Move use-url-state to its own directory * Add unit tests for useUrlState * Add test * Refactor * Add more tests * Fix missing import * Add task endpoints mocks * Add TasksApp tests boilerplate * Add pagination test * Add tests for filters * Add more tests
-
lbrdnk authored
-
Timofey Kachalov authored
-
Nicolò Pretto authored
make it pass on master
-
lbrdnk authored
* Add sorting * Add test * Adjust ordering for h2 * Use merge instead of union * kondo * Undefined nil ordering among various app dbs
-
Nick Fitzpatrick authored
* temo * enable tracking for shortcuts * amending e2e test
-
- Apr 16, 2025
-
-
Nick Fitzpatrick authored
* Disabled shortcuts when a modal is open on the page * fix context check * removing irrelevant test
-
Uladzimir Havenchyk authored
-
Romeo Van Snick authored
* Convert pratt compiler to use ExpressionParts * Simplify compile by using compileNode helper * Add todo's about casts * Simplify error creation * Make assertions more consistent and translate error messages * Remove any check * Simplify compiler by moving stuff into infix/unary helpers * Remove unused assertions * Remove casts on constant operator names * Add assertions for operators * Wrap top-level literals in a value clause * Handle bigints in pratt compiler * Accept ExpressionParts in Lib.expressionClause * Remove null from ExpressionArgs * Add field and metric to expression operator * Simplify pratt compiler types * Add more tests for equivalent clauses * Return metadata objects directly from field-resolver * Add more operators to type * Create type for field type * Remove resolverPass * Convert resolver to Lib.ExpressionParts * Convert compiler to expressionParts * Fix syntax error * Fix types * Remove unused passes * Fix resolver tests * Add types to top-level literals * WIP: convert untagged expression-parts from #js * Manually unwrap field, segment and metric metadata * Unwrap options in pratt compiler * Remove empty options * Handle normalized expression when diagnosing * Allow customizing field resolver * Fix fuzz tests * Add value to ExpressionOperator * Remove unused TODO's * Use constants in test so types match * Wrap clauses in defineClause and extract list of defined clauses * Forbid setting name on clause config * Use defined clause name as ExpressionOperator * Use getClauseDefinition helper to get clause definitions * Ignore type in filters * Move expression-parts transformation to lib.js * Add type-of method implementations for field, metrics and segments * Trigger change when fast setting custom expression * Remove superflouous casts * Simplify resolver return type * Use reference for top-level fields * Be more specific about types in compiler * Convert operator to string * Add unit test for specific expressions * Fix literals icons * Remove unused matchers * Remove unused option from compiler * Negate number literals directly in compiler * Add expression-clause implementation that takes one argument * Use single-arg version of Lib.expressionParts * Remove TODO * Use helper to compile top level literal * Add effective-type to top-level literals * Remove unused MBQLCLauseMap type * Remove unused import * Add two-argument version of expressionClause * Wait for button to be visible * Add operator to invalid operator assertion * Remove incorrect operator check * Add more specific type to clause name * Always throw if function name is not found * Add overloads to getDefinedClause for known function names * Document the allowFastSet typing hack * Lift operator check * Convert nil to {} in body Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Make expression-parts js conversion more clear * Pass through lib.metadata.calculation/type-of for the type-of implementations * Always throw assertion errors * Use helper to check query invariants * Remove lib.schema.expression/type-of methods * Add test for normalization of uppercase keyword arguments * Allow some normalizers to ignore case * Use threading for lowercase converter Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Structure test better Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> * Remove unused var --------- Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com>
-
Nick Fitzpatrick authored
* adjusting keyboard shortcuts, event names * adding viewing context to dashboard shortcuts * adding unit tests for enforce some sanity
-
Uladzimir Havenchyk authored
* ci: extract build-matrix script * fixup * fixup * add a test * make executable? * checkout * fix path * add tests from .github to file-path * fixup
-
appleby authored
* Log metric data for failures in qp.middleware.metrics/adjust When qp.middleware.metrics/adjust fails to expand a metric, log the metric's name and dataset_query, not just the metric id. Closes QUE-862 * Update test to assert that metric data is present in ExceptionInfo
-
bryan authored
-
Alexander Polyankin authored
-
Kamil Mielnik authored
-
Nicolò Pretto authored
* wip script to build the frankenjar * build/run/test functions that seem to be working * preparing for ci * wip ci workflow * need to run the job "manually" at least one to be able to dispatch it from the gh cli * add workflow_call * bash instead of sh to solve issue of illegal option -o pipefail? * use correct version of node * prepare backend * more envs to ci * make jar run on the background in ci * trying to run a list of specs in ci, tagging with tags probably won't work as tags potentially need to be there on "older" versions of the test * fewer tests so it maybe doesn't timeout * run on prs targerting the pr branch and the target base one :wq * clean up * fix: without --env it wasn't really using the grepTags param:wq * refactor: check for the actual files instead of doing ls* * add back some more test files * add log for ci * remove colors as they're not shown in ci * test: wait for data to load in a flaky test * test: wait for data to load in a flaky test * make sure we're building the EE jar * skip licnese step as we don't need it * move script out of embedding-sdk folder * make curl -s to spam less in ci * refactor: move jops to keep the result job last --------- Co-authored-by:
Uladzimir Havenchyk <uladzimir.dev@gmail.com>
-
Riley Thompson authored
-
lbrdnk authored
* Docstring * Support :unknown task * Add tasks-count * Use tasks-count in the API definition * Rename to total * Add and update tests * docstring
-
metamben authored
Fixes QUE-822
-
Ngoc Khuat authored
-
github-automation-metabase authored
Inspect dependency changes here: Co-authored-by:
Metabase bot <metabase-bot@metabase.com>
-