-
- Downloads
Migrate click behavior column computation to MLv2 (#37438)
* Extract click targets for native * Add checks for mbql queries * Add isa method * Update styling * Add dimensions handling for native questions * Add a workaround to get proper columns * [MLv2] Add `legacy-column->metadata` for converting `DatasetColumn` The query and stage are unfortunately required to correctly handle aggregation references. Note that the JS version of this name is `legacy_column__GT_metadata`, with the double underscore. * Add TS wrapper * fixup! Merge remote-tracking branch 'origin/mblib-dataset-column-conv' into click-behavior-draft * Fix another test * Fix test * Use correct query in filtering logic * Fix typecheck * Make code cleaner * Make question a mandatory argument * Correct types * oops * [MLv2] Add `legacy-column->metadata` for converting `DatasetColumn` The query and stage are unfortunately required to correctly handle aggregation references. Note that the JS version of this name is `legacy_column__GT_metadata`, with the double underscore. * Add TS wrapper * [MLv2] Add `compatible-type?` and JS-friendly wrapper `metabase.lib.types.isa/compatible-type?` returns true if the two columns belong to the same type family (strings, numbers, temporal) or the type of one column `isa?` subtype of the other. The `lib.js/compatible-type?` wrapper can handle JS `DatasetColumn` values as well as CLJS `:metadata/column` ones. Fixes #37501. (Unblocks #37328.) * Give a try assignable * [MLv2] Add `compatible-type?` and JS-friendly wrapper `metabase.lib.types.isa/compatible-type?` returns true if the two columns belong to the same type family (strings, numbers, temporal) or the type of one column `isa?` subtype of the other. The `lib.js/compatible-type?` wrapper can handle JS `DatasetColumn` values as well as CLJS `:metadata/column` ones. Fixes #37501. (Unblocks #37328.) * Address recent changes --------- Co-authored-by:Uladzimir Havenchyk <uladzimir.dev@gmail.com> Co-authored-by:
Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com> Co-authored-by:
Braden Shepherdson <braden@metabase.com> Co-authored-by:
Kamil Mielnik <kamil@kamilmielnik.com>
Showing
- e2e/test/scenarios/dashboard-cards/click-behavior.cy.spec.js 5 additions, 2 deletionse2e/test/scenarios/dashboard-cards/click-behavior.cy.spec.js
- e2e/test/scenarios/dashboard-cards/dashboard-drill.cy.spec.js 2 additions, 2 deletions...test/scenarios/dashboard-cards/dashboard-drill.cy.spec.js
- e2e/test/scenarios/dashboard/reproductions/17879-date-parameter-mapping.cy.spec.js 5 additions, 7 deletions...ard/reproductions/17879-date-parameter-mapping.cy.spec.js
- frontend/src/metabase-lib/column_types.ts 8 additions, 0 deletionsfrontend/src/metabase-lib/column_types.ts
- frontend/src/metabase-lib/parameters/utils/click-behavior.ts 119 additions, 56 deletionsfrontend/src/metabase-lib/parameters/utils/click-behavior.ts
- frontend/src/metabase-lib/parameters/utils/click-behavior.unit.spec.ts 45 additions, 39 deletions...metabase-lib/parameters/utils/click-behavior.unit.spec.ts
- frontend/src/metabase-lib/queries/NativeQuery.ts 3 additions, 1 deletionfrontend/src/metabase-lib/queries/NativeQuery.ts
- frontend/src/metabase-lib/queries/Query.ts 2 additions, 1 deletionfrontend/src/metabase-lib/queries/Query.ts
- frontend/src/metabase/dashboard/components/ClickMappings.jsx 11 additions, 4 deletionsfrontend/src/metabase/dashboard/components/ClickMappings.jsx
Loading
Please register or sign in to comment