Closed
Bug 958645
Opened 11 years ago
Closed 11 years ago
Scaling effect in customization view doesn't work on some icons.
Categories
(Firefox :: Toolbars and Customization, defect)
Tracking
()
RESOLVED
FIXED
Firefox 29
People
(Reporter: phlsa, Assigned: bwinton)
References
Details
(Whiteboard: [Australis:P3][good first verify])
Attachments
(1 file, 5 obsolete files)
(deleted),
patch
|
bwinton
:
review+
bwinton
:
ui-review+
|
Details | Diff | Splinter Review |
When grabbing items in the customization view, they usually get scaled up a little. This doesn't happen with a number of items:
- Email link
- Bookmarks
- Copy/Cut/Paste
- Zoom
and also with some add-ons
- Adblock Edge
- Thumbnail Zoom
It is quite subtle now, but it will become very apparent once bug 932947 gets fixed.
Bookmarks toolbar items can be added to the list.
This should be marked as an Australis priority.
Comment 2•11 years ago
|
||
Bug 932947 is a P3, so I think we should do the same here. The current state doesn't warrant that, but after 932947 lands this will just look broken.
Whiteboard: [triage] → [Australis:P3]
Comment 3•11 years ago
|
||
So:
(In reply to Philipp Sackl [:phlsa] from comment #0)
> When grabbing items in the customization view, they usually get scaled up a
> little. This doesn't happen with a number of items:
> - Email link
This is dependent on bug 932235.
> - Bookmarks
> - Copy/Cut/Paste
> - Zoom
These could/should be fixed.
> and also with some add-ons
> - Adblock Edge
> - Thumbnail Zoom
I don't know that we could fix this, if they don't use straight toolbar buttons with icons. :-(
(background: there's toolbarbuttons and toolbaritems and weird things. Toolbarbuttons should normally work unless they have their own transform applied already (email link). Toolbaritems can be anything - the search bar is a toolbaritem, and we wouldn't want that to have that animation... So all we can really do is special-case here, for the zoom/copy/cut/paste buttons which are also inside a toolbaritem. Then there's weird menu-button-style things like the bookmarks button. I... don't know how much we can do there. I also don't know if fixing that might help with fixing the add-on case. We should investigate more.)
Reporter | ||
Comment 4•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #3)
> the search bar is a toolbaritem, and we wouldn't want that to have that animation...
Why not? It is an element that can be grabbed and moved like the others, so it should also behave the same way. Or am I missing something here?
Comment 5•11 years ago
|
||
(In reply to Philipp Sackl [:phlsa] from comment #4)
> (In reply to :Gijs Kruitbosch from comment #3)
>
> > the search bar is a toolbaritem, and we wouldn't want that to have that animation...
> Why not? It is an element that can be grabbed and moved like the others, so
> it should also behave the same way. Or am I missing something here?
I would imagine this particular animation would look odd, especially if the item includes text inside it (e.g. the labels on cut/copy/paste or zoom in/reset/out). We can investigate once bug 932947 lands.
Comment 6•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #5)
> (In reply to Philipp Sackl [:phlsa] from comment #4)
> > (In reply to :Gijs Kruitbosch from comment #3)
> >
> > > the search bar is a toolbaritem, and we wouldn't want that to have that animation...
> > Why not? It is an element that can be grabbed and moved like the others, so
> > it should also behave the same way. Or am I missing something here?
>
> I would imagine this particular animation would look odd, especially if the
> item includes text inside it (e.g. the labels on cut/copy/paste or zoom
> in/reset/out). We can investigate once bug 932947 lands.
So I just checked, and especially the cut/copy/paste and zoom controls just look huge if we apply the same transition + transform there...
Comment 7•11 years ago
|
||
Philipp, do you have other ideas here and/or can you do a mockup of what you would expect for the wide items?
Flags: needinfo?(philipp)
Reporter | ||
Comment 8•11 years ago
|
||
Do you have a build with that enabled that I can play with?
I think that would be the fastest way to find a solution.
Flags: needinfo?(philipp)
Reporter | ||
Updated•11 years ago
|
Flags: needinfo?(gijskruitbosch+bugs)
Updated•11 years ago
|
Flags: needinfo?(gijskruitbosch+bugs)
Reporter | ||
Comment 9•11 years ago
|
||
OK, I just played with this for a while and I think this is a good way to go:
Keeping the same animation but reducing the scaling to 1.1 on wide items makes them look nice again. In addition, when the combined buttons get dragged, they should also get some background color so that they don't look so faint.
As I don't know any better way to communicate this, here's what I did:
/* panelUIOverlay.css */
[mousedown=true] #edit-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem),
[mousedown=true] #zoom-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem) {
background: hsla(210,4%,90%,1);
border-radius: 3px;
border: 1px solid #ccc;
transition-property: background-color, transform;
transition-duration: .3s;
transition-timing-function: ease, cubic-bezier(.6, 2, .75, 1.5);
}
/* browser.css */
toolbarpaletteitem[mousedown] > toolbaritem.panel-wide-item,
toolbarpaletteitem[mousedown] > toolbarbutton.panel-wide-item > .toolbarbutton-icon {
transform: scale(1.1);
}
This still causes two problems on the combined items (ordered by severity):
1) There is a white flash when picking them up.
2) Once the animation is finished, the anti-aliasing of the text changes. This is weird because it usually happens the other way around (when the element goes from having a transform to having no transform).
3) The »bounce back« animation when releasing the item in place doesn't work
Comment 11•11 years ago
|
||
Seems Blake volunteered to work on this! :-)
Assignee | ||
Comment 12•11 years ago
|
||
So, to fix #3, you need to put the transition in the plain class, not the mousedown class, like so:
/* panelUIOverlay.css */
#edit-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem),
#zoom-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem) {
transition-property: background-color, transform;
transition-duration: .3s;
transition-timing-function: ease, cubic-bezier(.6, 2, .75, 1.5);
}
toolbarpaletteitem[mousedown=true] #edit-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem),
toolbarpaletteitem[mousedown=true] #zoom-controls:-moz-any(:not([cui-areatype="toolbar"]),.overflowedItem) {
background: hsla(210,4%,90%,1);
border-radius: 3px;
border: 1px solid #ccc;
}
/* browser.css */
toolbarpaletteitem[mousedown] > toolbaritem.panel-wide-item,
toolbarpaletteitem[mousedown] > toolbarbutton.panel-wide-item > .toolbarbutton-icon {
transform: scale(1.1);
}
But this is still feeling kind of janky to me. And it looks odd to have the combined buttons only scale by 1.1 in the toolbar, when the rest of the icons there scale by 1.3…
Assignee | ||
Comment 13•11 years ago
|
||
Philipp: The backgrounds were problematic in a couple of ways, so I left them out.
(1. They seemed to be janky on my computer.
2. I couldn't get them to not show up when the item was in the toolbar.
3. They ran off the end of the panel, which seemed kind of ugly.)
Gijs: I needed to include the lines like:
+toolbarpaletteitem > #edit-controls:not([place="toolbar"]),
+toolbarpaletteitem > #zoom-controls:not([place="toolbar"]) {
because there's a rule in panelUIOverlay.css that would override the transition if I didn't.
Attachment #8365323 -
Flags: ui-review?(philipp)
Attachment #8365323 -
Flags: review?(gijskruitbosch+bugs)
Comment 14•11 years ago
|
||
Comment on attachment 8365323 [details] [diff] [review]
bug958645.patch
Review of attachment 8365323 [details] [diff] [review]:
-----------------------------------------------------------------
This is the right idea, but I think there's quite a bit of selector confusion going on here and I'd like to see a cleaner version first.
::: browser/themes/shared/customizableui/customizeMode.inc.css
@@ +79,5 @@
> toolbarpaletteitem[notransition][place="panel"] {
> transition: none;
> }
>
> +toolbarpaletteitem > toolbarbutton .toolbarbutton-icon,
I'm quite weary of making this a descendant selector. Why was it necessary?
@@ +82,5 @@
>
> +toolbarpaletteitem > toolbarbutton .toolbarbutton-icon,
> +toolbarpaletteitem > toolbarbutton .dropmarker-icon,
> +toolbarpaletteitem > toolbaritem.panel-wide-item,
> +toolbarpaletteitem > toolbarbutton.panel-wide-item > .toolbarbutton-icon,
Items that match this should match the top rule in this selector too, right? Also, what items match this selector? I didn't think we had buttons that were a panel wide item...
@@ +83,5 @@
> +toolbarpaletteitem > toolbarbutton .toolbarbutton-icon,
> +toolbarpaletteitem > toolbarbutton .dropmarker-icon,
> +toolbarpaletteitem > toolbaritem.panel-wide-item,
> +toolbarpaletteitem > toolbarbutton.panel-wide-item > .toolbarbutton-icon,
> +toolbarpaletteitem > toolbaritem.toolbaritem-combined-buttons,
All of these should have .panel-wide-item as well, I think, and the specificity is the same, so this shouldn't be necessary.
@@ +90,4 @@
> transition: transform .3s cubic-bezier(.6, 2, .75, 1.5);
> }
>
> +toolbarpaletteitem[mousedown] > toolbarbutton .toolbarbutton-icon,
Ditto about the descendant selector...
@@ +95,5 @@
> transform: scale(1.3);
> }
>
> +toolbarpaletteitem[mousedown] > toolbaritem.panel-wide-item,
> +toolbarpaletteitem[mousedown] > toolbaritem.toolbaritem-combined-buttons {
Again, don't think you need the second selector here.
Attachment #8365323 -
Flags: review?(gijskruitbosch+bugs) → feedback+
Reporter | ||
Comment 15•11 years ago
|
||
Overall this is great! Though there are two minor issues.
1) The combined buttons for bookmarks currently animate separately (the star has a different transform origin than the list icon and the line doesn't animate at all). This looks odd because you'll be dragging the item as one element.
2) There is still the issue with the anti-aliasing. When you grab the cut/copy/paste controls and wait for the bounce to finish, you'll see a change in text rendering right at the end of the animation.
There certainly is a trade off between time investment and level of polish at this point, but it would still be good to get at least #1 fixed.
Updated•11 years ago
|
Attachment #8365323 -
Flags: ui-review?(philipp) → ui-review-
Assignee | ||
Comment 16•11 years ago
|
||
So, the separator disappears, but this should be more like what you were looking for, Philipp. Let me know, and if you can figure out why the separator vanishes, I'ld love to hear it! :)
Attachment #8365323 -
Attachment is obsolete: true
Attachment #8366081 -
Flags: ui-review?(philipp)
Assignee | ||
Comment 17•11 years ago
|
||
And I figured out why the separator disappears, and have fixed it! \o/ (On Mac only, but asking for review, to get the styles correct before I work on the Linux and Windows versions.)
Attachment #8366081 -
Attachment is obsolete: true
Attachment #8366081 -
Flags: ui-review?(philipp)
Attachment #8366744 -
Flags: ui-review?(philipp)
Attachment #8366744 -
Flags: review?(gijskruitbosch+bugs)
Comment 18•11 years ago
|
||
Comment on attachment 8366744 [details] [diff] [review]
bug958645.patch
Review of attachment 8366744 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/themes/osx/browser.css
@@ +402,5 @@
> border: 0;
> }
>
> +toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> + -moz-box-orient: horizontal;
I'm pretty weary about this, to be honest, as it's set to vertical just above here... Why was this change necessary?
::: browser/themes/shared/customizableui/customizeMode.inc.css
@@ +81,5 @@
> }
>
> +toolbarpaletteitem > toolbarbutton > .toolbarbutton-icon,
> +toolbarpaletteitem > toolbaritem.panel-wide-item,
> +toolbarpaletteitem > toolbarbutton[type="menu-button"],
This enlarges the entire button, including the label. Is that intentional?
Assignee | ||
Comment 19•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #18)
> > +toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> > + -moz-box-orient: horizontal;
> I'm pretty wary about this, to be honest, as it's set to vertical just
> above here... Why was this change necessary?
If we don't change this here, then the separator appears above the dropmarker-icon, instead of beside it.
(It didn't used to be a problem, because the separator was taken out of the page flow by the "position: absolute", but that caused havoc when we tried to transform it. So I switched it to "position: relative", but then it took up space.)
Oh, and I'm only doing it when it's in the toolbar, because otherwise the label appeared beside the icon in the panel menu. (But the label's hidden in the toolbar, so being horizontal isn't a problem.)
> > +toolbarpaletteitem > toolbarbutton > .toolbarbutton-icon,
> > +toolbarpaletteitem > toolbaritem.panel-wide-item,
> > +toolbarpaletteitem > toolbarbutton[type="menu-button"],
> This enlarges the entire button, including the label. Is that intentional?
I believe so, but will defer to phlsa.
Thanks!
Comment 20•11 years ago
|
||
Comment on attachment 8366744 [details] [diff] [review]
bug958645.patch
OK. This looks good to me, then, but I'm nervous enough about it that I'd like Dão to look at this once you've got a patch that fixes the Windows/Linux styling (or now, if you prefer - up to you).
Attachment #8366744 -
Flags: review?(gijskruitbosch+bugs) → review+
Reporter | ||
Comment 21•11 years ago
|
||
Attachment #8366744 -
Flags: ui-review?(philipp) → ui-review+
Assignee | ||
Comment 22•11 years ago
|
||
(Carrying forward r=Gijs and ui-r=phlsa.)
Dão, this version works (for me, with the built-in icons and Firebug, on Windows, Mac, and Linux). Could you give it a once-over, and let me know what I can change to make it even better? :)
Thanks!
Attachment #8366744 -
Attachment is obsolete: true
Attachment #8367569 -
Flags: ui-review+
Attachment #8367569 -
Flags: review?(dao)
Comment 23•11 years ago
|
||
Comment on attachment 8367569 [details] [diff] [review]
bug958645.patch
>+toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
>+ -moz-box-orient: horizontal;
>+}
Seems like you should use '#nav-bar' rather than 'toolbar' and move it next to this rule:
>@@ -419,17 +423,17 @@ toolbar .toolbarbutton-1:not([type="menu
> /**
> * Draw seperators before toolbar button dropmarkers, as well as between
> * consecutive toolbarbutton-1's within a toolbaritem.
> */
> #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before,
> #nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1 + .toolbarbutton-1::before {
> content: "";
> display: -moz-box;
>- position: absolute;
>+ position: relative;
>-toolbarpaletteitem > toolbarbutton > .toolbarbutton-icon {
>+toolbarpaletteitem > toolbarbutton > .toolbarbutton-icon,
>+toolbarpaletteitem > toolbaritem.panel-wide-item,
>+toolbarpaletteitem > toolbarbutton[type="menu-button"],
>+/* Override the rules in panelUIOverlay.css and windows/linux browser.css. */
Seems like a valid use case for !important.
>+toolbarpaletteitem > #edit-controls:not([place="toolbar"]),
>+toolbarpaletteitem > #zoom-controls:not([place="toolbar"]),
>+#TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon,
>+#nav-bar .toolbarbutton-1 > .toolbarbutton-icon {
> transition: transform .3s cubic-bezier(.6, 2, .75, 1.5);
> }
We only want this while customizing, right? The last two selectors match toolbar buttons when not customizing.
Attachment #8367569 -
Flags: review?(dao) → review-
Comment 24•11 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #23)
> Comment on attachment 8367569 [details] [diff] [review]
> bug958645.patch
>
> >+toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> >+ -moz-box-orient: horizontal;
> >+}
>
> Seems like you should use '#nav-bar' rather than 'toolbar' and move it next
> to this rule:
I think instead we just want to use 'toolbar' everywhere - these effects should work on any toolbar.
Comment 25•11 years ago
|
||
(In reply to :Gijs Kruitbosch from comment #24)
> (In reply to Dão Gottwald [:dao] from comment #23)
> > Comment on attachment 8367569 [details] [diff] [review]
> > bug958645.patch
> >
> > >+toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> > >+ -moz-box-orient: horizontal;
> > >+}
> >
> > Seems like you should use '#nav-bar' rather than 'toolbar' and move it next
> > to this rule:
>
> I think instead we just want to use 'toolbar' everywhere - these effects
> should work on any toolbar.
This isn't about effects, it's about the separator being laid out correctly since Blake made it position: relative instead of absolute.
Assignee | ||
Comment 26•11 years ago
|
||
(In reply to Dão Gottwald [:dao] from comment #23)
> >+toolbar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> Seems like you should use '#nav-bar' rather than 'toolbar' and move it next
> to this rule:
> >@@ -419,17 +423,17 @@ toolbar .toolbarbutton-1:not([type="menu
> > #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before,
Fixed!
> >+/* Override the rules in panelUIOverlay.css and windows/linux browser.css. */
> Seems like a valid use case for !important.
Changed!
> >+#TabsToolbar .toolbarbutton-1 > .toolbarbutton-icon,
> >+#nav-bar .toolbarbutton-1 > .toolbarbutton-icon {
> > transition: transform .3s cubic-bezier(.6, 2, .75, 1.5);
> > }
> We only want this while customizing, right? The last two selectors match
> toolbar buttons when not customizing.
Done!
Attachment #8367569 -
Attachment is obsolete: true
Attachment #8368710 -
Flags: review?(dao)
Comment 27•11 years ago
|
||
Comment on attachment 8368710 [details] [diff] [review]
bug958645.patch
>+#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
>+ -moz-box-orient: horizontal;
>+}
>+
> /**
> * Draw seperators before toolbar button dropmarkers, as well as between
> * consecutive toolbarbutton-1's within a toolbaritem.
> */
> #nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before,
> #nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1 + .toolbarbutton-1::before {
nit: move the new rule after the existing one such that the comment comes before all related rules:
>/**
> * Draw seperators before toolbar button dropmarkers, as well as between
> * consecutive toolbarbutton-1's within a toolbaritem.
> */
>#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker::before,
>#nav-bar .toolbaritem-combined-buttons > .toolbarbutton-1 + .toolbarbutton-1::before {
> ...
>}
>
>#nav-bar .toolbarbutton-1 > .toolbarbutton-menubutton-dropmarker {
> -moz-box-orient: horizontal;
>}
Attachment #8368710 -
Flags: review?(dao) → review+
Assignee | ||
Comment 28•11 years ago
|
||
Carrying forward r=dao, r=Gijs, and ui-r=phlsa.
Attachment #8368710 -
Attachment is obsolete: true
Attachment #8368729 -
Flags: ui-review+
Attachment #8368729 -
Flags: review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 29•11 years ago
|
||
Keywords: checkin-needed
Comment 30•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 29
Updated•11 years ago
|
No longer blocks: fxdesktopbacklog
Updated•11 years ago
|
Whiteboard: [Australis:P3] → [Australis:P3][good first verify]
You need to log in
before you can comment on or make changes to this bug.
Description
•