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

fix(menu): improve menu open animation #5908

Closed
wants to merge 1 commit into from

Conversation

m98
Copy link

@m98 m98 commented Jul 20, 2017

Description

The current open animation behavior for the menus does not look like to follow the Material spec, and it's not elegant. (Material.io video demo).

The menu seems to be somehow broken with the first look, because first you will get an empty (transparent) container which has shadow border, then the content appears inside the container.

You will see slow motion demos in bellow:

The current behavior of the menu open animation:

ezgif com-video-to-gif

The new open animation behavior (after the change):

ezgif com-video-to-gif 1

Side by side view:

animated

What Changed?

The menu container did not have any background color, and instead of that the content of the menu (mat-menu-content) had a white background color, and as far as I know, we don't have any rules in the Material spec that the menu should be transparent until its content appeared.
There is also no need to set the background color for the content of the menu since by this change, we will see just the parent background color.

Other Material Design Menus

Material Design Lite
AngularJS Material
Material guidelines demos

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Jul 20, 2017
@crisbeto
Copy link
Member

The menu animation was changed in #5361. It currently looks like this in master:
a

@m98
Copy link
Author

m98 commented Jul 20, 2017

Thank you @crisbeto
I fetched the latest pushes before I work on this change, but the menu was working like before!
Do you know why I did not get latest changes? (Like your PR changed the behavior of the menu, but I still was getting the previous animation behavior)

Your change made the menu much nicer. Thanks 👍

Update:
I updated my local repository before your PR merge!

@fxck
Copy link
Contributor

fxck commented Jul 20, 2017

There already was a PR for this #3941

@m98
Copy link
Author

m98 commented Jul 20, 2017

As already discussed, there already was a PR for this #3941

@m98 m98 closed this Jul 20, 2017
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
cla: yes PR author has agreed to Google's Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants