WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.38k stars 4.15k forks source link

Convert to component: Badge #61106

Open jameskoster opened 5 months ago

jameskoster commented 5 months ago

A recently-merged data views feature allows consumers to display field values as a 'badge' in grid layout. This is utilised in the Patterns page to communicate sync status:

Screenshot 2024-04-25 at 15 12 13

This element will likely have applications beyond data views, so it may be worth extracting and converting to a reusable component.

jasmussen commented 5 months ago

Indeed, that seems useful. However it's probably important to do that effort only if and when the need for this chip emerges organically.

jameskoster commented 5 months ago

In addition to badge fields in data views, another potential use case is https://github.com/WordPress/gutenberg/issues/57763.

But yes, no need to rush for only one or two applications.

jameskoster commented 5 months ago

Another potential use case for the badge: https://github.com/WordPress/gutenberg/issues/38277#issuecomment-2090312644