-
Notifications
You must be signed in to change notification settings - Fork 77
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(action-menu
, block-section
, list-item
, menu-item
): add open, close, beforeOpen, and beforeClose events for consistent event handling
#9736
base: dev
Are you sure you want to change the base?
Conversation
action-menu
, block-section
, list-item
, menu-item
): implement OpenCloseComponent interface
action-menu
, block-section
, list-item
, menu-item
): implement OpenCloseComponent interfaceaction-menu
, block-section
, list-item
, menu-item
): adds open, close, beforeOpen, and beforeClose events for consistent event handling
action-menu
, block-section
, list-item
, menu-item
): adds open, close, beforeOpen, and beforeClose events for consistent event handlingaction-menu
, block-section
, list-item
, menu-item
): add open, close, beforeOpen, and beforeClose events for consistent event handling
I'd like to suggest we normalize all components to a single "Closable" class that includes these evens as well as the template for a consistent close button UI that can be added to the JSX. @jcfranco |
@alisonailea Let's discuss that separately since there are a few challenges with your suggestion. Namely,
|
@@ -465,6 +513,7 @@ export class CalciteMenuItem implements LoadableComponent, T9nComponent, Localiz | |||
[CSS.container]: true, | |||
[CSS.isParentVertical]: this.topLevelMenuLayout === "vertical", | |||
}} | |||
ref={this.setTransitionEl} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this overwrite the other transitionEl set on line 472?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not exactly sure where the right place for it is. It's kind of a Russian doll situation. When you slot items into menu-items
it renders menu
. So you could set it on the container
for menu-item
, or menu
itself?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Lets wait for @jcfranco to review.
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. |
Related Issue: #6017, #4544
Summary
Implement
OpenCloseComponent
with associated events toaction-menu
,block-section
,list-item
,menu-item
.