-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(draggableTabs): Add new draggable tabs component #75025
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
Conversation
Bundle ReportChanges will increase total bundle size by 31.96kB ⬆️
|
| export interface DraggableTabListItemProps extends ItemProps<any> { | ||
| key: string | number; | ||
| disabled?: boolean; | ||
| hidden?: boolean; | ||
| to?: LocationDescriptor; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently exactly the same as the current TabListItemProps, but there will eventually be new props added that are specific to the draggable version.
|
Screen.Recording.2024-07-25.at.3.58.18.PM.mov |
| } | ||
| padding: ${space(0.5)} ${space(1)}; | ||
| padding: ${space(0.75)} ${space(1.5)}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
476abae to
fb6872b
Compare
malwilley
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tabs and drag functionality is looking really good!
| </p> | ||
| <SizingWindow> | ||
| <TabBarContainer> | ||
| <DraggableTabBar |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine for now, but generally story files should only import from the component they are demo'ing. So we just need to make sure to come back to this later.


This PR creates the
<DraggableTabs/>component along with many supporting components. It utilizes the new tab variant recently introduced, and adds support for reordering them via dragging (implemented w/ Framer motion).This PR contains a subset of changes from a previous PR that contained a lot of new changes to the draggable tabs component, and it will be the first in a series of PRs that break up that PR into smaller chunks. This PR should be the largest of them all, since it creates all of the draggable tabs components. I have tried to pare the old PR down to only contain the changes necessary to get the draggable tabs to be actually draggable (using Framer motion), but please feel free to comment on anything that looks like it may be an artifact of these changes.
Known issues in this current implementation that will be fixed in subsequent PRs:
Screen.Recording.2024-07-25.at.2.52.52.PM.mov