Repository navigation
Add drag & drop support for Toolbar items - #57
Merged
Merged
Conversation
Co-authored-by: einari <134365+einari@users.noreply.github.com> Agent-Logs-Url: https://github.com/Cratis/Components/sessions/e4265e31-5967-4ebd-bfed-f714e56c82d9
Copilot
AI
changed the title
[WIP] Add support for drag and drop elements from the toolbar
Add drag & drop support for Toolbar items
Mar 25, 2026
Contributor
|
@copilot Fix the build error (run "yarn ci" from root) |
Co-authored-by: einari <134365+einari@users.noreply.github.com> Agent-Logs-Url: https://github.com/Cratis/Components/sessions/04df781e-134b-4ec7-830c-967198d30721
Contributor
Author
Fixed in ee1344e. The root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Toolbar buttons can now be dragged onto a canvas or surface, enabling tool-palette workflows. Each button can carry arbitrary
datafor identification; drop targets read it via the standardapplication/jsonDataTransfer entry.Added
draggable?: booleananddata?: unknownprops onToolbarButton— opt a single button into drag & drop and attach identification dataonDragStart?: (data, event) => voidonToolbarButton— per-button drag-start callbackdraggable?: booleanonToolbar— makes every childToolbarButtondraggable without per-button wiringonItemDragStart?: (data, event) => voidonToolbar— single callback for any child being draggedToolbarDragContext— internal React context propagating drag settings fromToolbartoToolbarButtonthrough any intermediate wrappers (ToolbarSection, etc.)cursor: grab/grabbingCSS for draggable buttonsDragAndDropStorybook story with a live canvas drop targetdraggableprop, inheriteddraggablefrom parentToolbar, non-draggable defaultDocumentation/Toolbar/drag-and-drop.mdwith usage examplesFixed
"ignoreDeprecations": "6.0"to roottsconfig.jsonto silence TypeScript 7.x errors caused by pre-existing deprecated compiler options (downlevelIterationandbaseUrl), restoring the CI buildOriginal prompt
💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.