-
- Downloads
Allow users to link dashcard to dashboard tab in Click Behavior sidebar (#35311)
* Rename click-behavior.unit.spec.js to click-behavior.unit.spec.ts * Rename click-behavior.js to click-behavior.ts * Fix typo * Type formatDateForParameterType * Move unit tests close to the file they're testing * Add type guards for ActionClickBehavior types * Replace isValidImplicitActionClickBehavior with an actual type guard * Type notRelativeDateOrRange * Add missing argument to formatDateForParameterType call * Type baseTypeFilterForParameterType * Remove redundant attribute * Remove unused isAction * Mark arguments as optional * Inline getTargetsWithSourceFilters, remove getTargetsForAction * Type clickBehaviorIsValid * Add type guards * Revert "Add type guards" This reverts commit 16492d1cbfbc2b231c18b91076e0151a59a3ce66. * Type getDataFromClicked - update unit tests for userAttributes * Make formatValueForLinkTemplate type-safe * Properly define SourceFilters, move types to top of the file * Remove redundant condition * Type getTargetsForDashboard * Introduce ClickBehaviorParameterSource & ClickBehaviorParameterTarget * Fix Parameter['type'] * Refactor getTargetForQueryParams & getParameter to TS * Improve typing * Type formatSourceForTarget * Migrate metabase-lib/types/constants to TS * Improve getTargetsForQuestion typing * Introduce ClickBehaviorVariableTarget * Migrate getTargetsForQuestion to TS * Fix typing errors * Fix typing in tests * Fix typing in tests * Trick GH into giving a nice diff * Revert "Trick GH into giving a nice diff" This reverts commit 2adfc1d7232d6e82056756373c154c65c006361a. * Add an explanatory comment * Remove redundant checks * Rename isRecord to isObject * Remove redundant check * Allow null value for TemplateTag['default'] * Fix tests * Remove redundant if * Fix user.login_attributes type * Connect dashboard tabs in LinkedEntityPicker * Split EntityCustomDestinationClickBehavior into DashboardCustomDestinationClickBehavior & QuestionCustomDestinationClickBehavior * Add tabId prop to DashboardCustomDestinationClickBehavior * Rename component to match the filename * Connect a dropdown to change dashboard tab * Remove controversial effect * Make the click work with tabId * Reuse ArbitraryCustomDestinationClickBehavior["linkType"] * Reset tabId when changing dashboard targetId * Avoid casting undefined to string * Bring back the effect to set the tabIOd to match the comment in DashboardCustomDestinationClickBehavior['tabId'] * Rename isDash to isDashboard * Add migration for deleted tab * Add assertions for single-tab dashboards * Add a test for setting dashboard tab * Add assertions for click behavior after removing target tab * Add a test for tables * Use mantine instead of styled components * Rename parametersQueryParams to baseQueryParams * Remove commented-out code * Format code * Add assertion that tab is removed from dropdown * Add a test case
Showing
- e2e/test/scenarios/dashboard-cards/click-behavior.cy.spec.js 213 additions, 0 deletionse2e/test/scenarios/dashboard-cards/click-behavior.cy.spec.js
- frontend/src/metabase-lib/queries/drills/dashboard-click-drill.js 6 additions, 1 deletion.../src/metabase-lib/queries/drills/dashboard-click-drill.js
- frontend/src/metabase-types/api/click-behavior.ts 22 additions, 7 deletionsfrontend/src/metabase-types/api/click-behavior.ts
- frontend/src/metabase/dashboard/components/ClickBehaviorSidebar/ClickBehaviorSidebarContent.tsx 2 additions, 2 deletions...ents/ClickBehaviorSidebar/ClickBehaviorSidebarContent.tsx
- frontend/src/metabase/dashboard/components/ClickBehaviorSidebar/CrossfilterOptions.tsx 1 addition, 1 deletion...rd/components/ClickBehaviorSidebar/CrossfilterOptions.tsx
- frontend/src/metabase/dashboard/components/ClickBehaviorSidebar/LinkOptions/LinkedEntityPicker.tsx 103 additions, 13 deletions...s/ClickBehaviorSidebar/LinkOptions/LinkedEntityPicker.tsx
- frontend/src/metabase/dashboard/components/ClickMappings.jsx 5 additions, 3 deletionsfrontend/src/metabase/dashboard/components/ClickMappings.jsx
Loading
Please register or sign in to comment