Skip to content

Conversation

@siddharthkp
Copy link
Member

@siddharthkp siddharthkp commented Mar 11, 2024

create-new-item.mov

Key changes:

  1. Move focus zone from "children container" to listbox (ActionList)
  2. Add example that opens Dialog component (needs to be controlled because Dialog component doesn't use <dialog> yet)

@changeset-bot
Copy link

changeset-bot bot commented Mar 11, 2024

⚠️ No Changeset found

Latest commit: 19a3cfa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Contributor

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 89.04 KB (-0.03% 🔽)
packages/react/dist/browser.umd.js 89.33 KB (+0.05% 🔺)

const [newLabelDialogOpen, setNewLabelDialogOpen] = React.useState(false)

const openCreateLabelDialog = () => {
setPanelOpen(false)
Copy link
Member Author

@siddharthkp siddharthkp Mar 11, 2024

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 = ({
Copy link
Member Author

@siddharthkp siddharthkp Mar 11, 2024

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 😅

@siddharthkp siddharthkp enabled auto-merge March 18, 2024 10:58
@siddharthkp siddharthkp added this pull request to the merge queue Mar 18, 2024
@joshblack joshblack removed this pull request from the merge queue due to a manual request Mar 18, 2024
@siddharthkp siddharthkp added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit 77bae96 Mar 19, 2024
@siddharthkp siddharthkp deleted the drafts-selectpanel-new-item-story branch March 19, 2024 09:52
lukasoppermann pushed a commit that referenced this pull request Apr 16, 2024
* add story for adding new item

* move focus zone from SelectPanel to ActionList
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changeset This change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants