List button widget
Buttons in list views are a pattern we're using in quite a few places, but the various implementations are all different. It'd be great to consolidate this and provide an actual standard widget.
Most of the use cases seem to be a single clear/delete/reset buttons at the end of a list, often with destructive styling.
Examples in the wild
-
Fractal Account Settings
-
Clear cache and reset file associations in the Applications panel:
- File History & Trash in the Privacy Panel:
- Clear recently opened safes list in Secrets:
- Clear History in Text Editor:
Proposal
I think a button with the thickness of a pill button and the border radius of a list row would work here. We already had this in the Patterns mockups a while back, and given the direction things have evolved in in various apps I think that'd still make the most sense.
What I'm not sure about is whether we should account for the multiple buttons case, like in the Trash example. It's awkward to have two buttons with short labels take up a full row rather than being next to one another. Perhaps it should be possible to have multiple buttons next to each other if the labels are short and have them evenly split the width?