-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Audit components open
/closed
props for consistency
#6473
Comments
open
/`closed props for consistencyopen
/closed
props for consistency
During our API consistency audit, we defined |
Thanks, @anveshmekala! By all use cases do you mean including Block, Accordion Item, Tree, List, and Action Bar? Those sound like they fit your description of |
I think the original logic still makes sense, should we decide to stick with it. I think we can be more consistent in implementing it though. Based on our audit, I believe the inconsistencies are on Block and List. Both use Tip feels like an outlier here. Its props are |
Looking at Tip again, you are right, it should be in its own category to consider changing to |
Panel, Chip, Notice, etc., also have |
they does fit the definition of expansion, but there is a discussion of using just cc : @jcfranco |
The reason behind using if we replace |
Updated the issue description to complete this design proposal. |
I wasn't aware we had components with Submitting this issue towards the effort: Expand openClose commonTest util to account for components with closed/collapsed props #9511 Also propose introducing clarity in event naming for |
Nice catch @Elijbet. We need to add those events for sure |
Description
An audit to define open and
open
/closed
versesexpanded
/collapsed
properties and use consistently across Calcite components.Audit summary: The audit effort was completed in June 2024, and deprecations and new functionality will be added during the
3.0
breaking change release, with anticipated removal in the4.0
breaking change release.Blocked issues: #6473, #4531, #6789
cc @geospatialem @ashetland @macandcheese @jcfranco
Acceptance Criteria
New components and props should follow this updated pattern:
open
/close
: Toggles visibility of entire component, or its menuexpand
/collapse
: Toggles visibility of more content within a componentCertain components may have need for both an open/close state as well as a expanded/collapsed such as:
[list-item]
can beopen
(component is visible) &collapsed
(child items are hidden) at the same time[panel]
can beopen
(component is visible) &collapsed
(content area is hidden) at the same timeAction items for
3.0
:[list-item]
deprecateopen
& add functionality toexpanded
[block]
deprecateopen
& add functionality toexpanded
Consider an eslint rule to ensure a component does not have both
open
/closed
-or-expanded
/collapsed
Events:
Leverage the
open
/close
utility forexpanded
andcollapsed
. Likely just needs some small functional tweaks. Refer to Eliza's comment below for more context.Link to Figma file
Which Component
Applies across multiple components:
list-item, block
Esri team
Calcite (design)
The text was updated successfully, but these errors were encountered: