primer / view_components

ViewComponents for the Primer Design System
https://primer.style/components/
MIT License
449 stars 114 forks source link

Don't show the tick when an ActionList::Item has an href #3051

Closed owenniblock closed 1 week ago

owenniblock commented 1 week ago

Authors: Please fill out this form carefully and completely.

Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans. Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.

What are you trying to accomplish?

Closes https://github.com/github/primer/issues/3886

Don't display a checkmark when anchor items are activated

We could alternatively use the tag and check for :a but I figured this approach would work and was less prone to causing problems if folks are using tags in a weird way but still want stuff to be selectable.

Screenshots

Before: SelectPanel with list of links, space for selected item and first item selected

After: SelectPanel with list of links, no space for selected item

Integration

No

List the issues that this change affects.

Closes # (type the GitHub issue number after #)

Risk Assessment

If someone's doing something funky with ItemList or one of its derivatives somewhere we might stop folks being able to see selected items. They shouldn't be adding an href to a list item if they want it to be selectable...

What approach did you choose and why?

It seems more "correct" to check for the tag being a but I felt it was safer to check the href in case of weird usage of the ActionList.

Anything you want to highlight for special attention from reviewers?

Accessibility

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.

changeset-bot[bot] commented 1 week ago

🦋 Changeset detected

Latest commit: 8d675c302d1344fc7206c1ed1caa1d7e8a603523

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

This PR includes changesets to release 1 package | Name | Type | | ----------------------- | ----- | | @primer/view-components | Patch |

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[bot] commented 1 week ago

⚠️ Visual differences found

Our visual comparison tests found UI differences. Please review the differences by viewing the files changed tab to ensure that the changes were intentional.

Review visual differences

owenniblock commented 1 week ago

Replaced with this PR