calcite-design-system
calcite-design-system copied to clipboard
Revisit event names emitted by openCloseComponent util
Description
Revisit event names emitted by openCloseComponent util.
Emitting open/close
events when expanded/collapsed
might be misleading and won't work for cases where we have both props (e.g., list, action-menu).
As an alternative consider open/close
(or some other name) as the main events and add a prop to indicate which property it relates to.
Consider expanding the scope of openCloseComponent to something like transitionEventComponent that would handle multiple types of transitions from open/expanded and whatever else may need it.
Blocked issues: https://github.com/Esri/calcite-design-system/issues/6017, https://github.com/Esri/calcite-design-system/issues/4544
Proposed Advantages
More clarity and accuracy in event naming, and compatibility with cases where both expanded/collapsed
and open/closed
props are present.
Which Component
openCloseComponent util
Relevant Info
No response
Calcite package
- [X] @esri/calcite-components
- [ ] @esri/calcite-components-angular
- [ ] @esri/calcite-components-react
- [ ] @esri/calcite-design-tokens
- [ ] @esri/eslint-plugin-calcite-components