Last Comment Bug 876816 - Defect - Flyouts should have standard widths
: Defect - Flyouts should have standard widths
Status: VERIFIED FIXED
feature=defect c=Settings_pane_option...
: polish
Product: Firefox for Metro
Classification: Client Software
Component: Flyouts (show other bugs)
: Trunk
: x86_64 Windows 8.1
: P3 normal (vote)
: Firefox 25
Assigned To: Kamil Jozwiak [:kjozwiak]
: juan becerra [:juanb]
Mentors:
Depends on:
Blocks: 831955 831958 metrov1it12
  Show dependency treegraph
 
Reported: 2013-05-28 11:54 PDT by Jim Mathies [:jimm]
Modified: 2014-07-24 11:06 PDT (History)
12 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
fixed the widths for prefs/about panels (1.11 KB, patch)
2013-07-17 20:02 PDT, Kamil Jozwiak [:kjozwiak]
a.m.naaktgeboren: feedback+
Details | Diff | Splinter Review
fixed the widths for Prefs/Sync/About panels v2 (4.76 KB, patch)
2013-07-19 20:09 PDT, Kamil Jozwiak [:kjozwiak]
a.m.naaktgeboren: feedback+
Details | Diff | Splinter Review
fixed the widths for Prefs/Sync/About panels v3 (5.06 KB, patch)
2013-07-28 21:02 PDT, Kamil Jozwiak [:kjozwiak]
a.m.naaktgeboren: review+
Details | Diff | Splinter Review
Screenshot of the bug (159.55 KB, image/jpeg)
2013-07-31 15:37 PDT, Josh Tumath
no flags Details

Description Jim Mathies [:jimm] 2013-05-28 11:54:15 PDT
Per comments in bug 831955, we need to make sure our flyouts use one of two widths - narrow (346 pixels) or wide (646 pixels).
Comment 1 Brian R. Bondy [:bbondy] 2013-05-28 13:47:09 PDT
If we do this and it causes any extra work, we should backout instead of posting new defects for v1.
Comment 2 Brian R. Bondy [:bbondy] 2013-05-28 13:53:53 PDT
p=1
Comment 3 Kamil Jozwiak [:kjozwiak] 2013-07-16 20:24:41 PDT
I will give this a shot!
Comment 4 Kamil Jozwiak [:kjozwiak] 2013-07-17 20:02:55 PDT
Created attachment 777545 [details] [diff] [review]
fixed the widths for prefs/about panels

Changed the widths for both prefs & about panels to 346 as per comment 0. Ally, looks like you have fixed the width for the sync panel in bug 845468.

Made sure that all the panel widths matched in Firefox Metro, also ensured that nothing was being cut off for "Options", "Sync" & "About". Went through some basic functionality and ensured everything was still working correctly.
Comment 5 Allison Naaktgeboren :ally 2013-07-18 14:31:15 PDT
Comment on attachment 777545 [details] [diff] [review]
fixed the widths for prefs/about panels

Review of attachment 777545 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks! This patch is correct as is, but I think we can make it even better. Since we want all the flyouts to be the same width (and probably some other attributes), why don't we seet a class in the xul on the flyouts so we can use css class selectors? That way we can control the style of the flyouts in one place and ensure they always match. For an example, the "meta-section" class used here http://mxr.mozilla.org/mozilla-central/source/browser/metro/base/content/browser.xul#206 (you can see it used several places in the start page here) matches to http://mxr.mozilla.org/mozilla-central/source/browser/metro/theme/platform.css#657

So in browser.xul change the flyouts like 
<flyoutpanel id="prefs-flyoutpanel" headertext="&optionsHeader.title;"> 
to add something like
<flyoutpanel id="prefs-flyoutpanel" class="prefFlyouts" headertext="&optionsHeader.title;">

add something like to browser.css
.prefsFlyouts {
  // common rules in here like the width
}

Also please remove the old rules you've just consolidated from their id selectors[2] (like #about-flyoutpanel) as those have higher precedence [3] so they would override your new class rule. :)

Please let us know if you have questions or get stuck. We're happy to help.

[1] https://developer.mozilla.org/en-US/docs/Web/CSS/Class_selectors
[2] https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Getting_started/Selectors
[3] "CSS gives priority to the rule that has the more specific selector. An ID selector is more specific than a class selector, which in turn is more specific than a tag selector." from [2]
Comment 6 Tim Abraldes [:TimAbraldes] [:tabraldes] 2013-07-18 17:22:49 PDT
drive-by nit: Don't call the class "prefFlyouts" since that would be specific to just the "preferences" flyout.  Something like "flyout" or "flyoutPanel" would be more appropriate.

Also, it might be best to put the CSS for flyouts in flyoutpanel.css (maybe we can rename that to just "flyout.css"... but I digress)
Comment 7 Brian R. Bondy [:bbondy] 2013-07-18 19:50:50 PDT
Good idea re the class. Maybe call it narrowFlyout and we can later use wideFlyout if we need a wider one.
Comment 8 Kamil Jozwiak [:kjozwiak] 2013-07-18 20:12:50 PDT
Thanks for the feedback! Will give it another shot tomorrow.
Comment 9 Kamil Jozwiak [:kjozwiak] 2013-07-19 20:09:43 PDT
Created attachment 778781 [details] [diff] [review]
fixed the widths for Prefs/Sync/About panels v2

Created the narrowFlyout class and then added them into the Pref, Sync and About panels.

Went through all three flyouts and made sure everything was still working, the correct widths are being used and nothing is being cut off.

Thanks for the help and review Ally!
Comment 10 Allison Naaktgeboren :ally 2013-07-22 12:19:27 PDT
Comment on attachment 778781 [details] [diff] [review]
fixed the widths for Prefs/Sync/About panels v2

Review of attachment 778781 [details] [diff] [review]:
-----------------------------------------------------------------

Almost there! Looks good & mbrubeck was nice enough to test it while my trees build this morning.

Tim is right that the new css rule should move to the flyoutpanels.css file. While the old rules did live in browser.css, now that we have a separate css file dedicated to flyouts, we should put all our css related to flyouts in there. The good news is that it should be a quick & easy change.
Comment 11 Kamil Jozwiak [:kjozwiak] 2013-07-22 18:30:58 PDT
Sound good! I will change this on Friday when I get home from my work trip (currently traveling and don't have access to my environment PC as its in  Toronto!
Comment 12 Allison Naaktgeboren :ally 2013-07-24 16:04:41 PDT
Comment on attachment 778781 [details] [diff] [review]
fixed the widths for Prefs/Sync/About panels v2

look forward to seeing it. :)
Comment 13 Asa Dotzler [:asa] 2013-07-27 13:42:18 PDT
Can one of you all take a look at bug 898457 and see if that's related or could be fixed here?
Comment 14 Brian R. Bondy [:bbondy] 2013-07-27 18:17:38 PDT
Looks like an unrelated issue, I think it's due to localized strings not wrapping in the about panel.  Should be looked at independently to this bug.
Comment 15 Kamil Jozwiak [:kjozwiak] 2013-07-28 21:02:05 PDT
Created attachment 782395 [details] [diff] [review]
fixed the widths for Prefs/Sync/About panels v3

Ally, added the following changes:

- removed the class from browser.css and added it into flyoutpanels.css
- renamed the class to flyout-narrow to match the naming convention in flyoutpanels.css
- changed the names of the class in browser.xul to match the new name in flyoutpanels.css

Went through all three flyout panels (Pref, About, Sync) and made sure they where working without any issues and used the same widths.

Hopefully everything looks good this time! If not, just let me know if anything else needs to be changed.
Comment 16 Allison Naaktgeboren :ally 2013-07-29 15:54:09 PDT
Comment on attachment 782395 [details] [diff] [review]
fixed the widths for Prefs/Sync/About panels v3

Review of attachment 782395 [details] [diff] [review]:
-----------------------------------------------------------------

\o/ Let's Ship it!

How about bug 885383 next? It's a little meatier.
Comment 18 Ryan VanderMeulen [:RyanVM] 2013-07-30 10:23:51 PDT
https://hg.mozilla.org/mozilla-central/rev/14724efcf7f7
Comment 19 Josh Tumath 2013-07-31 15:37:32 PDT
Created attachment 784057 [details]
Screenshot of the bug
Comment 20 Josh Tumath 2013-07-31 15:39:30 PDT
Comment on attachment 784057 [details]
Screenshot of the bug

Whoops. I posted this screenshot in the wrong bug. Apologies.
Comment 21 Manuela Muntean [Away] 2013-08-20 07:27:50 PDT
Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Build ID: 20130819030205

WFM
Tested on windows 8 64bit using latest Nightly for iteration #12. Flyouts seem to all have same widths.

This should also be verified on a device.
Comment 22 Samvedana (:Samvedana) 2013-08-26 22:27:49 PDT
User Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0
Build ID: 20130826074752
Built from http://hg.mozilla.org/mozilla-central/rev/14b1e8c2957e

WFM
Tested on windows 8 using latest nightly for iteration-12. All fly-out width was same.

Note You need to log in before you can comment on or make changes to this bug.