react icon indicating copy to clipboard operation
react copied to clipboard

Allow customizing `ActionBar` overflow menu label, or default to "More items"

Open iansan5653 opened this issue 10 months ago • 8 comments

The label for the ActionBar overflow menu is forced to be More {menuLabel} items. This means that for any well-formed, semantic label for the action bar, the overflow menu is going to have a nonsense label/tooltip.

For example, logical names for the toolbar include "Formatting tools", "Issue actions", "Repository navigation", etc. The resulting overflow menu names for these are "More Formatting tools items", "More Issue actions items", "More Repository navigation items". They all have bad capitalization, are long for a button label, and most just don't make sense with two plural nouns.

I think one easy solution would just be to just change the label to "More items". This is generic, but should be fine because it's always nested inside a labeled toolbar, so it's clear based on context what it's referring to. It works in every context and is succinct and clear.

iansan5653 avatar Jan 09 '26 20:01 iansan5653

Hi, is this issue still open? I’d be happy to work on it and submit a PR if that’s helpful.

harshbhonsle avatar Jan 11 '26 15:01 harshbhonsle

Hi @harshbhonsle, this hasn't been picked up yet. Do you want to give it a go? If so, please assign yourself to the issue and let us know if you have questions.

lesliecdubs avatar Jan 27 '26 22:01 lesliecdubs

Hi @lesliecdubs, thanks for confirming! Yes, I’d be happy to take this on. My approach will be to first locate where the overflow label is defined in the ActionBar component, then simplify the default to "More items" while also adding a prop to allow customization if needed. After that, I’ll update tests and documentation to reflect the change. I’ll go ahead and assign myself to the issue and start working on a PR.

harshbhonsle avatar Jan 30 '26 13:01 harshbhonsle

Thanks, sounds like a good plan to me! When you're ready, mark your PR as "ready for review" and someone on the team will take a look. In the meantime, you can let us know here if you run into any questions or problems.

lesliecdubs avatar Jan 30 '26 21:01 lesliecdubs

Thanks for your patience — I was occupied with some exams, so apologies for the delay in getting this PR submitted. The fix is now ready for review. Please let me know if there are any changes or adjustments you’d like me to make.

harshbhonsle avatar Feb 10 '26 13:02 harshbhonsle

Thanks for the PR @harshbhonsle! I'll be taking a look shortly!

TylerJDev avatar Feb 13 '26 23:02 TylerJDev

Left a few comments @harshbhonsle, let me know if anything comes up! Thank you for the contribution too!

TylerJDev avatar Feb 13 '26 23:02 TylerJDev

See https://github.com/primer/react/pull/7520#issuecomment-4723540076

lesliecdubs avatar Jun 16 '26 20:06 lesliecdubs