Skip to content

Refactor(ActionList): ActionList.Item should render content as a button if parent is not interactive. - #3284

Merged
radglob merged 60 commits into
mainfrom
refactor-actionlist-item-as-button
Jun 6, 2023
Merged

Refactor(ActionList): ActionList.Item should render content as a button if parent is not interactive.#3284
radglob merged 60 commits into
mainfrom
refactor-actionlist-item-as-button

Conversation

@radglob

Copy link
Copy Markdown
Contributor

Continuing to align the ActionList semantics in PRC to match PVC. The ActionList.Item content should render an interactive button. Exceptions are when the outermost element of the ActionList.Item is an interactive element. Examples of this include NavList (where ActionList.Items can be render as a button) and in ActionMenu, where the top-level element is made interactive with the menuitem role.

Screenshots

Please provide before/after screenshots for any visual changes

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.

@radglob
radglob requested review from a team and josepmartinsMay 15, 2023 13:24
@changeset-bot

changeset-botBot commented May 15, 2023

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 2725253

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
NameType
@primer/reactPatch

Not sure what this means? Click here to learn what changesets are.

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

@github-actions

github-actionsBot commented May 15, 2023

Copy link
Copy Markdown
Contributor

size-limit report 📦

PathSize
dist/browser.esm.js101.8 KB (+0.25% 🔺)
dist/browser.umd.js102.3 KB (+0.22% 🔺)

@radglob
radglob temporarily deployed to github-pages May 15, 2023 13:32 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 13:32 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 13:32 Inactive
@radglobradglob added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 15, 2023
@github-actionsgithub-actionsBot removed the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 15, 2023
@primer
primerBot temporarily deployed to github-pages May 15, 2023 13:55 Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 13:55 Inactive
@radglob
radglob temporarily deployed to github-pages May 15, 2023 14:59 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 14:59 Inactive
@radglob
radglob temporarily deployed to github-pages May 15, 2023 16:00 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 16:00 Inactive
@radglob
radglob temporarily deployed to github-pages May 15, 2023 17:03 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 15, 2023 17:03 Inactive
@radglobradglob added the update snapshots 🤖 Command that updates VRT snapshots on the pull request label May 15, 2023
@radglob
radglob temporarily deployed to github-pages May 15, 2023 18:12 — with GitHub Actions Inactive
@radglob
radglob temporarily deployed to github-pages May 26, 2023 13:32 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 26, 2023 13:32 Inactive
@radglob
radglob temporarily deployed to github-pages May 26, 2023 16:42 — with GitHub Actions Inactive
@github-actions
github-actionsBot temporarily deployed to storybook-preview-3284 May 26, 2023 16:43 Inactive
@radglob
radglob temporarily deployed to github-pages May 30, 2023 14:37 — with GitHub Actions Inactive
radgloband others added 3 commits May 30, 2023 13:01
…`ActionList.Item`'s `onSelect` handler by @gr2m (#3346)
* fix: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`'s `onSelect` handler (#3163)
* test: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`'s `onSelect` handler
Failing test for #3162
* fix: prevent closing menu when `event.preventDefault()` is called on `ActionList.Item`ߴs `onSelect` handler
* add storybook example: Delayed Menu Close
* update docs
* docs: changeset
* Update changelog
---------
Co-authored-by: Siddharth Kshetrapal <siddharthkp@github.com>
* Update generated/components.json
---------
Co-authored-by: Gregor Martynus <39992+gr2m@users.noreply.github.com>
Co-authored-by: siddharthkp <siddharthkp@users.noreply.github.com>

@kendallgassnerkendallgassner left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following up on this pr! I approve these changes from an accessibiltiy standpoint but we may want one more set of eyes on this.

@lesliecdubs

Copy link
Copy Markdown
Member

@siddharthkp would you be willing to give this a review 👀 ?

Comment threadsrc/ActionList/Item.tsx
Comment threadsrc/ActionList/Item.tsx Outdated
Comment threadsrc/ActionList/Item.tsx
Comment threadsrc/ActionList/Item.tsx
Comment threadsrc/UnderlineNav2/UnderlineNav2.features.stories.tsx
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@radglob@lesliecdubs@mperrotti@kendallgassner