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 77 forks source link

Consolidate closing/removing approach across components #6789

Open jcfranco opened 1 year ago

jcfranco commented 1 year ago

Description

This stems from https://github.com/Esri/calcite-components/pull/6775#discussion_r1167281298:

We should consolidate how we handle closed/removed items. I've noticed we have the following discrepancies:

  1. naming: closable vs removable
  2. approach: hiding vs removing the node

cc @driskull

Proposed Advantages

Consistency.

Which Component

All closables/removables:

component prop name approach
alert closable hidden
chip closable hidden
flow-item removable removed
list-item closable hidden
modal (check for deprecation with dialog addition) closable hidden
notice closable hidden
panel closable removed
~pick-list-item~ (deprecated) ~closable~ ~removed~
popover closable hidden
~tip~ (deprecated) ~closedDisabled~ ~hidden~
~value-list-item~ (deprecated) ~removable~ ~removed~

Relevant Info

No response

driskull commented 1 year ago

I think the only "removable" ones are flow-item and value-list-item. We can possibly ignore value-list-item as we plan on deprecating it. flow-item is pretty unique and we did have an issue to change it to not remove any child elements but we kind of scrapped that for now. We could revisit it but it would be a breaking change.

driskull commented 1 year ago

A lot of the nodes where we set them to hidden instead of removing them is because inside of those nodes we have a slot element and we don't want to remove the slot element conditionally in order to keep using onslotchange events.

geospatialem commented 4 months ago

Blocked by the efforts of https://github.com/Esri/calcite-design-system/issues/6473.