Create action button helper component
It may be helpful to create a component that automatically formats action icon buttons in a way that conforms with usage guidance.
Something very vaguely like:
- accepts an
actionsprop that's an array of objects, each of which defines props to pass to the related action button - When there are fewer than some cutoff number (3? 4?), they are rendered as separate icon buttons
- When there are more than the cutoff number, they are rendered as a dropdown
see discussion at gitlab!182136 (comment 2376097224)
Benefits
- Less repetitive code in FE
- Consistency of layout and behavior
Drawbacks
- Wouldn't apply for haml-based views
- requires refactoring to put in place
- A change to the desired behavior in future requires a new version of gitlab-ui