Skip to content
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

feat(accordion-item, action-bar, action-group, action-pad, tree-item): add open, close, beforeOpen, and beforeClose events for consistent event handling #9775

Draft
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Elijbet
Copy link
Contributor

@Elijbet Elijbet commented Jul 14, 2024

Related Issue: ##4544

Summary

Implement OpenCloseComponent with associated events to accordion-item, action-item, action-group, action-pad, tree-item.

@Elijbet Elijbet changed the title Elijbet/4544 implement open close component feat(accordion-item, action-bar, action-group, action-pad, tree-item): implement OpenCloseComponent Interface Jul 14, 2024
@Elijbet Elijbet changed the title feat(accordion-item, action-bar, action-group, action-pad, tree-item): implement OpenCloseComponent Interface feat(accordion-item, action-bar, action-group, action-pad, tree-item): implement OpenCloseComponent Interface Jul 14, 2024
@Elijbet Elijbet changed the title feat(accordion-item, action-bar, action-group, action-pad, tree-item): implement OpenCloseComponent Interface feat(accordion-item, action-bar, action-group, action-pad, tree-item): add open, close, beforeOpen, and beforeClose events for consistent event handling Jul 16, 2024
@Elijbet
Copy link
Contributor Author

Elijbet commented Jul 24, 2024

action-bar expanded, also expands action-group, which in turn, expands action-menu. These would be forwarding events eventually to action-menu.

But action-menu having both open and expanded props presents a bit of an issue.

action-menu has an internal popover, so it should forward its own events to popover. In the case of open it’s popover that transitions.
 
eg. calciteActionMenuBeforeOpen => calciteBeforeOpen (for popover)

But in case of expanded it’s the action-menu that transitions, so that would be an openClose component itself.
Since we don't have any actionMenuBeforeExpand, we should address an issue where we revisit openClose utility to add handling of the expanded prop to it.

These are some relevant issues listed below. Our latest suggestion is to "expand" the scope of openCloseComponent to something like transitionEventComponent, which would handle multiple types of transitions from open/expanded and whatever else may need it.

Expand openClose commonTest util to account for components with closed/collapsed props #9511
Revisit event names emitted by openCloseComponent util #9513

Copy link
Contributor

github-actions bot commented Aug 1, 2024

This PR has been automatically marked as stale because it has not had recent activity. Please close your PR if it is no longer relevant. Thank you for your contributions.

@github-actions github-actions bot added the Stale Issues or pull requests that have not had recent activity. label Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale Issues or pull requests that have not had recent activity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant