Esri / calcite-design-system

A monorepo containing the packages for Esri's Calcite Design System
https://developers.arcgis.com/calcite-design-system/
Other
282 stars 76 forks source link

[Action] Support "no text" display - make `label` required, make `text` optional #10190

Open macandcheese opened 2 weeks ago

macandcheese commented 2 weeks ago

Check existing issues

Description

Currently, an Action has a required text property, and a label property that will fallback to the text property value if not provided.

However, it can be valid to not display text within the Action. Currently - to do this you need to pass text="" and it creates undesired visuals within an expanded parent:

Screenshot 2024-08-29 at 4 29 02 PM

Acceptance Criteria

The user should be able to display an action without text - and have it remain accessible through use of a label property.

Relevant Info

No response

Which Component

Action, Action Bar, Action Group, Action Pad

Example Use Case

No response

Priority impact

impact - p3 - not time sensitive

Calcite package

Esri team

Calcite (design)

driskull commented 2 weeks ago

unless we need this to persist when text is displayed conditionally based on expanded behavior of parent Action Bar / Group ??)

Yes, this is so that users don't have to add/remove text in order to toggle it being displayed.

macandcheese commented 2 weeks ago

Yeah that makes sense. Might be work using collapse-disabled or something if we are making other breaking changes to make the use-case for standalone Actions simpler.