Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] reorder tooltips #2378

Merged
merged 1 commit into from Oct 20, 2023
Merged

[feat] reorder tooltips #2378

merged 1 commit into from Oct 20, 2023

Conversation

igorDykhta
Copy link
Collaborator

PR Description

This PR adds support for tooltips reordering in chickleted input using dnd-kit.

  1. Add DndContext, SortableContext, and useSortable in chickleted-input.tsx, and handleDragEnd to reorder tooltips by drag-and-drop.
  2. To get reorder function and datasetId, we need to trace the DOM tree: TooltipConfig -> (multi) DatasetTooltipConfig -> FieldSelector -> ItemSelector -> ChickletedInput & Typeahead, and create reorderItems as a prop of FieldSelector. In tooltip-config, replace onClick and onSelect with useCallback.
  3. As we are using CustomChickletComponent created by TooltipChickletFactory, drag-and-drop props are passed to TooltipChicklet.

Concerns

Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
@jwasilgeo
Copy link
Collaborator

cc @albatross97

@igorDykhta igorDykhta merged commit 2500a27 into master Oct 20, 2023
8 checks passed
@delete-merged-branch delete-merged-branch bot deleted the igr/ups-reorder-tooltips branch October 20, 2023 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants