-
Notifications
You must be signed in to change notification settings - Fork 161
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(banner): add expanded input property to the banner #14935
Conversation
Setting the
|
@wnvko I initially expected this to be the behavior of the What’s your suggestion on how this should be handled? Should animations and events be tied to the collapsed property as well? |
@georgianastasov |
@wnvko You're absolutely right, the new @damyanpetev @simeonoff — Would you mind sharing your thoughts on how we should best implement this? Specifically, whether banner events should be triggered from the |
Two things I noticed:
|
I'll echo parts of what @wnvko and @simeonoff already said:
Funnily enough, |
After reviewing the discussion, here's the agreed implementation plan: Property Name
Event Handling
Animation Handling
State Transitions During Animations
|
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.
If you change expanded
to true
while close animation is playing nothing happens!
Here is why. If you have banner which is not collapsed, expanded
is true
and you set expanded
to false
this will call close
method to the internal expansionPanel
. This will then call collapse
method and it will start the close animation. At this point collapsed
is still false
. It will change to true
once animation is finish.
While animation is playing if you change expanded
to true
it will call open
method of the internal expansion panel. This will then call expand
method. In this method the first check is this:
if (!this.collapsed) { // If the panel is already opened, do nothing
return;
}
As expansion panel's collapsed
is still false
nothing will happen here.
Closes #14890
Additional information (check all that apply):
Checklist:
feature/README.MD
updates for the feature docsREADME.MD
CHANGELOG.MD
updates for newly added functionalityng update
migrations for the breaking changes (migrations guidelines)