* add migration
* add table before update to correctly set deactivated_at
* no need for schema
* archive tables
* tests
* note
* include active to index
* guard against nil changes
* doc
* guard against archival
* note
* prper count
* serdes/test
* extra safety guard
* more accurate logging
* use epocSecond
* more error validation
* change suffix
* add rollback mig
* move migrations to v56
* safer
* test(embed-js): migrate tests to use custom element api
* use CreateApiKeyResponse
* Update e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts
Co-authored-by: Phoomparin Mano <poom@metabase.com>
---------
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* 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.
Cards created before v0.55 lack the `:card_schema` field in their revision history. When loading these old revisions, the system throws "Cannot SELECT a Card without including :card_schema" because the Card model's `after-select` expects this field to always be present.
Existing code adds the legacy default `card_schema` value (20) in `revert-to-revision!`. This PR adds the value (20) to old revisions in `revision.clj`'s `after-select`.
This allows users to view revision history and revert cards that were created before the v0.55 upgrade.
* Updates the info and info_filled icons
* use currentcolor fill instead
* remove fixed width and height and rely on viewBox
* tweak svg paths slightly
* fix y position
---------
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
* Ensure we're actually using a cached metadata provider in tests
* Remove profiling code
* Restore accidentally-deleted `native-query-snippet` fn
* Fix accidental edits
* Fix metadata calculation for joins that contain joins
* All Lib tests are passing
* The PR that fixes everything [WIP] [ci skip]
* Test fix 🔧
* Sort namespaces
* Docstring formatting
* [Lib tests] 100 failures, 33 errors.
* [Lib] 98 failures, 24 errors.
* [Lib] 76 failures, 17 errors.
* [Lib] 49 failures, 4 errors
* [Lib] 46 failures, 2 errors.
* [Lib] 15 failures, 0 errors.
* [Lib] 13 failures, 0 errors.
* All Lib tests passing
* [QP tests] 2 failures, 1 error.
* Revert :encode/cache-key
* Minor caching performance improvements
* Fix nest breakouts/cumulative aggregations
* Add some more stuff to lib.core
* Test fixes/cljfmt/kondo
* Test fix 🔧
* Test fixes and fix some busted tests
* OMG CACHE SO MUCH FASTER!!!!!
* Fix MongoDB
* Fix tests and support mock segments
* Code cleanup and test fixes 🔧
* Test fix 🔧
* Fix set versus map
* PR feedback
* cljfmt
* More PR feedback and tighten up the field resolution code a bit
* Some schema cleanup
* PR feedback
* PR feedback
* Add TODO
* PR feedback
* Remove implementation of join `visible-columns` which is the same as :default
* Remove unused Card visible columns
* Restore the Card implementation of visible columns in THIS PR.
Missed this from the big remerge, where login attributes were being
reset to an empty value on jwt login. Also fixed not including the
jwt-group-sync on the initial formik state.
* Added to_session endpoint
* Added to_session endpoint
* Added to_session endpoint
* Added to_session endpoint
* Added to_session endpoint
* Some small cleanup
- remove unnecessary try/catch clauses
- rename/rework unnecessary public wrapper fn
- make `jwt` required for the endpoint
- only return session token, not any JWT data
* Test fixes
---------
Co-authored-by: John Swanson <john.swanson@metabase.com>
* wip: add connection string form prefill feature;
add tests
* Refactor deprecated export format
* Skip jdbc:prefix when parsing
* Add snowflake support
* Add success message
* Add a feedback message when pasting a connection string
* Refactor field mapping
* wip use regexes to parse connection strings
* make port optional
* Add snowflake
* Add bigquery and clickhouse
* Add Athena support
* Add Amazon Redshift
* Improve clickhouse
* Add failure message
* Add databricks and druid
* Add MySQL
* Add presto
* Adapt snowflake, create objectToString helper
* Add Apache Spark
* Add SQL server
* Add Oracle
* Add Starburst
* Add vertica
* Reset connection string input on change of key
* Map only when select db and protocol matches
* Fix and refactor semicolon params parsing
* Add tracking to database string uri parsing
* create mapping config with placeholders
use placeholders also in tests
* Create engineKeys types
* Create Cypress paste command using synthetic react events
* Use fade transition for feedback animation
* Add e2e tests for connection strings form filling
* fill in display name from connection string
* Add succes failure text test
* Validate form after filling in fields
* Use more standard fallback for paste
* Remove unused regex parsing implementation
* use mass setFields for fomik setting values
* Add test case for clearing existing values, including engine select field
* Fix form fields being overwritten when pasting connection string
* Add onPaste behavior and use simpler paste mechanism in Cypress
* Fix typo
* Extract and use engineKey type and isEngineKey guard
* Make connection string field controlled by formik
Fix submit values
Fix type error
* Remove unneeded prop justify
* Run regex just for currently selected db
* Fix naming of the test file
* Add e2e db connection test
* Fix missing path in th rspack emedding setup
* Explain why connection string is not sent to BE
* use pojo instead of map for db engines config
* Revert to * export to maintain consistency
* fix connection string test
* create a more meaningful type name
* Add result_metadata perms check to qp
* Check result metadata view data on card put
* Throw the exception
* Test
* Add perm check for ad-hoc referencing cards
* Docstrings
* Use seq
* Order of checks
* Apply suggestions from code review
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
* Simplify into
---------
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
* add table link to metadata page
* Table
* Add a e2e test
* Add a e2e test
---------
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
When streaming data for a query, we were only including columns if a)
the viz settings for the column were completely empty, or if b) the viz
settings for the columns included specifically enabling that column.
The problem occurs most clearly for things like native SQL queries.
If you construct a query like
```
SELECT id FROM venues;
```
and then set the column viz settings to *something* non-empty (most easy
way: just hide the `id` column and then show it again), and then save
the card, then change the query to:
```
SELECT id, name FROM venues;
```
then if you download the CSV for this card (even after saving it!)
you'll get a result that only contains `id` and not `name`.
A few tests needed to change here because they were implicitly assuming
the old behavior, but I don't think that's entirely intentional. This
behavior was different than the behavior in the Metabase application
proper, where UI results would show all the columns (in the above
example, they'd immediately show `id` *and* `name`).
* jwt edits
* Optimized 2 images, saved 188.8 KB (46.0% smaller)
* why are y'all 'waiting for the status to be reported'
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
* Create Upsell CTA component
* Replace pro labe with gem in embed upsell
* Create and use UpsellCta in Embedding Upsell
* Rebuiltd the logic for showing links and upsells in embedding modal
* Add UpsellCta tests
* Remove unneeded hook
Fix test and URL rendering for hosted
* Remove unneeded hook useInteractiveEmbeddingCta
* Fix test not running in target build (OSS)
* Fix embedded modal ee end premium cloud tests
* Add missing translation tag
* Use single upsellcta styling
* feat: promote uberjar as the single uberjar creation workflow
* chore: remove useless reuse-existing-artifacts
* refactor: streamline PR environment workflow by removing wait_for_uberjar input and simplifying uberjar retrieval
* fix: ensure default editions are used if container info retrieval fails
* chore: don't build uberjar outside of run-tests
* fix: update uberjar artifact name to use the current SHA instead of PR head SHA
* fix: update uberjar artifact names to use PR head SHA when available
* fix: update uberjar workflow to simplify input parameters and improve conditional checks
* fix: add concurrency settings to uberjar workflow
* fix: update documentation condition in run-tests workflow
* fix: add default node version
* fix: update conditions for container info retrieval and containerization steps
* fix: update default node version to 22 in uberjar workflow
* Update .github/workflows/uberjar.yml
* Update .github/workflows/uberjar.yml
---------
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
* 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>
was blocking on startup
stacktrace below is representative. has a few other things like reveal
but shows that we get into a huge loop over all cards and you end up
waiting for the instance to be ready for a long time
```
at metabase.lib.card$fn__77290$fn__77297.invoke(card.cljc:71)
at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303$fn__77304.invoke(card.cljc:141)
at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
at clojure.core$reduce.invokeStatic(core.clj:6964)
at clojure.core$mapv.invokeStatic(core.clj:7050)
at clojure.core$mapv.invoke(core.clj:7050)
at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303.invoke(card.cljc:141)
at metabase.lib.card$fn__77302$fn__77308.invoke(card.cljc:120)
at metabase.lib.card$fn__77316$card_cols_STAR_77315__77317.invoke(card.cljc:163)
at metabase.lib.card$fn__77316$fn__77322.invoke(card.cljc:157)
at metabase.lib.card$fn__77350$card_metadata_columns77349__77351.invoke(card.cljc:223)
at metabase.lib.card$fn__77350$fn__77354.invoke(card.cljc:217)
at metabase.lib.card$eval77367$_AMPERSAND_f__77368.invoke(card.cljc:257)
at metabase.lib.card$eval77367$fn__77372.invoke(card.cljc:242)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.lib.field.resolution$fn__80775$resolve_in_card_returned_columns80774__80776.invoke(resolution.cljc:352)
at metabase.lib.field.resolution$fn__80775$fn__80784.invoke(resolution.cljc:346)
at metabase.lib.field.resolution$fn__80788$resolve_in_card_or_stage_metadata80787__80789.invoke(resolution.cljc:365)
at metabase.lib.field.resolution$fn__80788$fn__80801.invoke(resolution.cljc:358)
at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invokeStatic(resolution.cljc:410)
at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invoke(resolution.cljc:390)
at metabase.lib.field.resolution$fn__80844$resolve_from_previous_stage_or_source80843__80845.invoke(resolution.cljc:440)
at metabase.lib.field.resolution$fn__80844$fn__80861.invoke(resolution.cljc:434)
at metabase.lib.field.resolution$fn__80865$resolve_field_ref80864__80867.invoke(resolution.cljc:471)
at metabase.lib.field.resolution$fn__80865$fn__80878.invoke(resolution.cljc:457)
at metabase.lib.field$eval80922$_AMPERSAND_f__80923.invoke(field.cljc:62)
at metabase.lib.field$eval80922$fn__80925.invoke(field.cljc:60)
at clojure.lang.MultiFn.invoke(MultiFn.java:239)
at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680$fn__74681.invoke(calculation.cljc:287)
at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680.invoke(calculation.cljc:286)
at metabase.lib.metadata.calculation$fn__74679$fn__74684.invoke(calculation.cljc:275)
at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329$fn__80331.invoke(breakout.cljc:43)
at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
at clojure.core$reduce.invokeStatic(core.clj:6964)
at clojure.core$mapv.invokeStatic(core.clj:7050)
at clojure.core$mapv.invoke(core.clj:7050)
at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329.invoke(breakout.cljc:42)
at metabase.lib.breakout$fn__80328$fn__80334.invoke(breakout.cljc:35)
at metabase.lib.stage$fn__81784$breakouts_columns81783__81785.invoke(stage.cljc:59)
at metabase.lib.stage$fn__81784$fn__81787.invoke(stage.cljc:55)
at metabase.lib.stage$fn__81843$summary_columns81842__81844.invoke(stage.cljc:92)
at metabase.lib.stage$fn__81843$fn__81846.invoke(stage.cljc:86)
at metabase.lib.stage$eval81986$_AMPERSAND_f__81988.invoke(stage.cljc:290)
at metabase.lib.stage$eval81986$fn__81996.invoke(stage.cljc:283)
at clojure.lang.MultiFn.invoke(MultiFn.java:244)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:513)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:510)
at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
at metabase.queries.models.card$dataset_query__GT_dimensions.invokeStatic(card.clj:1270)
at metabase.queries.models.card$dataset_query__GT_dimensions.invoke(card.clj:1262)
at metabase.queries.models.card$extract_non_temporal_dimension_ids.invokeStatic(card.clj:1277)
at metabase.queries.models.card$extract_non_temporal_dimension_ids.invoke(card.clj:1274)
at metabase.search.ingestion$execute_function_attr.invokeStatic(ingestion.clj:68)
at metabase.search.ingestion$execute_function_attr.invoke(ingestion.clj:63)
at metabase.search.ingestion$execute_all_function_attrs$fn__131886.invoke(ingestion.clj:80)
at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1309)
at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1314)
at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
at clojure.lang.PersistentHashMap.kvreduce(PersistentHashMap.java:238)
at clojure.core$fn__8559.invokeStatic(core.clj:6987)
at clojure.core$fn__8559.invoke(core.clj:6967)
at clojure.core.protocols$fn__8287$G__8282__8296.invoke(protocols.clj:174)
at clojure.core$reduce_kv.invokeStatic(core.clj:6998)
at clojure.core$reduce_kv.invoke(core.clj:6989)
at metabase.search.ingestion$execute_all_function_attrs.invokeStatic(ingestion.clj:76)
at metabase.search.ingestion$execute_all_function_attrs.invoke(ingestion.clj:73)
at metabase.search.ingestion$__GT_document.invokeStatic(ingestion.clj:87)
at metabase.search.ingestion$__GT_document.invoke(ingestion.clj:85)
at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
at medley.core$distinct_by$fn__15232$fn__15233.invoke(core.cljc:290)
at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
at clojure.core$completing$fn__8562.invoke(core.clj:7010)
at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
at toucan2.pipeline$with_init$fn__51829.invoke(pipeline.clj:327)
at clojure.core$completing$fn__8562.invoke(core.clj:7010)
at toucan2.jdbc.result_set$reduce_result_set.invokeStatic(result_set.clj:156)
at toucan2.jdbc.result_set$reduce_result_set.invoke(result_set.clj:125)
at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:51)
at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
at toucan2.pipeline$transduce_execute$with_connection_STAR___51727.invoke(pipeline.clj:78)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
at clojure.lang.Var.invoke(Var.java:401)
at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
at clojure.lang.AFn.applyToHelper(AFn.java:160)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:669)
at clojure.core$apply.invoke(core.clj:662)
at toucan2.pipeline$reducible_fn$reify__51862.reduce(pipeline.clj:404)
at clojure.core$transduce.invokeStatic(core.clj:7025)
at clojure.core.Eduction.reduce(core.clj:7874)
at clojure.core$reduce.invokeStatic(core.clj:6964)
at clojure.core$reduce.invoke(core.clj:6947)
at metabase.util$rconcat$reify__16182.coll_reduce(util.cljc:1188)
at clojure.core$transduce.invokeStatic(core.clj:7026)
at clojure.core.Eduction.reduce(core.clj:7874)
at clojure.core$transduce.invokeStatic(core.clj:7025)
at clojure.core$transduce.invokeStatic(core.clj:7021)
at clojure.core$transduce.invoke(core.clj:7012)
at metabase.search.appdb.index$index_docs_BANG_.invokeStatic(index.clj:279)
at metabase.search.appdb.index$index_docs_BANG_.invoke(index.clj:275)
at metabase.search.appdb.core$populate_index_BANG_.invokeStatic(core.clj:169)
at metabase.search.appdb.core$populate_index_BANG_.invoke(core.clj:168)
at metabase.search.appdb.core$eval132669$fn__132671.invoke(core.clj:182)
at clojure.lang.MultiFn.invoke(MultiFn.java:234)
at metabase.search.core$init_index_BANG_$iter__133794__133798$fn__133799.invoke(core.clj:91)
at clojure.lang.LazySeq.force(LazySeq.java:50)
at clojure.lang.LazySeq.realize(LazySeq.java:89)
at clojure.lang.LazySeq.seq(LazySeq.java:106)
at clojure.lang.RT.seq(RT.java:555)
at clojure.core$seq__5488.invokeStatic(core.clj:139)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
at clojure.core.protocols$fn__8266.invokeStatic(protocols.clj:74)
at clojure.core.protocols$fn__8266.invoke(protocols.clj:74)
at clojure.core.protocols$fn__8207$G__8202__8220.invoke(protocols.clj:13)
at clojure.core$reduce.invokeStatic(core.clj:6965)
at clojure.core$reduce.invoke(core.clj:6947)
at metabase.search.core$init_index_BANG_.invokeStatic(core.clj:88)
at metabase.search.core$init_index_BANG_.doInvoke(core.clj:80)
at clojure.lang.RestFn.invoke(RestFn.java:411)
at metabase.search.task.search_index$init_BANG_$fn__173098.invoke(search_index.clj:38)
at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394$with_transaction_STAR___126395.invoke(cluster_lock.clj:61)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at metabase.app_db.connection$do_transaction$thunk__61025.invoke(connection.clj:145)
at metabase.app_db.connection$do_transaction.invokeStatic(connection.clj:164)
at metabase.app_db.connection$do_transaction.invoke(connection.clj:141)
at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:201)
at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:174)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394.invoke(cluster_lock.clj:53)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invokeStatic(connection.clj:18)
at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invoke(connection.clj:15)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at metabase.app_db.connection$do_with_connection_primary_method_default.invokeStatic(connection.clj:132)
at metabase.app_db.connection$do_with_connection_primary_method_default.invoke(connection.clj:130)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
at methodical.util.FnWithMeta.invoke(util.clj:46)
at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invokeStatic(cluster_lock.clj:53)
at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invoke(cluster_lock.clj:51)
at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407$do_with_cluster_lock_STAR__STAR___126409.invoke(cluster_lock.clj:78)
at clojure.lang.AFn.applyToHelper(AFn.java:152)
at clojure.lang.AFn.applyTo(AFn.java:144)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:662)
at metabase.util.retry$decorate$fn$reify__126370.call(retry.clj:110)
at io.github.resilience4j.retry.Retry.lambda$decorateCallable$5(Retry.java:306)
at metabase.util.retry$decorate$fn__126369.doInvoke(retry.clj:111)
at clojure.lang.RestFn.invoke(RestFn.java:400)
at metabase.util.retry$fn__126375$make126374__126376$fn__126377.invoke(retry.clj:120)
at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:82)
at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:75)
at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:37)
at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:33)
at metabase.search.task.search_index$eval173156$fn__173157.invoke(search_index.clj:46)
at metabase.startup.core$run_startup_logic_BANG_$fn__173079.invoke(core.clj:30)
at metabase.startup.core$run_startup_logic_BANG_.invokeStatic(core.clj:28)
at metabase.startup.core$run_startup_logic_BANG_.invoke(core.clj:24)
at metabase.core.core$init_BANG__STAR_.invokeStatic(core.clj:181)
at metabase.core.core$init_BANG__STAR_.invoke(core.clj:117)
at metabase.core.core$init_BANG_.invokeStatic(core.clj:194)
at metabase.core.core$init_BANG_.invoke(core.clj:189)
at dev$init_BANG_.invokeStatic(dev.clj:143)
at dev$init_BANG_.invoke(dev.clj:139)
at dev$start_BANG_.invokeStatic(dev.clj:180)
at dev$start_BANG_.invoke(dev.clj:176)
at dev$eval206099.invokeStatic(NO_SOURCE_FILE:1)
at dev$eval206099.invoke(NO_SOURCE_FILE:1)
at clojure.lang.Compiler.eval(Compiler.java:7739)
at clojure.lang.Compiler.eval(Compiler.java:7729)
at clojure.lang.Compiler.eval(Compiler.java:7694)
at clojure.core$eval.invokeStatic(core.clj:3232)
at clojure.core$eval.invoke(core.clj:3228)
at vlaaad.reveal.repl$wrap_eval$fn__37945.invoke(repl.clj:90)
at clojure.main$repl$read_eval_print__9248$fn__9251.invoke(main.clj:437)
at clojure.main$repl$read_eval_print__9248.invoke(main.clj:437)
at clojure.main$repl$fn__9257.invoke(main.clj:459)
at clojure.main$repl.invokeStatic(main.clj:459)
at clojure.main$repl.doInvoke(main.clj:368)
at clojure.lang.RestFn.applyTo(RestFn.java:140)
at clojure.core$apply.invokeStatic(core.clj:667)
at clojure.core$apply.invoke(core.clj:662)
```
Previously we were treating all currency formatting as if we were in a
table, and only adding the currency symbol if `currency-in-header` were
explicitly set to `false` for the column.
When formatting a scalar value, though, we want to always add the
currency symbol inline (since there is no header in this case).
I found that `metabase.channel.render.body/format-cell` and
`metabase.formatter.core/format-number` were actually only used to
format *scalar* cells and *scalar* numbers (as opposed to cells in a
table), so I renamed them for a bit more clarity and added a new
optional argument, `scalar?`, to
`metabase.formatter.core/number-formatter`. When passed (and truthy) the
currency symbol will be splatted into the formatted number even if
`:currency-in-header` is not `false`.
* minor edits
* Update docs/permissions/row-and-column-security.md
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
---------
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
instead just pass `(not-empty q)` to the search subsystem, which will
convert it to `nil` if it's empty and pass it unchanged if it's not.
I still don't think this is probably the ideal user experience when you
navigate to `/search` but it's not an error at least.
* UXW-382 Updates "Public link" menu item for admins when public links aren't enabled so it doesn't look obviously broken
* UXW-382 Updates tests
* UXW-382 Updates "enable public links" menu item to be disabled per PR feedback
* UXW-382 Swaps core styles for mantine props per PR feedback
* fix: issues generating valid urls for map tiles
Fixes to issues generating map tiles, one is on x-ray dashboards we need
to check that we're not in a real dashboard and send an ad hoc tile
request.
Second if the field ref sent in the request has options we need to
remove the 'base-type' option because the type will be encoded as
something like test%2FFloat and the way Jetty decodes URLs before
parsing turns it into a '/' in a position a path separator cannot be:
https://github.com/jetty/jetty.project/issues/7713
* fixup! typeguard dashbaord id
* Update maps.cy.spec.js
* fixup! better handle null field opts
* Re-implementation of `metabase.driver.common.parameters.*` that uses Lib
* Fix Kondo warnings
* Move tests that have nothing to do with drivers to QP
* Test fixes 🔧
* Test fixes 🔧
* Try simplifying the PR
* db routing for redshift
* simplify test
* dataset name multimethod
* small change
* use delayed defs
* add redshift ci routing env var
* small fix
* update dataset definitions
* change back to original data
* feat: driver/do-with-resilient-connection
* feat: :keep-open? option to do-with-connection-with-options
* feat: attempt describe-database with resilient connection
* feat: execute jdbc query with retry conn
* test
* avoid recursive issues
* simplify
* changelog
* type hint
* force local conn, so the connection being closed won't close outer unrealized result sets
* working test
* more test
* opts
* style
* add test for connection options
* notes
* fix test
* docstring
* Update src/metabase/driver/sql_jdbc/execute.clj
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* logs
* better logs
* try to close conn when it's no longer valid
* pull out logic to is-conn-open
* is-conn-open? test
* clarify
* Update docs/developers-guide/driver-changelog.md
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* update version
* chore: move tests to right namespace
* retry have select privilege on error
* add test
* improve test
* remove let
* separate connection for each test
* clean up test
* try druid jdbc ci fix
* close connection during test
* use do with resilient connection in test for druid
* formatting
* always set role if supported
* Fix clickhouse and sqlserver
* impersonation test
* use normal-driver-select
* address comments
* kondo
* remove debug
---------
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* UXW-28 Adds confirmation modal when deleting a tab that contains dashboard-only cards
* UXW-28 Makes confirmation modal smarter; uses short version if all questions on a tab are dashboard questions, lists affected questions if it's a mix
* UXW-28 Adds tests
* feat: driver/do-with-resilient-connection
* feat: :keep-open? option to do-with-connection-with-options
* feat: attempt describe-database with resilient connection
* feat: execute jdbc query with retry conn
* test
* avoid recursive issues
* simplify
* changelog
* type hint
* force local conn, so the connection being closed won't close outer unrealized result sets
* working test
* more test
* opts
* style
* add test for connection options
* notes
* fix test
* docstring
* Update src/metabase/driver/sql_jdbc/execute.clj
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* logs
* better logs
* try to close conn when it's no longer valid
* pull out logic to is-conn-open
* is-conn-open? test
* clarify
* Update docs/developers-guide/driver-changelog.md
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* update version
* chore: move tests to right namespace
* impersonation test
* use normal-driver-select
* trigger CI
---------
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
* feat(simple-embed): parse attributes with json5 to be more permissive with quotes
* Update package.json
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
* fix tests
* Apply suggestion from @heypoom
Co-authored-by: Phoomparin Mano <poom@metabase.com>
---------
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* Remove debugging stuff
* 14 failures, 1 error.
* 10 failures, 1 error.
* 10 failures, 0 errors.
* Better log messages
* Faster field ref resolution
* Test fixes 🔧
* Some test fixes 🔧
* Remove resolve-joined-fields middleware
* Fix lib.underlying calculation of fields with join aliases
* Fix busted pivot tests
* Remove unused fn
* More resolution fixes
* drill-thru use vars so we can get updated fns in the REPL
* Consolidate the lib metadata => legacy metadata functions
* Add a pile of additional tests
* Migrate the `resolve-joined-fields` middleware (#39884)
* Support automatically removing duplicate refs in `:fields` and `:breakouts` during normalization
* More cleanup and extra tests 🔧
* Add ::mbql.s/OrderBys
* Mess with logging in resolution even more
* Order bys should be distinct ignoring keys like :base-type or namespaced keys
* I have fixed#60587
* One last round of test fixes??
* Test fix
* Code cleanup
* Fix test failures 🔧
* MongoDB test fix
* Fix Oracle test 🔧
* MongoDB test fix 🔧
* cljfmt
* e2e test fix?
* Test fix 🔧
* Less noisy logging
* Improve field resolution for implicit joins; PR feedback (part 1)
* PR feedback (part 2) and extra dox
* Run tests if files in lib/drivers/qp are changes
check src/metabase/lib, src/metabase/query_processor, modules/drivers
we key off of team label but this is hopefully close enough to what we
really want
* run an action linter
```
❯ actionlint /Users/dan/projects/work/metabase/.github/workflows/drivers.yml
.github/workflows/drivers.yml:440:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
.github/workflows/drivers.yml:537:15: description is required in metadata of "Wait for localhost port to be ready" action at "/Users/dan/projects/work/metabase/.github/actions/await-port/action.yml" [action]
|
537 | - uses: ./.github/actions/await-port
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:587:13: description is required in metadata of "Test database driver" action at "/Users/dan/projects/work/metabase/.github/actions/test-driver/action.yml" [action]
|
587 | uses: ./.github/actions/test-driver
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:743:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
```
acitonlint seems pretty nice
not fixing the exclude-tag since that seems to work just fine
* fix syntax
* fetch base branch for file checks
to see if we changed files, need the base
* indentation is fun. super fast iteration
* resequence if before run
* run third tier on devex team label
* empty to poke CI
* make prepare-statement private
probably good for this to be private either way, but this is done now to
kick CI and run tests that aren't running in CI
* close single quote
We're using a setting as a half-baked way to track whether we've ever
created a non-table chart. We do this regardless of whether you're an
admin or not, but the endpoint responds with a 403 if you're not an
admin.
Honestly motivation here was fixing [UXW-152: 403 thrown for non-admins
when viewing question re:
non-table-chart-generated](https://linear.app/metabase/issue/UXW-152/403-thrown-for-non-admins-when-viewing-question-re-non-table-chart)
but it feels a little silly. But... it's not *completely* unreasonable.
* dev: add the ability to run native ddl as part of dataset definitions
* Fixing tests
* Fix kondo
* Fix tests and kondo
* Fix clickhouse tests
* Fix another clickhouse test
* Fix bigquery test
* Fix bigquery test
* Trigger Build
* fix: filter-out non-string attributes
We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.
* feat: auto assign jwt users to groups by name
When group sync is turned on and there are no group mappings defined for
the jwt integration.
* fixup! remove tenant user group
* fixup! correct bad merge
* fixup! remove some tenant_ids in tests
* fixup! more test fixes
* feat: make jwt group attribute admin configurable
* feat: update group mapping text for jwt behavior
* feat(new-embed): log an error when the parsing of a json attribute fails
* Update enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/webcomponents.ts
Co-authored-by: Phoomparin Mano <poom@metabase.com>
---------
Co-authored-by: Phoomparin Mano <poom@metabase.com>
* fix: allow scalar user-attributes
Only drop collections which cannot be converted to strings when
generating database queries.
* fixup! remove unused namespace
* fixup! use keep to retain false booleans
* fix: filter-out non-string attributes
We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.
* feat: auto assign jwt users to groups by name
When group sync is turned on and there are no group mappings defined for
the jwt integration.
* fixup! remove tenant user group
* fixup! correct bad merge
* fixup! remove some tenant_ids in tests
* fixup! more test fixes
* feat: make jwt group attribute admin configurable
The workflow in the `metabase-ee-extra` repository could run before the
container image tags were created by the workflow in the `metabase`
repository, causing the former to fail. Fix by making the image push
an explicit dependency of the ee-extra trigger.
This works by just totally removing the permission grants created by
sandboxes. Instead we use the `gtapped-table` flag added by the
sandboxing middleware to add just the gtapped-table itself to set of
necessary table create-query permissions and exclude any joined tables
from being added to this set.
If those tables are included elsewhere in the query (not the part
created by the sandbox), they will be added to the set of tables to
check normally and the query will be blocked if the user doesn't have
query-builder perms.
Child collections are automatically created with the same namespace as
their parent collection. Since we enforce a validation that this must be
true it seems simpler for api clients to have this value set for them
rather than requiring them to supply the namespace attribute (though it
still remains optional to pass one.)
* fix: filter-out non-string attributes
We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.
* feat: auto assign jwt users to groups by name
When group sync is turned on and there are no group mappings defined for
the jwt integration.
* fixup! remove tenant user group
* fixup! correct bad merge
* fixup! remove some tenant_ids in tests
* fixup! more test fixes
* Update common.clj
* wip
* experiment of callback to see if it works on vue with .callback={}
* basic e2e test for dashboard
* more tests and cleanup
* remove my-app playground
* rm unused file
* use custom elements for the preview
* support for async and defer, defaulting to defer
* clean up custom elements code
* rename drills props
* Revert "experiment of callback to see if it works on vue with .callback={}"
This reverts commit 89a38dca47.
* fix theme not being restored from persisted settings
* fix: load script for preview from instance url, make iframe loaded data
attribute work
* change the snippet to use new defer syntax
* support for exploration with question-id=new
* cleanup
* fix types
* Revert "fix types"
This reverts commit bbc8eb8b59.
* Revert "support for exploration with question-id=new"
This reverts commit 4c3f041629.
* reimplement support for exploration
* fix parameters conditional rendering
* fix linting issues
* fix embed code snippet
* fix(new-embed): allow multiple questions/dashboards on the same page
* test for multiple questions
* add note about theme
* feat(sdk): expose the title prop in StaticQuestion (#61001)
* attempot to make tests more stable
* fix types
* maybe fix tests?
* test for ci
* put back support for is-save-enabled
* H.getIframeBody -> H.getSimpleEmbedIframeContent as it should be less flaky
* restore logic
* fix exploration not working in test
* moved comment to the correct place
* potential fix for handleMessage, ignore messages from other iframes
* use question for exploration templates
* fix type errors
* skip flaky "persists default and hidden parameters"
* fix template: exploration in embed flow
* always enable embedding-simple on embed flow tests
* refactor the custom elements tests to use the generic helpers
* fix tests :fingercrossed:
* default title to true
* update helper to grab the first 37.65
* default drills to true
* we're now showing the title by default
---------
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
* Do not add new extra empty stages when converting a join from legacy
* Update gitignore
* Simplified fix for #60444
* Fix QUE-1607
* Test fix 🔧
* Fix QUE-1621
* Additional tests.
* Test fix 🔧
* Remove dead code -- schemas for idents in legacy MBQL schema
* Test fix 🔧
* Fix QUE-1623
* Test fix 🔧
* Fix failing tests
* Test fixes 🔧
* Make sure join metadata goes in the right place
* Additional tests
* Make sure join metadata goes in the right place
* Less verbose logging
* Test fixes 🔧
* Some extra tests 🔧
* Another test fix 🔧
* Remove unused export
* Cleanup
* Code cleanup
* Update tests 🔧
* test fixes
* Improve/fix metadata calculation
* Test fixes 🔧
* Update tests
* Test fix 🔧
* Test fixes 🔧
* Test fix 🔧
* Test fixes 🔧
* PR feedback
* Test fix 🔧
* allow tenant attributes CRUD (#60347)
wip merge user and tenant attributes
WIP use new api
Split Mapping Editor
types fixed
so much unit testing
handle null cases
update tests
update a couple more e2e tests
less silly test
make things nicer
invalidate user cache on tenant update
* feat: separate jwt-set attributes from manual-set
* fixup! typescript stuff
* feat: restore structrue-attributes merging
Co-Authored-by: Dan Sutton <dan@metabase.com>
* feat: use merged attributes in routing/sandbox/etc
Co-Authored-By: John Swanson <john.swanson@metabase.com>
* fixup! move group manager test to ee
* fixup! kondo
* fixup! modal spec
* fixup! cypress tests
* fixup! migration timestamp
* fixup! one more cherry pick oopsie
* fixup! sandboxing cypress helper fixes
* fixup! more cypress updates
* fixup! remove eslint directive
* fixup! remove 2-arity router-dbor-id->destination-db-id
All the places it was called with 2-arity were explicitly passing in
@api/current-user anyway
---------
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Dan Sutton <dan@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
* fix: handle headerless translations csv
* fixup! PR feedback
Also fixes an issue with error line number reporting without headers
* feat: allow csv headers to be in any order
* fixup! error reporting test
* fix: remove categories on push
* fix: run each project individually
* fix: run jobs in parallel with pom caching
* fixup! dry it up
* Update snyk.yml
* chore: test deeply nested cards with mixed perms
* chore: test custom expressions and aggregations
* chore: add more tests for blocks and joins
* fixup! whitespace
* fixup! remove confusing comments
Fixes#61253.
Here's the breakdown of the issue, since it's subtle:
- These objects can contain some vanilla JS objects which in embedding
contexts can be `Object.preventExtensions()`'d.
- Eg. the `:visualization-settings` on a card or metric.
- `lib.metadata.cache` uses these objects as part of the cache key.
- Those become the keys of a CLJS map, which uses `cljs.core/hash`
- JS objects and arrays have pointer equality (`identical?` or `===`)
semantics.
- The default `cljs.core.IHash/-hash` uses `goog.getUid(obj)`.
- That subtly mutates objects, adding a non-`enumerable`
`closure_uid_123456789` property with an arbitrary sequence number.
- That's adding a property, which is a violation if
`Object.preventExtensions()` (or `Object.freeze()`) has been used.
- That silently does nothing by default, but throws in strict mode.
This PR modifies the cache key logic (which already has special handling
for `:lib/metadata`) to replace `:lib/type :metadata/card` and
`:metadata/metric` maps with a stub like `[:metric/card 123]`.
* drop unused redux functions
* drop time parsing in event cards
* replace moment types with dayjs
* use dayjs for tz guessing
* drop moment from a hook
* drop unused time functions
* Do not add new extra empty stages when converting a join from legacy
* Update gitignore
* Fix QUE-1607
* Test fix 🔧
* Fix QUE-1621
* Additional tests.
* Test fix 🔧
* Remove dead code -- schemas for idents in legacy MBQL schema
* Test fix 🔧
* Fix QUE-1623
* Test fix 🔧
The test gives a bit of false confidence, as it passed before we added the forced re-indexing at the end of the import.
We probably want a way to keep the transaction open until after the ingestor has processed the messages from the toucan hooks... but that sounds quite invasive and brittle to pull off.
If a locale is not defined for metabase we should not allow
content-translation dictionaries to uploaded with it. Since these
locales can't be used anyway it results in a confusing user experience.
@nvoxland i *think* this was a stray and not necessary for your metabot
changes but we can add it back along with `dev/src/api/routes.clj` if
i'm wrong!
to read a snapshot, you need:
- read perms on the collection its report is in, if it has a report
attached, OR
- to be the person who created the snapshot in the first place.
to write a snapshot, you need to be a superuser.
we'll need to update the frontend to request `report` models, and then
handle them correctly there (with a special icon and links). For now
this won't have any effect, since the FE is selecting specific models
and that doesn't include reports.
* Populate search index col of non temporal dimension ids using clojure fn
* Add non_temporal_dim_ids filter param to search request
* fix kondo
* Add stub impl of new filter to in-place
* Add metadata provider cache
* Adding has-temporal-dim filter; fix tests
* fix lint
* Fix merge
* Hookup frontend to proper BE search filters; remove deprecated impl of has-temporal-dimensions
* Fix kondo
* Fix lingering refs to has-temporal-dimensions
* Fix lingering refs to has-temporal-dimensions
* fix test
* Fix test
* Remove FE compatibility code that was ported to BE; fix typing of partition helper
* Add helper for parsing non-temporal-dim-ids endpoint param; fix the conditional in FE
* remove debug let
* Add pr ref to comment
* Include dimension filter params in request only if cartesian
* remove specs that depended on checkDimensionCompatibilityForCartesianCharts
* PR feedback
* use existing dataset query transform
* Optimized 1 images, saved 76.0 KB (48.2% smaller)
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
* Prg-81-implement-logic-for-opening-store-and-receiving-messages (#60702)
* Add new self hosted upsell flow path
* Add upsell flow hook
* Add company name to params passed to store
* Update url parameters to snake case
* Remove redundant ampersand
* Clean up useEffect dependencies
* Add store origin to token activation message
* Improve put token mock
* Snake case return_url param
* Update messages' types
* Add source check on event
* Use dynamic store value (#60865)
* Create selector for store url
* Use dynamic store value in use upsell flow
* Improve store url selector
* Create useStoreUrl hook and deprecate getStoreUrl selector
* Increase the timeout of toast messages (#60966)
* increase the timeout of toast messages
* Send notification even if reference to store window was lost
* Add metabase window name (#60964)
* Prg-91-migrate-upsell-components-to-support-ee-upsell-flow (#60850)
* Enhance upsell functionality by adding onClick support to UpsellBanner and integrating useUpsellFlow in admin settings
Fix function name
* Use match pattern in UpsellBanner
* Add Upsell baner with click stories and tests
* Add upsell flow to dev instances banner
* Integrate upsell flow into UpsellBanner components
* Fix unrelated tests
* Improve the test assertion
* Prg-95-migrate-upsellcard-to-the-new-upsell-flow (#60989)
* Add onClock to UpsellCard component
* Migrate UpsellCard components to use self hosted upsell flow
* Disable new flow in dev instances upsell (#61048)
* Allow overriding store-url in dev env (#60967)
* Fix upsell flow with undefined store variable (#61056)
* Show failure toast even if connection with store was lost
* Add store-url to e2e default db setup
* Allow undefined store-url value in use upsell flow
* Fix failing unit tests
* Prg 96 migrate upsellbigcard to the new upsell flow (#61063)
* Migrace BigCard to use onClick
* Migrate BigCard upsells
* Add onClick to UpsellPill (#61076)
* Prg-104-run-the-new-upsell-flow-only-for-self-hosted-mb-instances (#61122)
* Disable new upsell flow on hosted instances
* Fix wrong match on UpsellBigCard
* Use getIsHosted selector
add test
* Fix e2e test - selecting upsell button
* Fix extra toast triggered with new upsells
* Add upsell flow to embedding ugprade link, remove binary notice from EE self serve (#61207)
* Fix typos
* Use existing link styles
Add collection_id to reports, optionally allow setting it in API
endpoints (POST and PUT), enforce perms as follows:
- POST and PUT require superuser
- GET endpoints require read perms on the container collection
make sure snapshotted cards have it set, exclude it from the collection
view and entity picker.
update the report editor to use the returned card id from the snapshot endpoint
* Fix tags invalidation for bulk tables update
* Add MassTableVisibilityToggle
* Render mass toggle for schemas
* Add the button for dbs
- fix not-currently-selected branches in the tree not updating
* Fix types
* Align icon
* Align chevron icon
* Always show the toggle button for hidden tables
* Change color of hidden tables
* Only use ids of relevant tables
* Add tests
* Add test
* Take all visibility options into account
* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
* Fix color
* Render table picker items as anchors
* Remove measuring elements as elements have constant size
* Fix types and tests
* Add test
* [Lib] Finish removing idents
* Fix Kondo warnings
* cljfmt
* Another pass at fixing Kondo warnings
* Test fix 🔧
* Test fix 🔧
* Test fixes 🔧
* A few more fixes 🔧
* Another pass
* Test fix 🔧
* Test fixes 🔧
* Test fix 🔧
* Test fixes 🔧
Suspecting that instances OOM due to loading these into
memory. Increasing context and logging to help diagnose this:
When running tests:
```
clj -X:dev:test :only '["test/metabase/notification" "test/metabase/pulse"]'
...
DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 57167}
[main] DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 718167}
[main] INFO metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
[main] INFO metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
```
Adding an optional preamble that is just `pr-str`'d and logging a human
readable size of the file that is saved
* add-dimension-projections middleware => Lib (#39877)
* Ban mt/with-column-remappings inside QP tests
* Update pivot QP code to not convert to legacy
* Rename middleware
* Use the remap metadata provider in sandboxing tests
* feat: add migration and models for reports
* chore: add test for pivot card query caching
* Change column name markdown_docuemnt -> document
Add a content_type column to the table
* feat: add report run table and fk on cards
* feat: report run api start
* feat: run report api skeleton fixes for migration issues
* fixup! make qp run work
* Overhaul add-implicit-joins middleware
* Restore the wacko metadata updating code
* Ok, joins ARE allowed to have :fields.
* Fix JS tests 🔧
* Fix QUE-1563
* Test fixes 🔧
* Fix 100 more broken things
* Test fixes
* Use same distinct-ref logic as lib
* More test fixes 🔧
* Make add-alias-info better at matching things
* Consolidate the legacy result metadata schemas
* cljfmt
* Use `:decode/normalize` in the REST API for boring things like metadata
* Another round of test fixes 🔧
* Restore kondo ignore
* Another round of test fixes 🔧
* cljfmt
* PR feedback 🔧
* chore: remove wait in favour of waiting for modal to disappear
* feat: wait for query to be completed to possibly avoid DB race condition
* feat: wait for the table name to be shown in the ui before clicking it
* chore: removed un-needed waits
* Update e2e/test/scenarios/admin/admin-reproductions.cy.spec.js
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
---------
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
* Move expression widget into subfolder
* Import expression components from top-level
* Move expression helpers to metabase/querying/expressions
* Fix fuzzing paths
* Fix comment
* Add missing exports from expressions
* Remove unused exports
* Sort exports
* Add helper to get supported clauses
* Rename complete to suggestions for consistency
* Move tokenAtPos to position module
* Move assertion helpers to utils
* Split up pratt/types
* Use token text instead of slicing source
* Remove superflouous from and to on token
* Remove superflouous from, to and len on token
* Remove content helper
* Remove superflous fields on Token
* Rename compiler to compile-expression
* Fix imports
* Fix exports
* Remove eslint directives
* Move FK_SYMBOL to formatting/constants
* Use () => undefined instead of jest.fn
* Fix tags invalidation for bulk tables update
* Add MassTableVisibilityToggle
* Render mass toggle for schemas
* Add the button for dbs
- fix not-currently-selected branches in the tree not updating
* Fix types
* Align icon
* Align chevron icon
* Always show the toggle button for hidden tables
* Change color of hidden tables
* Only use ids of relevant tables
* Add tests
* Add test
* Take all visibility options into account
* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
* Allow supression of case and coalesce arg typechecks
* Add test for ignored type-check
* Configure *suppress-expression-type-check?* in tests
* Fix formatting
As is, field filters and time groupings assume that they can just refer to the field normally. In queries where aliases are
used/required, this doesn't work so well. Letting users specify the alias to use in place of the normal field
reference handles this case.
---------
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
* improve loading experience logic and fix bug where there are tool calls without messages causing messages to get cramed together with no space
* add a unit test
* Add `extraAction` prop to `undo` object
* Make `setEditingParameter` switch tab if needed
* Put a dashboard filter in the viewport
* Fix toast text appearance
* Hide "Show filter" button when moving to top nav
* Add e2e test
* Fix tests
* Ensure postgres downloads don't OOM
Fixes https://github.com/metabase/metabase/issues/60733
For performance reasons we set autocommit to true. this has an
unfortunate consequence that the postgres driver does not honor batch
sizes. We go through a lot of trouble to hook the streaming results of a
query to the output stream of the download, but the postgres jdbc driver
will realize all rows in memory.
A fast way forward is to set autocommit to false only when
`write?` (previous condition) or when executing a postgres download, as
reported in https://github.com/metabase/metabase/issues/60733.
How to test:
this is difficult. In CI we use
```clojure
:ci
{:jvm-opts ["-Xmx12g"
"-Xms12g"
```
So hitting a query that would deterministically OOM the instance
requires a lot more muscle than we realistically want to use.
I'm running the following tests locally:
```
:small-ram
{:jvm-opts ["-Xmx400m"
"-Xms400m"
"-Dci=TRUE"]}
```
```clojure
(defn- readable [bytes]
(cond (nil? bytes) "0 bytes"
(zero? bytes) "0 bytes"
:else
(let [units ["b" "kb" "mb" "gb" "tb"]
magnitude 1024.0]
(loop [[unit & remaining] units
current (double bytes)]
(if (and (seq remaining) (> current magnitude))
(recur remaining (/ current magnitude))
(format "%.1f %s" current unit))))))
(defn- consume
[^java.io.InputStream is]
(let [arr (byte-array 8024)]
(loop [c 0, gas 5000000]
(let [r (java.io.InputStream/.read is arr 0 (alength arr))]
(cond (zero? gas)
(throw (ex-info "Ran out of gas" {}))
(neg? r) c
:else (recur (+ c r) (dec gas)))))))
(deftest large-csv-test
(mt/test-driver :postgres
(testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
(let [large-query "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
result (mt/user-real-request :crowberto :post 200 "dataset/csv"
{:request-options {:as :stream}}
{:query (mt/native-query
{:query large-query})
:format_rows true})
size (consume result)]
(is (> size 2000000000)
(format "Only consumed %s but expected ~2gb" (readable size)))))))
```
and then
```
❯ time source pg.env && DRIVERS=postgres clojure -X:dev:test:small-ram :only metabase.driver.postgres-test/large-csv-test
Running QP tests against these drivers: #{:postgres}
LONG TEST in metabase.driver.postgres-test/large-csv-test
Test took 23.358 seconds seconds to run
Ran 1 tests in 32.825 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 32825.099875, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 40.7 s.
All tests passed.
Running after-run hooks...
```
Why not add these tests now?
We probably should write a full memory regression suite. This is a great
candidate for a first one. But it seems silly to run a new CI job with
just this one job. Push back if you think i'm wrong.
Another area of pushback:
I took the lazy way when determining if a driver should have autocommit
set to false or not: i hardcoded it.
```clojure
(and (-> options :download?) (= driver :postgres))
```
The alternative is some method of a new driver multimethod or
driver-supports?. The former feels a bit heavy-weight, the latter feels
not quite right since this is almost a non-support and all other jdbc
drivers do support it, presumably?
I'm quite open to pushback here and invite comments if you see a better way.
* Can't use an if for write?
You'd think you can use an if here but the previous code used a when and
is silent on write?. Lots of tests fail relating to datasets in test
setup and uploads. Don't want to debug that in this bug fix context so
leaving a todo
* remove old arity metadata. thanks eastwood!
* Don't set autoCommit for all postgres and descendant drivers
```clojure
(ns ^:mb/memory metabase.memory.csv-test
(:require
[clojure.test :refer :all]
[metabase.test :as mt]
[metabase.driver :as driver]))
(set! *warn-on-reflection* true)
(defn- readable [bytes]
(cond (nil? bytes) "0 bytes"
(zero? bytes) "0 bytes"
:else
(let [units ["b" "kb" "mb" "gb" "tb"]
magnitude 1024.0]
(loop [[unit & remaining] units
current (double bytes)]
(if (and (seq remaining) (> current magnitude))
(recur remaining (/ current magnitude))
(format "%.1f %s" current unit))))))
(defn- consume
[^java.io.InputStream is]
(let [arr (byte-array 8024)]
(loop [c 0, gas 5000000]
(let [r (java.io.InputStream/.read is arr 0 (alength arr))]
(cond (zero? gas)
(throw (ex-info "Ran out of gas" {}))
(neg? r) c
:else (recur (+ c r) (dec gas)))))))
(def driver->query
{:sqlite "WITH RECURSIVE generate_series(value) AS (
SELECT 1
UNION ALL
SELECT value + 1 FROM generate_series WHERE value + 1 <= 1000000
)
SELECT replace(hex(zeroblob(1024)), '00', 'xx') FROM generate_series;"
:postgres "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
:clickhouse "SELECT repeat('x', 2048)
FROM system.numbers
LIMIT 1000000;"
:redshift "WITH series AS (
SELECT ROW_NUMBER() OVER () as i
FROM stl_scan s1, stl_scan s2
LIMIT 1000000
)
SELECT REPEAT('x', 2048) FROM series;"})
(deftest large-csv-test
(mt/test-drivers #{:postgres :sqlite :clickhouse :redshift}
(testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
(let [large-query (or (driver->query driver/*driver*)
(throw (ex-info "Driver doesn't implement big query"
{:driver driver/*driver*
:available (keys driver->query)})))
result (mt/user-real-request :crowberto :post 200 "dataset/csv"
{:request-options {:as :stream}}
{:query (mt/native-query
{:query large-query})
:format_rows true})
size (consume result)]
(is (> size 2000000000)
(format "Only consumed %s but expected ~2gb" (readable size)))))))
(comment
(mt/set-test-drivers! #{:postgres})
(mt/set-test-drivers! #{:sqlite})
(mt/set-test-drivers! #{:clickhouse})
(mt/set-test-drivers! #{:redshift})
(mt/test-drivers #{:redshift}
(mt/db))
)
```
Verify this with
```
:small-ram
{:jvm-opts ["-Xmx400m"
"-Xms400m"
"-Dci=TRUE"]}
```
and then
```
;; driver.env:
;; local clickhouse
export MB_CLICKHOUSE_TEST_password="password"
export MB_CLICKHOUSE_TEST_username="default"
;; local postgres
export MB_POSTGRESQL_TEST_USER=dan
export MB_REDSHIFT_TEST_PASSWORD=<value>
export MB_REDSHIFT_TEST_USER=<value>
export MB_REDSHIFT_TEST_DB=<value>
export MB_REDSHIFT_TEST_HOST=<value>
```
and then running:
```
❯ source driver.env && DRIVERS=redshift clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running tests in metabase.memory.csv-test/large-csv-test
Finding tests took 8.3 s.
Running 1 tests
Running before-run hooks...
Running QP tests against these drivers: #{:redshift}
..
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 188.320 seconds seconds to run
Ran 1 tests in 188.338 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 188337.678584, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 3.3 mins.
All tests passed.
Running after-run hooks...
```
redshift takes a while.
contrast with
```
❯ source driver.env && DRIVERS=clickhouse,postgres clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running QP tests against these drivers: #{:postgres :clickhouse}
...
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 46.638 seconds seconds to run
Ran 1 tests in 46.655 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 46655.436333, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 56.5 s.
All tests passed.
Running after-run hooks...
```
both running locally happen in ~1 minute compared to 3 minutes for redshift
* Remove commented out old arity
this funciton used to have two arities for clarity. But it wasn't
another entrypoint, it was just trying to keep things a bit cleaner. But
the result is that at the point where we used the string sql query we
didn't have the `info` map in lexical scope. Fixing this across arities
would have pushed us into 7 positional args, so you might want to switch
to a map, but honestly, it's just the same function.
* Add ResponsiveButton component
* Prevent focus state being cut off
* Make the buttons responsive in the table section
* Make the buttons responsive in field section
* Extract useResponsiveButtons
* Add comments
* Extract useResponsiveButtons in FieldSection
* Add aria-label to the button
* Add tests
* Test tooltips
* Fix indent
* Add "move filter" menu
* Add undo
* Handle single tab dashboards
* Update text color for checked items
* Fix collapsed menu appearance
* Add tests
* Fix error when a tab doesn't have any dashcards
* Fix "Top of page" option selected color
* Use "card.title" viz setting
* Truncate long card titles
* Update "Disconnect from cards" button appearance
* Fix type error
* Make the select searchable, touch up on appearance
* Fix e2e test
* Add `moveDashboardFilter` helper
* Fix e2e test name
* Remove subtitles
* Update icon color
* Update icon color
* SEM-503 Add blue border to selected field
* SEM-504 Border radius of table/field name and description boxes should match that of setting cards
* SEM-509 Improve microcopy for table and field editing instructions
* SEM-510 Field descriptions could use "paragraph" text style with greater line height
* save
* revert redshift changes
* kondo
* add ci routing var
* redshift rough work
* cleanup bigquery changes
* remove bigquery specific redefs and bindings
* add separate var for dataset
* custom routing info per driver
* update changelog
* cljfmt
* fix fe lint
* use deferred-tru
* dissoc db_routing_info for tests
* fix other tests
* fix kondo and lint
* use yaml
* fix whitespace
* change log
* kondo and eastwood
* use markdown for routing info
* remove unneeded driver method
* cleanup
* fix tests
* fix remaining test
* add fe test
* add extra info in register-lazy-loaded-driver
* address pr comment
* improve doc string
* add text-secondary color to database info markdown
* update markdown
* alphabetical order
* move db routing info from db to session properties
* FE adjustments
* dont parse extra info
---------
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
* poc
* timing logs
* Only render compatible datasets
* Build uberjar to be able to test in cloud with more data
* search index support for display
* search index support for exclude-display and has-temporal-dimensions
* fix weird filter vs index column bug
* fix temporal filter
* required ids search index filter
* fix build by removing :display from search render-terms
* adding h2 compatibility
* fixing alignment
* whitespace
* all clicks are add clicks now
* reverted labels change
* whitespace
* whitespace
* mutation -> query, load compatibles at startup
* using viz icons in dataset list
* remove exclude_display
* consolidate search endpoint
* rename display param to display_type
* allignment
* fix filter tests
* test fixes
* Closes VIZ-1185: revert "using viz icons in dataset list"
This reverts commit 7f4d177e977643f90250a5add2f946d6f35ad2a0.
* closes VIZ-1184 copy for "no results"
* closes VIZ-1183 spacing between input and results
* removed log statement
* fixed type
* fixed basics.cy.spec.ts
* fixed dashboard-questions.cy.spec.js
* fixed sharing-reproductions.cy.spec.js
* fixed snowplow-tracking.cy.spec.ts
* fixed funnels.cy.spec.ts
* fixed others
* fix import
* return new fields in results for in-place engine
* test fix
* test fix attempt
* rm backup file
* fixed more e2e tests
* fixup
* more stabilization of e2e tests
* tweak whitespace
* first attempt to fix failing postgres tests
* try a simpler approach
* closes VIZ-1227 search not triggered when no datasource is selected
* new attempt to parameterize the define-spec macro with app-db
* removing non-temporal-dimension-ids filter
* fix cljkondo
* fix test
* fixed e2e (snowplow)
* fixed e2e (funnels)
* fixed e2e (basics)
* better loading state, better typing
* reverted type change
* uncomment e2e cartesian; remove unused search param; fix bg color
* Fix query to resolve to false instead of nil
---------
Co-authored-by: Eliot Daigneault-Mestre <eliot@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
* Stop offering expressions and aggregation being edited as columns
Fixes#61010
* Add repro for metabase#61010
* Add test for custom columns too
* Update expected error message in e2e test
* Detect cycles in resolver too
* Revert "Detect cycles in resolver too"
* Add e2e test for referencing custom expressions that are just wrappers
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Fixes#44077. Fixes#35840.
Previously this used some custom legacy MBQL manipulation. It was
incorrect and led to a handful of bugs. Now it's a straightforward
edit of the query powered by MBQL lib.
* clear secret file memoization on db update
* add rsa env vars
* improve test
* add more narrow test
* improve test
* refactor snowflake private key test to create and drop user per test
* use accountadmin role
* try granting sysadmin
* try using accountadmin role
* use correct details
* throw exceptions for unimplemented methods
* clean up test code
* use different login and user names for sqlserver impersonation setup
* Require role
* fix sqlserver test
* move feature supported def
* remove outdated test
* feat: swap span for flex in Trigger component with chevron
* chore: use span in flex component
* feat: add small left padding to native editor action buttons
* chore: fix typo on data-testid file
* chore: force viewport to be big enough in cy test
* feat: force the test to small window and execute the drag vertically
* "I'll do this later" doesn't exit the flow (#59993)
* parallelize requests and make them use rtk query (#59563)
* parallelize requests and make them use rtk query
* fix multiple "Automatically Generated Dashboards" collections created +
update types
* add test
* EMB-459: remove 3 tables limit (#59997)
* Tweak welcome step content display (#60083)
* tweak welcome step content display
* update test after copy update
---------
Co-authored-by: Nicolò Pretto <info@npretto.com>
* remove useForceLocaleRefresh as the context is now enough (#60145)
* adds `embedding_setup_click` event (#60315)
* embedding setup: remove last fetch call and speed up e2e (#60392)
* close EMB-487, remove last remaining fetch call
* closes EMB-534, speed up e2e
* createdDashboard -> createdDashboards
* embedding setup: use cloud token in e2e and hide appbar and database status (#60335)
* EMB-533: make the e2e test use the CLOUD pro token
* EMB-532: hide the database sync and the app bars in setup/embedding
* Update e2e/test/scenarios/onboarding/setup/setup-embedding.cy.spec.ts
* fix typo
---------
Co-authored-by: Kyle Doherty <5248953+kdoh@users.noreply.github.com>
* Empty
* No need for intersection in test
* Correct modestring casing
* Test datetime(number, mode) for s, ms, us, ns
* Allow uppercase and hyphens but normalize them.
* Don't allow hyphens in frontend.
* Implement unix casts for mongo
* Convert floats to long
* Use hyphenated keywords internally
* expand docstring
* Try other implementation of nanoseconds for BigQuery
* Handle sqlserver unix timestamps with multimethod
* More flexible date type handling
* Use integer division with bigquery
* datetime(number) frontend tests
* Undo change to package.json
* Empty
* Wrap code-like stuff in ``
* Add expressions/today feature
* Add legacy + lib for today()
* Basic test for today() (WIP)
* Add expressions/today feature to sql + implementation
* Finalize today() test
* Implement today() on mongo
* Better comment
* use m/find-first
* Frontend implementation
* Add today() fe test
* Improve fe test for today()
* Add a line to changelog
* Add line to changelog about expressions/today
* Handle different types better in lib schema
* Add special case for mode in formatter
* Add mode to expression options
* Add special case for mode in parser
* Error message
* Schema with options
* Add options map to legacy schema for datetime
* Remove comment
* Add unit test for mode option in compiler
* Add test for formatting the mode option in datetime
* Better round-tripping for :datetime function
* Add :mode to allowed keys for options marshalling
* Fix expression to add mode to options map
* Test datetime() legacy/lib roundtripping
* Fix normalization
* Remove println
* Mongo datetime() with options map
* Move test to custom-column spec
* Remove duplicate check
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
* In main nav, don't show 'Other users' personal collections' if there are no other users
---------
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Fraser <fraser@metabase.com>
This PR fixes a bug where dashboard filters linked to multiple fields would show entity keys instead of remapped entity names when viewed by users with grouped (limited) permissions.
The solution in this PR is to add support for explicit remapping field specification.
Also resolved a separate permissions caching bug in data_permissions.clj where the use-cache? logic was inverted.
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
* Empty
* No need for intersection in test
* Correct modestring casing
* Test datetime(number, mode) for s, ms, us, ns
* Allow uppercase and hyphens but normalize them.
* Don't allow hyphens in frontend.
* Implement unix casts for mongo
* Convert floats to long
* Use hyphenated keywords internally
* expand docstring
* Try other implementation of nanoseconds for BigQuery
* Handle sqlserver unix timestamps with multimethod
* More flexible date type handling
* Use integer division with bigquery
* datetime(number) frontend tests
* Undo change to package.json
* Wrap code-like stuff in ``
* Better comment
* use m/find-first
* Add a line to changelog
* Handle different types better in lib schema
* Add special case for mode in formatter
* Add mode to expression options
* Add special case for mode in parser
* Error message
* Schema with options
* Add options map to legacy schema for datetime
* Remove comment
* Add unit test for mode option in compiler
* Add test for formatting the mode option in datetime
* Better round-tripping for :datetime function
* Add :mode to allowed keys for options marshalling
* Fix expression to add mode to options map
* Test datetime() legacy/lib roundtripping
* Fix normalization
* Remove println
* Mongo datetime() with options map
* Remove duplicate check
* Add simple bytes to compiler
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
* Add aggregation columns
* Pass expressionIndex to Expression editor in AggregationPicker
* Add expression-parts-method for aggregation references
* Add support in the query processor
* Add more tests
* Hack FE to call aggregablecolumns
* Add missing expressionMode option
* Add columnsForExpressionMode helper
* Update error message from resolver
* Add query with aggregation for tests
* Add tests for resolving aggregations
* Fix tests
* Fix CLJS tests
* Fix more tests
* Add missing docstring
* Add more unit tests
* Add unit test for aggregation completions
* Fix error message in test
* Add tests for second stage resolver
* Add tests for referencing aggregations
* Add test for resolving aggregation in next stage
* Disambiguate test name
* Fix column names returned by QP for aliased aggregations
* Fix merge issues
* Fix final test
* Address review comments
* Move aggregation tests
* Add test for detecting cycles in aggregations
* Add test about disallowing duplicate aggregation names
* Add sort helper
* Add tests for using nested aggregations as question source
* Add e2e test for nested aggregations in follow up stage
* Add tests for using nested aggregations in follow up stage with breakout
* Allow duplicate aggregation names
* Add test for changing aggregation order in underlying question
* Remove nonsensical test
* Fix test descriptions
* Fix test
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
* Add BE repro test for #58314
* Add repro test for #35252
* Add repro test for #39033
* Add repro test for #27521
* Add repro test for #47734
* Add repro test for QUE-1378
* Add repro test for QUE-1374
* Add repro test for #58314
* Add repro test for #44767Closes#44767
* Add repro test for #60498
* Add repro test for #60444
* Make test for #60444 more general
* run embedding-sdk.yml from run-tests.yml
* remove e2e-tests-skipped-stub
* try to put back some structure
* fix name of build
* / -> › because github doesn't uses only the part after the last slash
* use > instead of chevron to make linter happy
* breaking changeS
* remove code to trigger ci
* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements
* Revert "Fix flaky test by adding aria-hidden on elements rendered only to perform measurements"
This reverts commit 5575d6b43b.
* Fix flaky test by adding aria-hidden on elements rendered only to perform measurements
* Use hidden instead of aria-hidden
* Filter out invisible elements
* Revert adding hidden attribute
* moving pickers into same folder, consolidate getInitialContainer hooks
* getCollectionIdPath consolidation
* getStateFromIdPath
* comitting sins to get tests passing
Fixes getting source tables in multistage aggregations. The check for
when we were in the scope of the parent card was in the wrong place in
the match which resulted in us failing to make a source-query block
immediately inside a stage with a source card.
Two changes required to allow this:
- first, for the setting itself, allow setting it if the database is
writable OR an attached DWH.
- second, a similar change to make sure `syncable_schemas` is fetchable
for the attached DWH.
* SEM-239 Data model - Layout boilerplate (#57174)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* SEM-240 Data model - Table section (#57248)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Fix flaky unit tests
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* SEM-241 Data model - Field - Data section (#57420)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Simplify color
* Use type instead of interface
* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Drop entity framework in FkTargetPicker
* Make table names show up
* Clean up
* Fix types
* Fix table names
* Add tests
* Add tests
* Add tests
* Restrict imports
* Improve config
* Restrict entity framework imports
* Simplify color
* Use type instead of interface
* Lint
* SEM-267 Data model - Field - Metadata section (#57527)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Add Metadata section with display name input
* Pass table through components
* Drop entity framework in FkTargetPicker
* Revert "Pass table through components"
This reverts commit 2eb3e3a256.
* Make table names show up
* Clean up
* Fix types
* Fix table names
* Add tests
* Add tests
* Add tests
* Restrict imports
* Improve config
* Restrict entity framework imports
* Simplify color
* Use type instead of interface
* Use SemanticTypeAndTargetPicker in FieldSection
* Sort
* Lint
* Typing
* Do not use v1/metadata wrapper
* Add TextareaBlurChange
* Add description input
* Update comments
* Update icon
* Add plugin query props
* Remove redundant prop
* Remove redundant _.omit
* Fix textarea crashing due to min height on input
* Set minRows
* Fix styling
* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master
* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)
* SEM-242 Data model - Field - Behavior section (#57638)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Clean up timeouts on unmount
* Improve typing
* SEM-269 Data model - Field - Formatting section (#57682)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Add FormattingSection
* Sort
* Make formatting form full width
* Use style prop instead of maxWidth
* Clean up timeouts on unmount
* Improve typing
* Metadata preview boilerplate (#58015)
* Render preview
* Add preview type selector
* Fix flex layout
* Lift preview type to top component to keep the state
* Move helpers to utils
* Add unit tests for preview picker
* Add feedback to metadata editor when saving config (#58038)
* Add feedback to all table and field settings
* Add missing prop
* Metadata table and detail preview (#57887)
* Handle undefined metadata
* Render Table preview
* Add custom error component
* Add helper for error message
* Add detail preview
* Make comment more clear
* Fix type
* Fix missing props
* Metadata table picker (#57648)
* Set up TablePicker component
* Fix type in api
* Add initial TablePicker implementation
* Add schema icon
* Update url for datapicker
* Move data loading to utils
* Add loading node types
* Derive icon from type
* Try building the treepicker state asynchronously
* Build custom tree
* Add loading state
* Push url state in picker
* Sync open state with url
* Use helper to manage expanded state
* Split Node into separate file
* Expose prefetch hook
* Prefetch data to avoid showing loading states
* Add search to table picker
* Move search-related stuff into Search module
* Use Link for navigation
* Add renderLoading helper
* Remove unused prop
* Make search input sticky
* Add separate sidebar for field picker
* Render single schema but open it by default
* Translate errors
* Defer search value
* Export lazy loaders for database info
* Use top-level data fetching
* Enable virtualization
* Move loader utils into utils
* Remove Node implementation
* Simplify styles
* Pull out some logic
* Reuse results in search
* Reuse tree helpers when handling search results
* Avoid passing down isExpanded
* Memoize
* Fix initial expanded state
* Automatically expand single-schema databases
* Pass tableId to DataPicker
* Add styling for active item
* Add getUrl helper for tree nodes
* Move types to separate file
* Simplify item
* Rename Item to Results
* Simplify
* Allow wrapping everywhere
* Add loading state
* Render tracks
* Remove unused colors
* Scroll active item into view
* Fix paths
* Add missing keys
* Handle browser navigation in table picker
* Handle browser navigation in table picker
* Add more documentation
* Debounce search
* Render track even when no parent was found
* Allow rendering urls to schema's with no name
* Add value to loading nodes
* Add delay to track too
* Add explicit level to FlatItem
* Add explicit parent refence to FlatItem
* Hide nameless schemas in the tree
* Refactor
* Move key to top-level item
* Make TablePicker not depend on router
* Disable smooth scroll
* Add unit tests for TablePicker
* Unnest unnamed schemas directly
* Also fetch tables when only one schema exists
* Remeasure items when they change
* Use more precise typeing for items
* Allow clicking table nodes in search results
* Remove unused classes
* Remove unused useDispatch hook
* Remove delay on loading items
* Add custom empty state
* Typo
* Add keyboard navigation to table picker
* Use test helpers in all tests
* Add keyboard navigation to search results too
* Add custom focus state for search items
* Add unit tests for search
* Jump to parent when pressing left arrow
* Add more cases to keyboard test
* Add hover state to table picker
* Use table display name in table picker
* Flatten single schema in to database
* Rename onChange_ to handleChange
* Use folder for schema
* Make the hover and active colors the same
* Rename Data tab to Data Model
* Remove title
* Fix layout
* Field description editor (#58280)
* Use NameDescriptionInput for the field section too
* Use TextArea for description editor
* Post-merge fixes
* Metadata editing UI tweaks (#58297)
* Add background to fields
* Tweak colors for disabled inputs
* Remove icons in SectionPill
* Remove icon from one more SectionPill
* Remove lint
* Move segments to table picker (#58422)
* Add link to segments in the datamodel sidebar
* Add local state to RouterTablePicker
* Nest segments under DataModel
* Add wrapper classes to revision routes
* Fix spacing for empty state
* Add active state to segments link
* Remove DataModelApp in DataModel routes
* Fix overflow in segment form
* Merge translation strings
* Add background color to segments components
* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)
* Remove hover/focus effect and break components down into files
* Update comment
* Consolidate toasts
* Remove unused styles
* Remove redundant card
* Extract SegmentsLink
* Make name/description input sticky
* Add icons
* Remove leftovers
* Fix TS error
* Move visibility toggles to the table picker (#58284)
* Fetch hidden tables
* Fetch hidden schemas
* Add visibility toggles to the table picker
* Remove table visibility toggle in table section
* Simplify visibility toggler
* Move visibility toggle to separate file
* Add unit tests for visibility toggle
* Show table as hidden whenever there is any visibility
* Use ActionIcon
* Break up onClick handler
* Use plan Icon
* Remove data from nodes that don't need it
* Add tooltips to table visibility togglers
* Wrap icons in ActionIcon
---------
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
* Cleanup
* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)
* Fix SEM-361
* Fix types
* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)
* Avoid using a breakout for date-time columns
* Use the same logic for every type of field
* SEM-246 Data model - Filtering preview (#58854)
* Fix SEM-361
* Fix types
* Add FilteringPreview boilerplate
* Use FilterPickerBody
* Another attempt
* Make it work for all types of filters
* Memoize query
* Clear filter input on field change
* Account for prop changes
* Fix TS error
* SEM-268 Data model - Field - Behavior section - Display values (#57684)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Add placeholder
* Add RemappingPicker boilerplate
* Clean up timeouts on unmount
* Improve typing
* Add onChange logic boilerplate
* Extract DisplayValuesPicker
* Remove redundant code
* Format code
* Add fk input boilerplate
* Disable options instead of hiding them
* Rename
* Fetch required data
* Use full data
* Implement fk remapping onChange
* Implement naming tip
* Fix state
* Extract utils
* Fix schema step errors
* Add remappings boilerplate
* Fetch remappings
* Add more modal boilerplate
* Add modal props
* Handle modal state
* Add explicit edit button
* Implement modal form
* Limit amount of Boxes
* Bring all safety checks back in
* Refactor CustomMappingModal
* Style CustomMappingModal
* Extract getHasEmptyValues
* Remove todo
* Prevent flicker
* Fix initial state of fk picker
* Use is touched
* Add CustomMappingModal unit tests
* Add DisplayValuesPicker unit tests
* Move DisplayValuesPicker
* Remove redundant tags
* Fix uncontrolled/controller input react warning
* Add explanatory tooltips for disabled options
* Fix 1px of background leaking into view
* Add missing memoization
* Reset state when cancelling
* Sync single table via UI (#58342)
* add table-manual-sync event
* add table/sync_schema endpoint
* add table sync test
* Add api helper for the sync table schema endpoint
* Add SyncTableSchemaButton component
* Add SyncTableSchemaButton to table section
* Add unit tests for SyncTableSchemaButton
* Also invalidate field-values and parameter-values
* Simplify SyncTableSchemaButton hooks
* Move useTemporaryState into a separate hook
* Apply same pattern in all buttons
* address PR review comments: use `get-database`, `with-database-routing-off`
* Pass argument to useTemporaryState
* update test
---------
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
* Fix SEM-370 (#59051)
* Post-merge conflict fix
* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Pixel-perfect
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* SEM-376 Data model - Resizable columns layout (#59100)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* SyncOptionsModal
* Move
* Field values modal
* Responsiveness
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* Tmp
* Revert "Tmp"
This reverts commit 6e561c0de7.
* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* SyncOptionsModal
* Move
* Field values modal
* Responsiveness
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Port test
* Fix typing
* Port test
* Port tests
* Format code, add data-testid
* Port more tests
* Refactor withDatabase to TypeScript
* Await
* Fix prop handling
* Port test
* Memoize textarea for performance
* Port test
* Port tests
* Remove unlawful getFieldDisplayName usages
* ESLint
* Add JSDoc
* Port tests
* Port tests
* Format code
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* Tmp
* Revert "Tmp"
This reverts commit 6e561c0de7.
* Fix circular dependency
* Post-merge fix
* SEM-425 Tests parity - editor.cy.spec.js (#59838)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Simplify assertion
* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Simplify assertion
* SEM-427 Tests parity - remaining e2e suites (#59980)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Data model - Simple flex layout (#59995)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Try simple flex layout
* Update proportions
* Remove redundant elements
* Clean up
* Use ellipsis instead of wrapping
* Pixel perfect
* Tweak constants
* SEM-448 Tests parity - unit tests (#60042)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Try simple flex layout
* Update proportions
* Remove redundant elements
* Clean up
* Use ellipsis instead of wrapping
* Pixel perfect
* Tweak constants
* Add data model unit tests boilerplate
* Optimistically remove TODOs
* Use router
* Fix element rendering in tests
* Add tests + fixes
* Port tests
* Port a test, fix a util
* Port test
* Port tests
* Port tests
* Remove old tests
* Port tests
* Remove old tests
* Port tests
* Remove old tests
* Fix disabling tables in search results
* Fix flakes
* Update tests
* Remove redundant check
* SEM-434 Missing metadata in FieldDataSelector (#60262)
* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434
* Format code
* Use field.display_name
* Memoize tables
* SEM-462 Small tweaks (#60187)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Fix events
* Use prop instead of CSS
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Add comments
* SEM-460 Show prefix for JSON-unfolded columns (#60328)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Add comments
* SEM-420 Organize e2e tests (#60379)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Move segments to a separate spec
* Organize tests
* Add comments
* SEM-420 Organize e2e tests (part 2) (#60388)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Move segments to a separate spec
* Organize tests
* Move tests
* Move tests
* Add comments
* Merge tests
* Move tests
* Use modern selectors
* Move tests
* Move tests
* Reorder tests
* SEM-420 Test new features (e2e) (#60439)
* Add new tests, simplify toasts, remove long prefix from utils
* Test toasts
* Reuse utils
* Add table picker test for no schemas
* Fix schemaless tables not shown in search
* Add sync options test
* Fix & test prefixes
* Add logs
* Format code
* Coercion strategy test
* Add tests for visibility
* Update assertions
* Add test for tooltips
* Field values tests
* Add tests for filtering
* Add preview assertion
* Refactor preview verification
* Fix showing 403 error in preview
* Add preview tests
* Add preview assertions
* Add preview assertions
* Add preview assertions
* Add preview tests
* Move modals and state handling, add tests for Esc key
* Update unit tests
* Use useDisclosure
* Add extra error status check
* Revert unnecessary changes in cross-version tests
* SEM-419 Increase test coverage (unit tests) (#60491)
* Add new tests, simplify toasts, remove long prefix from utils
* Test toasts
* Reuse utils
* Add table picker test for no schemas
* Fix schemaless tables not shown in search
* Add sync options test
* Fix & test prefixes
* Add logs
* Format code
* Coercion strategy test
* Add tests for visibility
* Update assertions
* Add test for tooltips
* Field values tests
* Add tests for filtering
* Add preview assertion
* Refactor preview verification
* Fix showing 403 error in preview
* Add preview tests
* Add preview assertions
* Add preview assertions
* Add preview assertions
* Add preview tests
* Move modals and state handling, add tests for Esc key
* Update unit tests
* Add FieldOrderPicker unit tests
* Add CurrencyPicker unit tests
* Add FkTargetPicker unit tests
* Add more tests
* Add SemanticTypeAndTargetPicker unit tests
* Remove redundant code
* Move RemappingPicker
* Use useDisclosure
* Add extra error status check
* SEM-247 Clean up old Table Metadata page code (#60557)
* Remove old metadata page
* Move humanizeCoercionStrategy
* Remove unused functions
* Fix SEM-484 (#60600)
* Add tests
* Center field error
* Do not navigate if there's an explicit param
* Show field error
* Fix schemas loading, add tests
* Revert unnecessary change
* Fix data fetching
* Improve comments
* Remove invalid test for schemas
* Optimize conditions
* When table is not found, show the empty state as if table was not selected yet
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
* Use displayName for error
* Fix error position for node
* Move padding to cm-content to avoid whitespace above gutter
* Add border radius to editor to avoid overflowing container
* Fix displayname in unit test
* Fix type for position
* Add test for error position
* Add unit test for position helper
* Add warning_triangle_filled icon
* Use warning_triangle_filled icon for error toasts in buttons
* Show error toasts consistently
* Fix error handling in table preview
* Fix error handling in object detail preview
* Update message
* Add toasts for sorting
* Add test for errors
* Add missing tests
* Update test
* Add iconColor prop to Undo and use it instead of hardcoding color in warning_triangle_filled icon
* Ensure that we keep the selected table even when collapsing the tree
- Fixes SEM-435
* Update tests
* Always highlight selected table
* Use aria-selected
* Add validation for case/if clause types
* Add e2e repro for metabase#57674
* Avoid passing nil default into expressions
* Check for type compatibility, not equality
* Allow unknoen types
* Make e2e test more refined
* Fix e2e test
* Fix clj test
* Fix e2e test
* Handle set arguments to compatible?
* Fix docstring
* Use assignable? instead of most-common-ancestor
* Allow Date/DateTime/... to mix
* Use best-return-type to determine if all types are compatible
* Handle falsy default
* Add missing map
* Update comment to clarify compatibility omission
* Unwrap schema
* Add test for malformed case expressions
* Add type check to coalaesce too
* Add check to coalesce too
* Add tests for :default false
* Add tests for temporal types
* Move combination tests to BE test
* Use separate deftests for valid and invalid case and coalesce tests
* Fold repetitive parts into are expression
* Formatting of test
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
* Formatting of test
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
* Formatting of test
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
* Split up more tests
* Formatting in tests
---------
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
* Add option to use instance settings for number formatting
* Format row count in datagrid Footer with instance settings
* Format row count in datagrid Footer using instance settings
* Format row in question row count using instance settings
* Add unit test for number formatting with instance settings
* Fix unit tests
* Fix e2e tests
* Update Loki Snapshots
* Add useNumberFormatter hook
* Use useNumberFormatter hook
* Add test for useNumberFormatter
* Fix types
* Update Loki Snapshots
* Move useNumberFormatter to metase/common/hooks
* Add redux to DataGrid stories
* Add missing loki references
---------
Co-authored-by: Metabase Automation <github-automation@metabase.com>
We check for query cycles when saving cards, but the checker only understands mbql queries. If we have a native query
that depends on another query, the cycle checker won't go through the native query to see if it is causing a cycle.
Now, the checker understands native queries and can find cycles involving them.
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
* [Lib] Stop passing `:unique-name-fn` as an option
* Add extra test
* Fix column order
* Test fixes and PR feedback
* Fix output schema
* Test fixes!!!
* Test fix?? 🔧
* Fix file order
* Test fix
* Revert accidental e2e changes
* typo
* infer only one column per table to be entity name
* tests
* fix: test
* note
* fix: don't lose other classification results!
* regr test
* use count
* more tests
* fix: only consider active fields!
* also consider visibility_type
* perf: select only if needed
* style: reduce without atom
* style: cleaner
* SEM-239 Data model - Layout boilerplate (#57174)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* SEM-240 Data model - Table section (#57248)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Fix flaky unit tests
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* SEM-241 Data model - Field - Data section (#57420)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Simplify color
* Use type instead of interface
* SEM-297 Drop entity framework usage in `SemanticTypePicker` (#57531)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Drop entity framework in FkTargetPicker
* Make table names show up
* Clean up
* Fix types
* Fix table names
* Add tests
* Add tests
* Add tests
* Restrict imports
* Improve config
* Restrict entity framework imports
* Simplify color
* Use type instead of interface
* Lint
* SEM-267 Data model - Field - Metadata section (#57527)
* Add route and link
* Convert DataModelApp to TypeScript
* Use DataModelApp in DataModel
* Keep all routes
* Extract section components
* Add empty states
* Use ts-pattern
* Drop ts-pattern
* Disable preview
* Rename
* Add border
* Move page components to their own dirs
* Add table fetching
* Add NameDescriptionInput boilerplate
* Update table on blur
* Fix focus state and prevent empty names
* Add Hide this table switch
- Label from https://www.loom.com/share/45ce00aaac3f4141adf3f52dec79048f?highlightComment=80327135&t=271
* Style the Switch
* Move FieldOrderPicker
* Move SortableField
* Move NameDescriptionInput
* Make NameDescriptionInput more generic
* Use FieldOrderPicker
* Rename
* Move label into TableVisibilityInput
* Add missing return
* Add FieldOrder
* Get rid of entity framework workarounds
* Add TODO comment
* Make header sticky
* Sort
* Add field scanning section
* Discard + rescan
* Remove todo
* Remove TableVisibilityInput
* Rename FieldOrder to SortableFieldList and move it to metadata/components
* Implement getFieldIcon boilerplate
* Do not use metabase-lib/v1
* Extract tableFieldToColumnMetadata
* Fix focus state being cut off
* Extract RescanFieldsButton, add error and success states
* Extract DiscardFieldValuesButton
* Rename
* Move to metadata/components
* Style name/description input
* Add missing ttag
* Add NameDescriptionInput tests
* Add more tests
* Organize tests
* Add tests
* Add DiscardTableFieldValuesButton tests
* Add test
* Add RescanTableFieldsButton tests
* Lint colors
* Add tests for getItems
* Add tests for getFieldIcon
* Update comment
* Update test names
* Add missing effect
* Add missing effect
* Navigation onClick
* Fix flaky unit tests
* Use a link
* Explain cast
* Improve url generation
* Style active link
* Load field, display name
* Sticky header
* Add SectionPill
* Add field name and data type
* Add cast toggle
* Add CoercionStrategyPicker
* Remove getFieldIcon
* Extract TextInputBlurChange
* Update comment
* Casting toggle state sync
* CoercionStrategyPicker error state
* Extract FieldDataSection
* Reuse existing TextInputBlurChange
* Further cleanup
* Use key for FieldSection
* Lift data fetching
* Add decoration
* Use key for table as well
* Add unit tests
* Add unit tests
* Add unit tests
* Add comments
* Add Metadata section with display name input
* Pass table through components
* Drop entity framework in FkTargetPicker
* Revert "Pass table through components"
This reverts commit 2eb3e3a256.
* Make table names show up
* Clean up
* Fix types
* Fix table names
* Add tests
* Add tests
* Add tests
* Restrict imports
* Improve config
* Restrict entity framework imports
* Simplify color
* Use type instead of interface
* Use SemanticTypeAndTargetPicker in FieldSection
* Sort
* Lint
* Typing
* Do not use v1/metadata wrapper
* Add TextareaBlurChange
* Add description input
* Update comments
* Update icon
* Add plugin query props
* Remove redundant prop
* Remove redundant _.omit
* Fix textarea crashing due to min height on input
* Set minRows
* Fix styling
* Remove PLUGIN_FEATURE_LEVEL_PERMISSIONS plugin usage from DatasetFieldMetadataFkTargetPicker
- because that's not how it works in master
* Drop -v2 suffix for new routes, use -v1 suffix for old routes (#57637)
* SEM-242 Data model - Field - Behavior section (#57638)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Clean up timeouts on unmount
* Improve typing
* SEM-269 Data model - Field - Formatting section (#57682)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Add FormattingSection
* Sort
* Make formatting form full width
* Use style prop instead of maxWidth
* Clean up timeouts on unmount
* Improve typing
* Metadata preview boilerplate (#58015)
* Render preview
* Add preview type selector
* Fix flex layout
* Lift preview type to top component to keep the state
* Move helpers to utils
* Add unit tests for preview picker
* Add feedback to metadata editor when saving config (#58038)
* Add feedback to all table and field settings
* Add missing prop
* Metadata table and detail preview (#57887)
* Handle undefined metadata
* Render Table preview
* Add custom error component
* Add helper for error message
* Add detail preview
* Make comment more clear
* Fix type
* Fix missing props
* Metadata table picker (#57648)
* Set up TablePicker component
* Fix type in api
* Add initial TablePicker implementation
* Add schema icon
* Update url for datapicker
* Move data loading to utils
* Add loading node types
* Derive icon from type
* Try building the treepicker state asynchronously
* Build custom tree
* Add loading state
* Push url state in picker
* Sync open state with url
* Use helper to manage expanded state
* Split Node into separate file
* Expose prefetch hook
* Prefetch data to avoid showing loading states
* Add search to table picker
* Move search-related stuff into Search module
* Use Link for navigation
* Add renderLoading helper
* Remove unused prop
* Make search input sticky
* Add separate sidebar for field picker
* Render single schema but open it by default
* Translate errors
* Defer search value
* Export lazy loaders for database info
* Use top-level data fetching
* Enable virtualization
* Move loader utils into utils
* Remove Node implementation
* Simplify styles
* Pull out some logic
* Reuse results in search
* Reuse tree helpers when handling search results
* Avoid passing down isExpanded
* Memoize
* Fix initial expanded state
* Automatically expand single-schema databases
* Pass tableId to DataPicker
* Add styling for active item
* Add getUrl helper for tree nodes
* Move types to separate file
* Simplify item
* Rename Item to Results
* Simplify
* Allow wrapping everywhere
* Add loading state
* Render tracks
* Remove unused colors
* Scroll active item into view
* Fix paths
* Add missing keys
* Handle browser navigation in table picker
* Handle browser navigation in table picker
* Add more documentation
* Debounce search
* Render track even when no parent was found
* Allow rendering urls to schema's with no name
* Add value to loading nodes
* Add delay to track too
* Add explicit level to FlatItem
* Add explicit parent refence to FlatItem
* Hide nameless schemas in the tree
* Refactor
* Move key to top-level item
* Make TablePicker not depend on router
* Disable smooth scroll
* Add unit tests for TablePicker
* Unnest unnamed schemas directly
* Also fetch tables when only one schema exists
* Remeasure items when they change
* Use more precise typeing for items
* Allow clicking table nodes in search results
* Remove unused classes
* Remove unused useDispatch hook
* Remove delay on loading items
* Add custom empty state
* Typo
* Add keyboard navigation to table picker
* Use test helpers in all tests
* Add keyboard navigation to search results too
* Add custom focus state for search items
* Add unit tests for search
* Jump to parent when pressing left arrow
* Add more cases to keyboard test
* Add hover state to table picker
* Use table display name in table picker
* Flatten single schema in to database
* Rename onChange_ to handleChange
* Use folder for schema
* Make the hover and active colors the same
* Rename Data tab to Data Model
* Remove title
* Fix layout
* Field description editor (#58280)
* Use NameDescriptionInput for the field section too
* Use TextArea for description editor
* Post-merge fixes
* Metadata editing UI tweaks (#58297)
* Add background to fields
* Tweak colors for disabled inputs
* Remove icons in SectionPill
* Remove icon from one more SectionPill
* Remove lint
* Move segments to table picker (#58422)
* Add link to segments in the datamodel sidebar
* Add local state to RouterTablePicker
* Nest segments under DataModel
* Add wrapper classes to revision routes
* Fix spacing for empty state
* Add active state to segments link
* Remove DataModelApp in DataModel routes
* Fix overflow in segment form
* Merge translation strings
* Add background color to segments components
* SEM-363 Data model - Field and table name/description inputs should be sticky and have icons (#58703)
* Remove hover/focus effect and break components down into files
* Update comment
* Consolidate toasts
* Remove unused styles
* Remove redundant card
* Extract SegmentsLink
* Make name/description input sticky
* Add icons
* Remove leftovers
* Fix TS error
* Move visibility toggles to the table picker (#58284)
* Fetch hidden tables
* Fetch hidden schemas
* Add visibility toggles to the table picker
* Remove table visibility toggle in table section
* Simplify visibility toggler
* Move visibility toggle to separate file
* Add unit tests for visibility toggle
* Show table as hidden whenever there is any visibility
* Use ActionIcon
* Break up onClick handler
* Use plan Icon
* Remove data from nodes that don't need it
* Add tooltips to table visibility togglers
* Wrap icons in ActionIcon
---------
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
* Cleanup
* SEM-361 Data model - Field metadata/formatting settings do not affect the preview (#58841)
* Fix SEM-361
* Fix types
* SEM-311 Table preview - no impact when changing time formatting for seconds and ms (#58927)
* Avoid using a breakout for date-time columns
* Use the same logic for every type of field
* SEM-246 Data model - Filtering preview (#58854)
* Fix SEM-361
* Fix types
* Add FilteringPreview boilerplate
* Use FilterPickerBody
* Another attempt
* Make it work for all types of filters
* Memoize query
* Clear filter input on field change
* Account for prop changes
* Fix TS error
* SEM-268 Data model - Field - Behavior section - Display values (#57684)
* Drop -v2 suffix for new routes, use -v1 suffix for old routes
* Move FieldVisibilityPicker
* Make FieldVisibilityPicker work with api Field
* Use FieldVisibilityType
* Fix gap
* Update tests
* Add label and description
* Add FieldValuesTypePicker
* Add canUnfoldJson and hasDatabaseFeature
* Rename
* Add UnfoldJsonPicker
* Fix typing
* Add RescanFieldButton
* Add DiscardFieldValuesButton
* Style the connector
* Fix scrolling
* Update spacing
* Add tests for FieldValuesTypePicker
* Add tests
* Add UnfoldJsonPicker tests
* Add tests
* Add tests
* Add placeholder
* Add RemappingPicker boilerplate
* Clean up timeouts on unmount
* Improve typing
* Add onChange logic boilerplate
* Extract DisplayValuesPicker
* Remove redundant code
* Format code
* Add fk input boilerplate
* Disable options instead of hiding them
* Rename
* Fetch required data
* Use full data
* Implement fk remapping onChange
* Implement naming tip
* Fix state
* Extract utils
* Fix schema step errors
* Add remappings boilerplate
* Fetch remappings
* Add more modal boilerplate
* Add modal props
* Handle modal state
* Add explicit edit button
* Implement modal form
* Limit amount of Boxes
* Bring all safety checks back in
* Refactor CustomMappingModal
* Style CustomMappingModal
* Extract getHasEmptyValues
* Remove todo
* Prevent flicker
* Fix initial state of fk picker
* Use is touched
* Add CustomMappingModal unit tests
* Add DisplayValuesPicker unit tests
* Move DisplayValuesPicker
* Remove redundant tags
* Fix uncontrolled/controller input react warning
* Add explanatory tooltips for disabled options
* Fix 1px of background leaking into view
* Add missing memoization
* Reset state when cancelling
* Sync single table via UI (#58342)
* add table-manual-sync event
* add table/sync_schema endpoint
* add table sync test
* Add api helper for the sync table schema endpoint
* Add SyncTableSchemaButton component
* Add SyncTableSchemaButton to table section
* Add unit tests for SyncTableSchemaButton
* Also invalidate field-values and parameter-values
* Simplify SyncTableSchemaButton hooks
* Move useTemporaryState into a separate hook
* Apply same pattern in all buttons
* address PR review comments: use `get-database`, `with-database-routing-off`
* Pass argument to useTemporaryState
* update test
---------
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
* Fix SEM-370 (#59051)
* Post-merge conflict fix
* SEM-329 Data model - Table section - Update fields sorting interaction (#59316)
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Pixel-perfect
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* SEM-376 Data model - Resizable columns layout (#59100)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* SEM-327 Data model - Move the re-scan / discard options away from the bottom of the fields list (#59474)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* SyncOptionsModal
* Move
* Field values modal
* Responsiveness
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* Tmp
* Revert "Tmp"
This reverts commit 6e561c0de7.
* SEM-424 Tests parity - datamodel.cy.spec.js (#59548)
* Format code
* Prevent updates when nothing changes
* Use new colors
* Make nav resizable
* Fix nav width
* Remove unused styles
* Prevent CLS in SortableList
* Add comment
* Get rid of second page component
* Make table column resizable
* Add padding and min width for the empty state
* Optimize
* Extract ResizableColumn
* Toggle preview
* Add preview and field resizing
* Extract getTableMetadataQuery
* Preview positioning and shadow
* Show scrollbar on preview overflow
* Fix resizing bounds
* Remove redundant props
* Handle Escape key
* Add comment
* Update default constraints
* Make preview non-resizable
* Fix valid Escape press detection
* Fix types
* Add support for size="sm" in SegmentedControl
* Add field sorting interaction boilerplate
* Update FieldOrderPicker to use SegmentedControl
* Extract Label component
* Update tooltips
* Update sortable field
* Rename SortableField to SortableFieldItem
* Render field list
* Align styling
* Use rem, remove Link from SortableFieldItem
* Styling
* Use field prop
* Background styling
* Fix TS error
* Editable name and description
* Watch out for error
* Allow overriding default props in EditableText
* Fix a11y
* A11y
* Prevent overflow
* Styling
* Cleanup
* Update comment
* Fixes
* Update label and hide it in sorting mode
* Update spacing
* Avoid CLS when entering sorting mode
* Auto-grow table column when possible
* Auto-magic layout
* Fix sign
* Optimize
* Optimize
* Pixel-perfect
* SyncOptionsModal
* Move
* Field values modal
* Responsiveness
* Use ellipsis on overflow
* Fix colors
* Fix name input size
* Fix description patching
* Style selected state
* Do not use EditableText for description input, add resetOnEsc prop
* Port test
* Fix typing
* Port test
* Port tests
* Format code, add data-testid
* Port more tests
* Refactor withDatabase to TypeScript
* Await
* Fix prop handling
* Port test
* Memoize textarea for performance
* Port test
* Port tests
* Remove unlawful getFieldDisplayName usages
* ESLint
* Add JSDoc
* Port tests
* Port tests
* Format code
* Use flushSync instead of setTimeout
* Try to prevent event propagation
* Fix interactivity in inputs
* Fix interactivity in inputs
* Move memoization closer to component definition
* Tmp
* Revert "Tmp"
This reverts commit 6e561c0de7.
* Fix circular dependency
* Post-merge fix
* SEM-425 Tests parity - editor.cy.spec.js (#59838)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Simplify assertion
* SEM-426 Tests parity - reproductions.cy.spec.ts (#59970)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Simplify assertion
* SEM-427 Tests parity - remaining e2e suites (#59980)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Data model - Simple flex layout (#59995)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Try simple flex layout
* Update proportions
* Remove redundant elements
* Clean up
* Use ellipsis instead of wrapping
* Pixel perfect
* Tweak constants
* SEM-448 Tests parity - unit tests (#60042)
* Add DataModel helpers
* Update test
* Add waits
* Use schemaId in test helper
* Port tests
* Fix ids
* Add more helpers
* Use helpers
* Auto-open coercion picker, humanize coercion picker labels
* Update test
* Fix typing
* Fix data fetching
* Update tests
* Refactor
* Update tests
* Update helpers
* Update reproductions.cy.spec.ts
* Fix test
* Update test
* Update test
* Update test
* Update tests
* Update test
* Update test
* Update test
* Update test
* Update tests
* Update tests
* Typo
* Update unit tests
* Remove encodeURIComponent
* Make it clear what is schemaName and schemaId
* Rename schemaId to schemaName in table picker
* Update unit tests
* Update unit tests
* Skip soon-to-be-ported unit tests
* Attempt to fix a test
* Update test
* Update unit test
* Update test
* Revert refetching
* Try simple flex layout
* Update proportions
* Remove redundant elements
* Clean up
* Use ellipsis instead of wrapping
* Pixel perfect
* Tweak constants
* Add data model unit tests boilerplate
* Optimistically remove TODOs
* Use router
* Fix element rendering in tests
* Add tests + fixes
* Port tests
* Port a test, fix a util
* Port test
* Port tests
* Port tests
* Remove old tests
* Port tests
* Remove old tests
* Port tests
* Remove old tests
* Fix disabling tables in search results
* Fix flakes
* Update tests
* Remove redundant check
* SEM-434 Missing metadata in FieldDataSelector (#60262)
* Manually override tables prop and add missing properties to Field objects
- Fixes SEM-434
* Format code
* Use field.display_name
* Memoize tables
* SEM-462 Small tweaks (#60187)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Fix events
* Use prop instead of CSS
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Add comments
* SEM-460 Show prefix for JSON-unfolded columns (#60328)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Add comments
* SEM-420 Organize e2e tests (#60379)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Move segments to a separate spec
* Organize tests
* Add comments
* SEM-420 Organize e2e tests (part 2) (#60388)
* SEM-436 Make field description input auto-grow indefinitely
* SEM-438 Update icons for tables and fields
* SEM-439 Remove the first column with dashes from the field values preview
* SEM-441 Align color scheme for left navbar and right-side panes
* SEM-440 Have a loader for the Detail view preview
* SEM-437 Sorting mode tweaks
* SEM-446 Chips as section headers feel off
* SEM-445 Revisit the read-only version of field ID and DB name
* Make shadows exactly like in figma
* SEM-457 Top-align text with icon for tables with long names
* Remove redundant selector
* Pixel perfect padding
* Fix 'draggable' prop not kicking in
* Fix tests
* Fix flakes
* Update tests
* Add spinner when toggling table visibility and using predefined sorting order
* Show prefix in FieldItem
* Show prefix in SortableFieldItem
* Fix events
* Handle ellipsis
* Show prefix in NameDescriptionInput
* Update tests
* Update types
* Use prop instead of CSS
* Improve responsiveness
* Revert "Use prop instead of CSS"
This reverts commit 74f76d1b99.
* Move segments to a separate spec
* Organize tests
* Move tests
* Move tests
* Add comments
* Merge tests
* Move tests
* Use modern selectors
* Move tests
* Move tests
* Reorder tests
* SEM-420 Test new features (e2e) (#60439)
* Add new tests, simplify toasts, remove long prefix from utils
* Test toasts
* Reuse utils
* Add table picker test for no schemas
* Fix schemaless tables not shown in search
* Add sync options test
* Fix & test prefixes
* Add logs
* Format code
* Coercion strategy test
* Add tests for visibility
* Update assertions
* Add test for tooltips
* Field values tests
* Add tests for filtering
* Add preview assertion
* Refactor preview verification
* Fix showing 403 error in preview
* Add preview tests
* Add preview assertions
* Add preview assertions
* Add preview assertions
* Add preview tests
* Move modals and state handling, add tests for Esc key
* Update unit tests
* Use useDisclosure
* Add extra error status check
* Revert unnecessary changes in cross-version tests
* SEM-419 Increase test coverage (unit tests) (#60491)
* Add new tests, simplify toasts, remove long prefix from utils
* Test toasts
* Reuse utils
* Add table picker test for no schemas
* Fix schemaless tables not shown in search
* Add sync options test
* Fix & test prefixes
* Add logs
* Format code
* Coercion strategy test
* Add tests for visibility
* Update assertions
* Add test for tooltips
* Field values tests
* Add tests for filtering
* Add preview assertion
* Refactor preview verification
* Fix showing 403 error in preview
* Add preview tests
* Add preview assertions
* Add preview assertions
* Add preview assertions
* Add preview tests
* Move modals and state handling, add tests for Esc key
* Update unit tests
* Add FieldOrderPicker unit tests
* Add CurrencyPicker unit tests
* Add FkTargetPicker unit tests
* Add more tests
* Add SemanticTypeAndTargetPicker unit tests
* Remove redundant code
* Move RemappingPicker
* Use useDisclosure
* Add extra error status check
* SEM-247 Clean up old Table Metadata page code (#60557)
* Remove old metadata page
* Move humanizeCoercionStrategy
* Remove unused functions
* Fix SEM-484 (#60600)
* Revert unnecessary change
---------
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
* Closes VIZ-1224 - Make dashcards use chart-specific skeletons (#60090)
* Updates Dashboard cards' loading state to use already-made chart-specific loading skeletons
* Adds SankeySkeleton
* Tweaks MapSkeleton so its fill color can be overridden
* Fixes double name issue in loading skeletons in pinned questions on collections page
* Closes VIZ-1230 - Trigger spinner state when card takes longer to load (#60359)
* Closes VIZ-1218 reset button on data sources
* resets to default only for single datasources cards
* e2e
* e2e
* removed TODO
* simpler
* disable reset btn when already pristine
* revert unnecessary changes to addDataSource
- **UI**: `metabase/ui` components built with Mantine v8
- **Build**: Rspack (primary), Webpack (legacy)
- **Testing**: Jest + React Testing Library, Cypress
### Coding Standards
#### Component Preferences
- Prefer `metabase/ui`components over `metabase/common/components`
- Use `.tsx` for components, `.ts` for utilities
#### Styling
ALWAYS prefer Mantine style props,then CSS modules. DO NOT suggest styled components, they are deprecated.
#### TypeScript Migration
When heavily editing `.js`/`.jsx` files, create a separate PR to convert to TypeScript first, then implement changes.
#### Enterprise Features
Enterprise functionality MUST use the plugin system. It is very important to not expose enterprise code in the OSS version.
#### Testing Requirements
All PRs should include tests. Prefer Unit tests over E2E tests.
#### Localization
All user-facing strings MUST be localized using the ttag library. Localized strings should be complete phrases, do not concatenate a few separately localized strings. You should add context to strings where the meaning of the string might not be obvious in isolation: e.g. "Home" might have different words in some languages depending on whether you're talking about a dwelling or the landing page for a website.
add-new-comment:${{ steps.docs-generation.outcome == 'failure' && contains(steps.docs-generation.outputs.output, 'not included in the documentation') }}
message:"📝 Some exported from `@metabase/embedding-sdk-react` types reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
message:"📝 Some exported types from `@metabase/embedding-sdk-react` reference other types that are not exported, i.e. internal types.<br><br>The internal type reference breaks API documentation generation for the SDK and also may unexpectedly increase the output size of the type declaration file.<br><br>Please check the CI logs to find the name of such type.<br><br>- If a type should be publicly available in the SDK, add a description to it or a TypeDoc annotation and export it from SDK.<br>- If a type is internal and should _not_ be publicly exposed, refactor types to prevent referencing other types that are not exported from SDK.<br><br>You can run `yarn embedding-sdk:docs:generate` locally to verify that the issue has been resolved."
include-log:true
- name:Comment on PR if 'Failed to resolve link' error happens
uses:./.github/actions/notify-pull-request
@@ -144,6 +139,7 @@ jobs:
# See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk/dev.md`
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.