Skip to content

SelectPanel2: Add story for "create new item" - #4377

Merged
siddharthkp merged 2 commits into
mainfrom
drafts-selectpanel-new-item-story
Mar 19, 2024
Merged

SelectPanel2: Add story for "create new item"#4377
siddharthkp merged 2 commits into
mainfrom
drafts-selectpanel-new-item-story

Conversation

@siddharthkp

@siddharthkpsiddharthkp commented Mar 11, 2024

Copy link
Copy Markdown
Member
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
Copy Markdown

⚠️ 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
Copy Markdown
Contributor

size-limit report 📦

PathSize
packages/react/dist/browser.esm.js89.04 KB (-0.03% 🔽)
packages/react/dist/browser.umd.js89.33 KB (+0.05% 🔺)

@github-actions
github-actionsBottemporarily deployed to storybook-preview-4377 March 11, 2024 15:26 Inactive
@siddharthkp
siddharthkp marked this pull request as ready for review March 11, 2024 15:29
@siddharthkp
siddharthkp requested a review from a team as a code ownerMarch 11, 2024 15:29
const [newLabelDialogOpen, setNewLabelDialogOpen] = React.useState(false)

const openCreateLabelDialog = () => {
setPanelOpen(false)

@siddharthkpsiddharthkpMar 11, 2024

Copy link
Copy Markdown
MemberAuthor

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 = ({

@siddharthkpsiddharthkpMar 11, 2024

Copy link
Copy Markdown
MemberAuthor

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 added this pull request to the merge queueMar 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 queueMar 19, 2024
Merged via the queue into main with commit 77bae96Mar 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 freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip changesetThis change does not need a changelog

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@siddharthkp@joshblack