Skip to content
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

ActionMenu: Only use checkmarks in menus and improve examples #3994

Merged
merged 11 commits into from
Jan 11, 2024

Conversation

maximedegreve
Copy link
Contributor

@maximedegreve maximedegreve commented Nov 30, 2023

Closes #3878

Changelog

  • Always use checkmarks for menus instead of checkboxes
  • Improve the examples

Before / After

Storybook example (Before/After) Storybook example (Before/After) Storybook example (Before/After) Storybook example (Before/After)

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan

Testing & Reviewing

Merge checklist

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

Copy link

changeset-bot bot commented Nov 30, 2023

🦋 Changeset detected

Latest commit: f117b6b

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

This PR includes changesets to release 1 package
Name Type
@primer/react Minor

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

Copy link
Contributor

github-actions bot commented Nov 30, 2023

size-limit report 📦

Path Size
dist/browser.esm.js 104.75 KB (+0.01% 🔺)
dist/browser.umd.js 105.31 KB (+0.01% 🔺)

@github-actions github-actions bot temporarily deployed to storybook-preview-3994 November 30, 2023 22:23 Inactive
@github-actions github-actions bot temporarily deployed to storybook-preview-3994 November 30, 2023 22:26 Inactive
@maximedegreve maximedegreve marked this pull request as ready for review November 30, 2023 22:31
@maximedegreve maximedegreve requested review from a team and joshblack November 30, 2023 22:31
@maximedegreve
Copy link
Contributor Author

maximedegreve commented Dec 1, 2023

I utilized this search query to determine the effects of my changes on our GitHub platform.

I'm currently investigating which product areas will be impacted by this change and will outline them below. I've also included some further insights on implementations that are unaffected but have potential for enhancement.

Projects

In roadmap project boards, the "milestones" menu will be updated to use checkmarks instead. This change aligns it with other menus, such as the "date fields" menu. However, there's an issue with consistency in how these menus behave. Some close immediately after a selection is made, while others stay open. Ideally, dropdown menus should close once a selection is made. If they need to stay open, a SelectPanel with a dialog and a close button should be used for better accessibility.

Action Required: While the above issue is not critical and will just cause a visual update, it's important to notify the projects team to address these inconsistencies.

Screenshot of dropdown menus in projects

Although my updates won't impact this area, I'd like to mention that I discovered a glitch in the add column feature for boards.

Screenshot of the new board functionality

The field sum menu will change to checkmarks instead of checkboxes. If they want to keep the option after making a selection instead of using e.stopPropagation() they should switch to a SelectPanel.

Screenshot of the field selector

Action Required: The above is not critical since it's only a visual change for them. However the use of e.stopPropagation() in the menu keeps it open after making a selection. This is an accessibility violation.

Pull requests

This experience is currently being developed, so modifying the checkmarks is safe. Importantly, this change will be advantageous for this team, as it will ensure the behavior aligns perfectly with what we aim to address in this PR.

Screenshot of the dropdown in prs

Notification settings

In the notifications, the ActionMenu will change to use checkmarks. However, currently, the menu stays open after a selection is made, which isn't the intended behavior. I've contacted our team to fix this issue. We need to switch to using the SelectPanel instead of the ActionMenu there to solve this problem.

Resolved through despite the tooltip bug. This bug is unrelated and needs to be resolved separately:

Screenshot of the notifications page

Conclusion

From the 23 file matches on the GitHub platform only 7 will be affected because they are either wrapped in the ActionMenu component or have applied role=menu on the ActionList parent. It's worth to note that SelectPanel instances don't get affected as they use the listbox role.

Internal only

Affected

Unaffected

@maximedegreve
Copy link
Contributor Author

I believe it's wise to wait for the Notifications and Memex team to adjust to the above changes before we proceed with the merge.

cc @joshblack @lesliecdubs

@maximedegreve maximedegreve added the 🚧 blocked Someone or something is preventing this from moving forward label Dec 15, 2023
@lesliecdubs
Copy link
Member

@joshblack or @siddharthkp, does validating the changes in this PR fall clearly into either of the epics you are directly working on right now given the impact on ActionMenu a11y and potentially SelectPanel work? If so, we could try to add scope to fix dotcom to those epics. If not, we might need to explicitly plan for how to roll this out in dotcom as part of Q3 work.

What do you think?

@siddharthkp
Copy link
Member

does validating the changes in this PR fall clearly into either of the epics you are directly working on right now given the impact on ActionMenu a11y and potentially SelectPanel work?

Doesn't fall into my path in SelectPanel, sorry! Happy to look into it outside the epic, of course

@github-actions github-actions bot temporarily deployed to storybook-preview-3994 December 19, 2023 16:19 Inactive
@maximedegreve maximedegreve removed the 🚧 blocked Someone or something is preventing this from moving forward label Dec 20, 2023
@maximedegreve
Copy link
Contributor Author

@lesliecdubs @joshblack Internally this pull request was merged which unblocks this. Are you both happy to merge this and agree that the above impact is minimal?

@lesliecdubs
Copy link
Member

@maximedegreve I'm comfortable with merging if @siddharthkp also approves. Should we verify with @tallys from the design perspective as well?

@siddharthkp
Copy link
Member

@maximedegreve: I believe it's wise to wait for the Notifications and Memex team to adjust to the above changes before we proceed with the merge.

Hi 👋 , do you know if the changes you asked for in notifications and memex have been merged?

@maximedegreve
Copy link
Contributor Author

@siddharthkp Memex is informed about the updates. However, these won't cause any disruptions because they only alter the appearance. Besides, the current menu behavior there is already inconsistent as described above.

@maximedegreve maximedegreve added this pull request to the merge queue Jan 11, 2024
Merged via the queue into main with commit c40f765 Jan 11, 2024
30 checks passed
@maximedegreve maximedegreve deleted the feature/better-examples branch January 11, 2024 11:07
@primer primer bot mentioned this pull request Jan 9, 2024
Sign up for free to 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.

ActionMenu: Selected items use checkboxes instead of checkmarks
4 participants