react icon indicating copy to clipboard operation
react copied to clipboard

ActionList.Group should allow for TrailingActions

Open mattcosta7 opened this issue 3 years ago • 16 comments

Describe the bug

ActionList.Group should allow for a TrailingAction, potentially with an api similar to this one, to maintain consistency with ActionList.Item

<ActionList.Group>
  <ActionList.GroupHeader>
    Title
    <ActionList.TrailingVisual>
      {/* reviewer dropdown */}
    </ActionList.TrailingVisual>
  </ActionList.GroupHeader>

  <ActionList.Item>
    {/* ... */}
  </ActionList.Item>

  {/* ... */}
</ActionList.Group>

Expected behavior

A user can define a trailing action for a group which appears as a button/link on the end of the group header, similar to the provided sample screenshot

Screenshots

ActionGroupSample

Additional context

Slack thread

mattcosta7 avatar Apr 22 '22 12:04 mattcosta7

Thanks for filing! We're going to explore the accessibility implications of this and will get back to you.

lesliecdubs avatar Apr 25 '22 15:04 lesliecdubs

Leaving notes for the future:

The mock up here is a perfect use case for NavigationList, so we could pick this up with the upcoming work. cc @colebemis

Because NavigationList uses ActionList under the hood, we would need to add this to ActionList.

However, we should add safe guards in place for ActionMenu (which also uses ActionList) because a button next to group title inside role=group would need different semantics (maybe even a different design pattern).

For now, we can choose to simply no allow a trailingAction inside an ActionMenu Group

siddharthkp avatar Apr 26 '22 13:04 siddharthkp

Definitely @siddharthkp ! We actually mocked this up as an implementation of navigationlist since there wasn't a component for it yet :-)

mattcosta7 avatar Apr 26 '22 13:04 mattcosta7

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Oct 23 '22 14:10 github-actions[bot]

Not stale

mattcosta7 avatar Oct 23 '22 21:10 mattcosta7

Hi! This issue has been marked as stale because it has been open with no activity for 180 days. You can comment on the issue or remove the stale label to keep it open. If you do nothing, this issue will be closed in 7 days.

github-actions[bot] avatar Oct 08 '23 16:10 github-actions[bot]

Adding some additional use cases:

Search workflows

This is live in the repo Actions tab (ex: https://github.com/github/github/actions)

image

Manage knowledge bases

This is from a new design for Copilot chat

image

dylanatsmith avatar Feb 14 '24 11:02 dylanatsmith

Uh oh! @dylanatsmith, the image you shared is missing helpful alt text. Check https://github.com/primer/react/issues/2043#issuecomment-1943608899.

Alt text is an invisible description that helps screen readers describe images to blind or low-vision users. If you are using markdown to display images, add your alt text inside the brackets of the markdown image.

Learn more about alt text at Basic writing and formatting syntax: images on GitHub Docs.

github-actions[bot] avatar Feb 14 '24 11:02 github-actions[bot]