Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

speedial(actions): scale animation shown on load #6344

Closed
epelc opened this issue Dec 16, 2015 · 13 comments
Closed

speedial(actions): scale animation shown on load #6344

epelc opened this issue Dec 16, 2015 · 13 comments
Assignees
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. pr: merge ready This PR is ready for a caretaker to review type: bug
Milestone

Comments

@epelc
Copy link
Contributor

epelc commented Dec 16, 2015

The md-scale animation is broken on load in 1.0.0

It starts open but all the icons are tiny. It should be closed instead.
image

Here is a demo on codepen.

Note to get it to show on codepen I had to remove the bindings for md-direction and statically set the class to md-scale. The bug is also slightly different on codepen then in a real app. It will show the close animation when you refresh the page(clicking save/editing doesn't show it). I'd recommend running it locally outside of codepen if you can.

Tested in chrome 47.0.2526.80 m (64-bit) and 47.0.2526.106 m (64-bit) on windows 7 64 bit

@topherfangio can you look at this?

@topherfangio
Copy link
Contributor

@epelc Can you please test adding ng-cloak to the speed dial (per my comment in #6111) to see if it resolves this issue as well?

Thanks!

@topherfangio
Copy link
Contributor

Actually, based on the Codepen you provided, it looks like the ng-cloak doesn't resolve it. Apologies for not testing it myself.

However, it looks like the following bit of CSS should do the trick. We'll see if we can get this added in 1.0.1 to correct the issue.

.md-scale:not(.md-is-open) .md-fab-action-item {
  opacity: 0;
}

@epelc
Copy link
Contributor Author

epelc commented Dec 16, 2015

Just so it's noted here that css fixes it with .md-scale

@epelc
Copy link
Contributor Author

epelc commented Dec 16, 2015

@topherfangio you also do not need to use ng-cloak with md-scale if you add the css. But you still need it for md-fling.

Maybe some different css could fix it for md-fling so you don't have to rewrite the animations to use absolute positioning.

@topherfangio
Copy link
Contributor

@epelc Indeed. And for reference, the same hack specifically does not fix it with .md-fling as that causes other problems.

@ThomasBurleson ThomasBurleson modified the milestones: 1.0.1, 1.0.2 Jan 5, 2016
@ThomasBurleson ThomasBurleson added P1: urgent Urgent issues that should be addressed in the next minor or patch release. and removed priority: high labels Jan 13, 2016
@chughk1
Copy link

chughk1 commented Jan 19, 2016

I tried the css workaround it fixes the issue of showing small icons but if I hover over I can still see the tooltip on the icons. Also the cursor changes to a pointer as if you can click on a button. If needed I can provide a plunkr for reproducing the issue.

@topherfangio
Copy link
Contributor

@chughk1 Try the following temporary fix:

.md-scale:not(.md-is-open) .md-fab-action-item {
    opacity: 0;
    transform: scale(0);
}

I'm hoping to add this soon to the standard CSS, but I need to test it a bit more first.

@chughk1
Copy link

chughk1 commented Jan 19, 2016

@topherfangio That didn't fix the issue.

@topherfangio topherfangio modified the milestones: 1.0.3, 1.0.2 Jan 20, 2016
topherfangio added a commit to profoundry-us/material that referenced this issue Jan 20, 2016
…sed.

When using the `scale` animation, the FAB Speed Dial's action items could
sometimes appear as small dots on the screen even when the component was
closed.

This was due to an old bug where closing a dialog from a hidden action
item was throwing an issue. This has since been fixed so we can revert
this back to the original code that used `scale(0)` instead of
`scale(0.1)` which ensured that the dialog always had a button to animate
to when closing.

Also fix an issue with the `ng-hide` animation in the "More Options" demo.

Fixes angular#6344. Fixes angular#6670.
@topherfangio
Copy link
Contributor

@chughk1 Apologies. I dug into it a bit more and the JS is actually setting this as a style during the animation, so the CSS override I suggested simply wouldn't apply.

I have a PR (#6786) which should fix this.

Any chance you could test my changes real fast and provide feedback?

@topherfangio topherfangio added the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jan 20, 2016
@epelc
Copy link
Contributor Author

epelc commented Jan 20, 2016

@topherfangio I just tested after removing your other css fix from above and it works :)

Also just to clarify this is for the md-scale animation right? I put md-slide in the issue for some reason. I don't remember if it was renamed or not.

@topherfangio topherfangio added the pr: merge ready This PR is ready for a caretaker to review label Jan 20, 2016
@topherfangio topherfangio removed the in progress Mainly for in progress PRs, but may be used for issues that require multiple PRs label Jan 20, 2016
@topherfangio
Copy link
Contributor

@epelc Thanks for testing!

Indeed, it is md-scale, not md-slide. I'll update the text 😄

@topherfangio topherfangio changed the title speedial(actions): slide animation shown on load speedial(actions): scale animation shown on load Jan 20, 2016
@chughk1
Copy link

chughk1 commented Jan 20, 2016

@topherfangio Sorry. Didn't see your message earlier. I will also try the fix and see if it works for me.

silverprize added a commit to silverprize/materialdrive that referenced this issue Jan 31, 2016
@wishabhilash
Copy link

wishabhilash commented Jul 3, 2016

Hi guys, this worked for me...

<md-fab-speed-dial md-direction="{{editorControl.dialerDirecton}}" class="md-fling md-fab-bottom-right">

Put the ng-class atribute content inside the class. No ng-cloak required or ng-open itself.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
P1: urgent Urgent issues that should be addressed in the next minor or patch release. pr: merge ready This PR is ready for a caretaker to review type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants