-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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(datepicker): add animation to calendar popup #8542
feat(datepicker): add animation to calendar popup #8542
Conversation
8493b5d
to
83c7e2c
Compare
It would be very cool if the sheet would do also a opening along the x-axis like here. |
@theredd0t that's what I was going for initially (the menu has a similar animation), but it looks weird when the animation doesn't originate from the place where the user clicked. |
@crisbeto Yeah I just realized that this would be a "Don't" according to the guidelines. https://material.io/guidelines/motion/choreography.html#choreography-creation |
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.
Looks fantastic, thanks!
ngAfterContentInit() { | ||
this._calendar._focusActiveCell(); | ||
} | ||
|
||
ngOnDestroy() { | ||
if (this._positionChange) { |
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.
should we use the usual _destoryed.next()
?
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 think for this case it's better to go with the subscription, because it allows us to know whether we've subscribed before. Otherwise since we don't dispose of the datepicker content until the datepicker is destroyed, we could end up in a situation where we've subscribed multiple times to the same stream.
Just realized, since this adds an Angular animation to a component that previously didn't have one, it may be a breaking change. @jelbourn should this be part of a patch, minor, or major? |
Adds an animation when opening and closing the datepicker's calendar.
83c7e2c
to
3dca420
Compare
I chatted w/ @StephenFluin and he agreed that adding an animation to a component that didn't have one before would be considered a breaking change since users would have to add |
@jelbourn for 6.0 we might want to consider adding a no-op animation to anything that's supposed to have animations but we haven't got to it yet. That way we can do it at some point without it being breaking |
Unless something changes in Angular, we won't be able to do that; both animations modules import |
@jelbourn By no-op animation I don't mean the |
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of #8542.
Adds an animation when opening and closing the datepicker's calendar. This is a resubmit of angular#8542.
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Adds an animation when opening and closing the datepicker's calendar.
For reference: