Skip to content
Snippets Groups Projects
Unverified Commit e8222896 authored by Kamil Mielnik's avatar Kamil Mielnik Committed by GitHub
Browse files

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
parent 716dca1f
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment