-
Notifications
You must be signed in to change notification settings - Fork 646
SelectPanel2: Add story for "create new item" #4377
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
|
size-limit report 📦
|
| const [newLabelDialogOpen, setNewLabelDialogOpen] = React.useState(false) | ||
|
|
||
| const openCreateLabelDialog = () => { | ||
| setPanelOpen(false) |
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.
Note for reviewer:
This is a bit unfortunate, you have to control the open state of SelectPanel because SelectPanel uses <dialog> (top layer) but Dialog uses portal not <dialog> so Dialog would render under the panel 🤦
This would change once we pick up #3840 again
| ) | ||
| } | ||
|
|
||
| const CreateNewLabelDialog = ({ |
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.
Note for reviewer: The code here isn't ideal, I tried to make it a little more accessible in the story but the underlying component needs work 😢
This isn't the focus of the PR/epic though, so I just added a Flash banner telling people not to copy this part of code 😅
* add story for adding new item * move focus zone from SelectPanel to ActionList
create-new-item.mov
Key changes:
<dialog>yet)