Closed
Bug 989890
Opened 11 years ago
Closed 11 years ago
Port the help button to in-content prefs
Categories
(Firefox :: Settings UI, defect)
Firefox
Settings UI
Tracking
()
VERIFIED
FIXED
Firefox 32
| Tracking | Status | |
|---|---|---|
| firefox32 | --- | verified |
People
(Reporter: u428464, Assigned: Paenglab)
References
Details
(Whiteboard: p=0 s=it-32c-31a-30b.2 [qa!])
Attachments
(3 files, 8 obsolete files)
It would be nice to add the help button to the in-content preferences. It is in current preferences a button with text but the in-content specs shows a yellow icon : https://bug738796.bugzilla.mozilla.org/attachment.cgi?id=8344776
Updated•11 years ago
|
Summary: Add the help button to in-content prefs → Port the help button to in-content prefs
Just to precise the help button appears on every pane, but also in submenus.
Updated•11 years ago
|
Flags: firefox-backlog?
Updated•11 years ago
|
Flags: firefox-backlog? → firefox-backlog+
The Help button can be seen on these screens at the left bottom : http://people.mozilla.org/~jboriss/temp/preferences_expanded.jpg
| Assignee | ||
Comment 3•11 years ago
|
||
Missing is now the helpTopic="prefs-tabs" as this is merged in in-content prefs to the main pane. I think it looks weird with two help buttons on this pane and I propose a new helpTopic like "prefs-main-tab" or "prefs-ic-main" with both topics merged in one help page.
I don't know what is needed to create such a page and redirect. Whoever knows this, please file bugs on the correct components.
Assignee: nobody → richard.marti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8409599 -
Flags: review?(jaws)
Comment 4•11 years ago
|
||
Comment on attachment 8409599 [details] [diff] [review]
inContentHelp.patch
Review of attachment 8409599 [details] [diff] [review]:
-----------------------------------------------------------------
As far as merging the two pages, you will want to talk to :sheppy. You can help :sheppy out by creating a new MDN page that has the contents of the two aforementioned pages merged.
::: browser/components/preferences/in-content/advanced.xul
@@ +211,5 @@
> </groupbox>
> #endif
> +
> + <hbox pack="end">
> + <button label="?"
The help button should use a graphic instead of a button made to look like this. Doing so will make it easier for themes to change the look of the preferences without having to mess with changing the actual labels of the button.
Attachment #8409599 -
Flags: review?(jaws) → review-
Comment 5•11 years ago
|
||
Mike, can you provide the help button graphics for this? As usual, we'll also need a HiDPI graphic too. Thanks!
Flags: needinfo?(mmaslaney)
Comment 6•11 years ago
|
||
CSS Properties & Values:
button.help-incontent {
border-radius: 2px;
background: #FFCB00;
border: 1px solid #C1C1C1;
width: 30px;
height: 30px;
}
button.help-incontent:hover {
background: #F4C200;
}
button.help-incontent:active {
background: #EABA00;
}
Flags: needinfo?(mmaslaney)
| Assignee | ||
Comment 7•11 years ago
|
||
Now with the help-glyph. I still have a box-shadow on the help button, is this okay? This makes the button look more like a button.
I removed the label="?" completely, is this okay or should I leave a empty label?
Attachment #8412672 -
Attachment is obsolete: true
Attachment #8412779 -
Flags: review?(jaws)
| Assignee | ||
Updated•11 years ago
|
Attachment #8412672 -
Attachment is obsolete: false
| Assignee | ||
Updated•11 years ago
|
Attachment #8409599 -
Attachment is obsolete: true
Comment 8•11 years ago
|
||
Comment on attachment 8412779 [details] [diff] [review]
inContentHelp.patch v2
Review of attachment 8412779 [details] [diff] [review]:
-----------------------------------------------------------------
Super super sorry about the slow reviews here.
::: browser/components/preferences/in-content/advanced.xul
@@ +210,5 @@
> </hbox>
> </groupbox>
> #endif
> +
> + <hbox pack="end">
nit, please only have one space between 'hbox' and 'pack'.
@@ +212,5 @@
> #endif
> +
> + <hbox pack="end">
> + <button class="help-button"
> + oncommand="openHelpLink('prefs-advanced-general', '', 'tab');"/>
We should use an 'aria-label' attribute here with "Help" as the value (a localized string). See https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute for more information.
::: browser/themes/shared/incontentprefs/preferences.css
@@ +188,5 @@
> + min-width: 30px;
> + border-radius: 2px;
> + border-color: #C1C1C1;
> + background-color: #FFCB00;
> + background-image: url("chrome://browser/skin/preferences/in-content/help-glyph.png") !important;
Why is important needed here?
@@ +194,5 @@
> +}
> +
> +@media (min-resolution: 2dppx) {
> + .help-button {
> + background-size: cover;
This should be 'background-size: Xpx' where X is the width of the background-image in 1dppx resolution. This is more in line with our current convention of @2x images.
Attachment #8412779 -
Flags: review?(jaws) → review-
| Assignee | ||
Comment 9•11 years ago
|
||
Comments addressed.
Attachment #8412779 -
Attachment is obsolete: true
Attachment #8416872 -
Flags: review?(jaws)
Comment 10•11 years ago
|
||
Comment on attachment 8416872 [details] [diff] [review]
inContentHelp.patch v3
Review of attachment 8416872 [details] [diff] [review]:
-----------------------------------------------------------------
Hello Richard,
Have you considered having one help-button in preferences.xul that opens the help page for the selected category? I believe this is more like how the existing pref dialog works and it's cleaner than duplicating the markup in every category IMO.
Attachment #8416872 -
Flags: feedback-
| Assignee | ||
Comment 11•11 years ago
|
||
First, I wouldn't know how. My knowledge on this is to low.
But I think this isn't easily doable because this in-content prefs is a huge XUL file where all parts are hidden and only the needed parts are shown. The Dialog prefs do have a fixed dialog buttons area where the help button lies. On in-content prefs the help button is always at the end of each sub page. And this pages have also a different length, which would make the positioning hard.
If someone can point me to a example, I can try to do this. But again, my knowledge is limited here and someone other should take this bug, if it's doable this way.
Comment 12•11 years ago
|
||
You can either put the help button at the bottom of the prefpane[1] and update the code so it shows on all applicable categories/subcategories (preferred) or you can place it directly below the </prefpane> but I'm not sure you will get the correct positioning.
[1] https://mxr.mozilla.org/mozilla-central/source/browser/components/preferences/in-content/preferences.xul?rev=a1f0c9c0e7e2&mark=137#126
| Assignee | ||
Comment 13•11 years ago
|
||
Put on bottom the button is shown correctly but after switching the category it's hidden by this code: https://mxr.mozilla.org/mozilla-central/source/browser/components/preferences/in-content/preferences.js#54
As I wrote before, my JS knowledge is really low and I don't know how to remove the help button's hidden attribute with a clean code. The same is for exchanging the help button target page.
| Assignee | ||
Comment 14•11 years ago
|
||
Oh, I forgot to relate the bug for the help page merging.
Depends on: 1005493
Comment 15•11 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #13)
> Put on bottom the button is shown correctly but after switching the category
> it's hidden by this code:
> https://mxr.mozilla.org/mozilla-central/source/browser/components/
> preferences/in-content/preferences.js#54
Right, did you try my alternative approach which doesn't require this change? If it give the proper positioning, I think it would also be okay.
> As I wrote before, my JS knowledge is really low and I don't know how to
> remove the help button's hidden attribute with a clean code. The same is for
> exchanging the help button target page.
One way could be to use the attribute value "ALL" which makes it show on every page:
element.hidden = (attributeValue != aQuery && attributeValue != "ALL");
Perhaps a better solution would be to not hide elements lacking the attribute:
element.hidden = (attributeValue && attributeValue != aQuery);
Note that I haven't tested either of the above.
For showing the right help page, just have the help button always call the same function and that function would check categories.selectedItem and e.g. advancedPrefs.selectedTab.helpTopic (which already has the helpTopic IDs[1]).
[1] https://mxr.mozilla.org/mozilla-central/source/browser/components/preferences/in-content/advanced.xul?rev=e2c046c72d6c#136
Comment 16•11 years ago
|
||
Sorry, helpTopic may just be a normal attribute without a getter: advancedPrefs.selectedTab.getAttribute("helpTopic")
| Assignee | ||
Comment 17•11 years ago
|
||
(In reply to Matthew N. [:MattN] (behind on reviews) from comment #15)
> (In reply to Richard Marti (:Paenglab) from comment #13)
> > Put on bottom the button is shown correctly but after switching the category
> > it's hidden by this code:
> > https://mxr.mozilla.org/mozilla-central/source/browser/components/
> > preferences/in-content/preferences.js#54
>
> Right, did you try my alternative approach which doesn't require this
> change? If it give the proper positioning, I think it would also be okay.
Yes, I tried it, but it placed the button on the right of the panes.
> Perhaps a better solution would be to not hide elements lacking the
> attribute:
> element.hidden = (attributeValue && attributeValue != aQuery);
Great, this works.
> For showing the right help page, just have the help button always call the
> same function and that function would check categories.selectedItem and e.g.
> advancedPrefs.selectedTab.helpTopic (which already has the helpTopic IDs[1]).
Only advanced prefs is using tabs but I check if I can use the categories to select the topic. The different help-topics of advanced prefs are all showing the same page without scrolling to an anchor, thus the category should be enough.
Thanks a lot for your help.
| Assignee | ||
Comment 18•11 years ago
|
||
Now with Matthew's proposal of one help button. I hope all in my new function openHelpPage() is correct.
Attachment #8416872 -
Attachment is obsolete: true
Attachment #8416872 -
Flags: review?(jaws)
Attachment #8417023 -
Flags: review?(jaws)
Comment 19•11 years ago
|
||
Comment on attachment 8417023 [details] [diff] [review]
inContentHelp.patch v4
>+function openHelpPage() {
Can you rename this to helpButtonCommand or something like that? openHelpPage is confusingly close to openHelpLink.
>+ openHelpLink(helpLink, '', 'tab');
nit: use double quotes
| Assignee | ||
Comment 20•11 years ago
|
||
Dão's comments applied.
Attachment #8417023 -
Attachment is obsolete: true
Attachment #8417023 -
Flags: review?(jaws)
Attachment #8417253 -
Flags: review?(jaws)
Comment 21•11 years ago
|
||
Comment on attachment 8417253 [details] [diff] [review]
inContentHelp.patch v5
Review of attachment 8417253 [details] [diff] [review]:
-----------------------------------------------------------------
This is close, hopefully only one more pass and we'll be good-to-go. Thanks for sticking with this.
::: browser/themes/shared/incontentprefs/preferences.css
@@ +185,5 @@
> }
>
> +.help-button,
> +.help-button:not([disabled="true"]):hover,
> +.help-button:not([disabled="true"]):hover:active {
It stinks that we need these last two selectors here so that the background-image doesn't get overriden by the default button:not([disabled]):hover and :hover:active's linear-gradient background-image.
But I also see that as a something wrong with the design of this help button. The box-shadow that is added here has the wrong shadow location for the :hover:active state (the inner shadow should be adjusted), and it also doesn't match the look-and-feel of the other buttons within the in-content preferences.
So, this is what we should do:
1) Add border-width: 1px; to this rule, since it is missing and should be declared here explicitly.
2) Remove the box-shadow.
3) Remove the background-image.
4) Add the following ruleset:
.help-button > .button-box > .button-icon {
width: 30px;
height: 30px;
background-image: url("chrome://browser/skin/preferences/in-content/help-glyph.png");
background-position: center;
}
5) Add a similar ruleset for 2dppx.
Attachment #8417253 -
Flags: review?(jaws) → review-
Comment 22•11 years ago
|
||
Comment on attachment 8417253 [details] [diff] [review]
inContentHelp.patch v5
>+function helpButtonCommand() {
>+ let pane = history.state;
>+ let categories = document.getElementById("categories");
>+ let helpLink = categories.querySelector(".category[value=" + pane + "]")
>+ .getAttribute("helpTopic");
>+ openHelpLink(helpLink, "", "tab");
>+}
openHelpLink's second argument (aCalledFromModal) is a boolean, not a string, and it's used to automatically determine whether the link should be opened in a new tab or in a new window. Your call should be equivalent to this one:
openHelpLink(helpLink);
another nit: rename helpLink to helpTopic
| Assignee | ||
Comment 23•11 years ago
|
||
Moved the image now to .button-icon. I had to use some other dimensions to stay for the button 30px * 30px.
Attachment #8417253 -
Attachment is obsolete: true
Attachment #8417648 -
Flags: review?(jaws)
Comment 24•11 years ago
|
||
Comment on attachment 8417648 [details] [diff] [review]
inContentHelp.patch v6
Review of attachment 8417648 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/components/preferences/in-content/preferences.js
@@ +62,5 @@
> +function helpButtonCommand() {
> + let pane = history.state;
> + let categories = document.getElementById("categories");
> + let helpTopic = categories.querySelector(".category[value=" + pane + "]")
> + .getAttribute("helpTopic");
nit, line up the period here to match the line above.
::: browser/locales/en-US/chrome/browser/preferences/preferences.dtd
@@ +23,5 @@
> <!ENTITY paneSync.title "Sync">
> <!ENTITY buttonForward.tooltip "Go forward one page">
> +<!ENTITY buttonBack.tooltip "Go back one page">
> +
> +<!ENTITY helpButton.label "Help">
nit, line up the "Help" value with the "Go back one page" value.
::: browser/themes/shared/incontentprefs/preferences.css
@@ +194,5 @@
> +}
> +
> +.help-button:not([disabled="true"]):hover {
> + background-color: #F4C200;
> + background-image: none;
Can you file a bug to move much of the styling from <button> to a class-based selector so that it won't apply to the help button?
Attachment #8417648 -
Flags: review?(jaws) → review+
| Assignee | ||
Comment 25•11 years ago
|
||
Fixed the nit.
Attachment #8417648 -
Attachment is obsolete: true
Attachment #8418554 -
Flags: review+
| Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 26•11 years ago
|
||
Oops, stll one nit.
Attachment #8418554 -
Attachment is obsolete: true
Attachment #8418556 -
Flags: review+
Comment 27•11 years ago
|
||
Hi Richard,
could you provide a Try link. Suggestions for what to run if you haven't
yet can be found here:
https://wiki.mozilla.org/Sheriffing/How:To:Recommended_Try_Practices
Updated•11 years ago
|
Keywords: checkin-needed
| Assignee | ||
Comment 28•11 years ago
|
||
Keywords: checkin-needed
Comment 29•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
| Assignee | ||
Comment 30•11 years ago
|
||
bc1 is failing.
TEST-UNEXPECTED-FAIL | chrome://mochitests/content/browser/browser/components/preferences/in-content/tests/browser_bug731866.js | Non-General elements should be hidden
etc.
I suppose it's because of this change in this patch to show always the help button:
- element.hidden = (attributeValue != aQuery);
+ element.hidden = (attributeValue && attributeValue != aQuery);
I've never done something on tests, please can someone help me finding what needs to change in the tests to pass?
Comment 31•11 years ago
|
||
(In reply to Carsten Book [:Tomcat] from comment #29)
> https://hg.mozilla.org/integration/fx-team/rev/22347f9e52cd
also backed out for this test failures mentioned in comment 30
Comment 32•11 years ago
|
||
(In reply to Richard Marti (:Paenglab) from comment #30)
> I've never done something on tests, please can someone help me finding what
> needs to change in the tests to pass?
maybe dao or jaws could help you here.
Flags: needinfo?(jaws)
Flags: needinfo?(dao)
Whiteboard: [fixed-in-fx-team]
Comment 33•11 years ago
|
||
This is the cset link for the backout, which should have been posted when the backout occurred:
https://hg.mozilla.org/integration/fx-team/rev/78bae968118e
Comment 34•11 years ago
|
||
Richard, what do you think about this change? I reverted the change that was made to search() and moved the help-button outside of the prefpane. I also had to change .main-content from a <box> to a <vbox> to get the button to display under the prefs (since <box> is a synonym for <hbox>). This fixes the test failure.
Attachment #8418556 -
Attachment is obsolete: true
Attachment #8418806 -
Flags: review+
Attachment #8418806 -
Flags: feedback?(richard.marti)
Flags: needinfo?(jaws)
Flags: needinfo?(dao)
| Assignee | ||
Comment 35•11 years ago
|
||
Comment on attachment 8418806 [details] [diff] [review]
Patch for check-in (slightly adjusted)
Great, this looks good. Thanks a lot.
Do I need to run a new try to ask for check-in?
Attachment #8418806 -
Flags: feedback?(richard.marti) → feedback+
Comment 36•11 years ago
|
||
No, we should be good to go here. I ran the tests locally with no failures.
Keywords: checkin-needed
Comment 37•11 years ago
|
||
Keywords: checkin-needed
Whiteboard: [fixed-in-fx-team]
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [fixed-in-fx-team]
Target Milestone: --- → Firefox 32
Comment 39•11 years ago
|
||
The bug is marked as fixed, but what's about the styling? It doesn't match the spec, at least on OS X.
| Assignee | ||
Comment 40•11 years ago
|
||
(In reply to Sören Hentzschel from comment #39)
> Created attachment 8419399 [details]
> Bildschirmfoto 2014-05-08 um 15.57.43.png
>
> The bug is marked as fixed, but what's about the styling? It doesn't match
> the spec, at least on OS X.
Please can you file a bug and CC me?
Comment 41•11 years ago
|
||
Hi,
reproduced on Nightly 32.0a1 (20140503030204) on Debian Sid, and I can confirm this is fixed in the latest Nightly Firefox/32.0 ID:20140520030202.
Cheers,
Francesca
Status: RESOLVED → VERIFIED
Updated•11 years ago
|
Whiteboard: p=0 s=it-32c-31a-30b.2 [qa!]
Comment 42•11 years ago
|
||
(In reply to Francesca Ciceri [:madamezou] from comment #41)
> Hi,
>
> reproduced on Nightly 32.0a1 (20140503030204) on Debian Sid, and I can
> confirm this is fixed in the latest Nightly Firefox/32.0 ID:20140520030202.
>
> Cheers,
> Francesca
Ops, just realized I haven't added the platform/os where I verified it: x86_64/Linux (Debian Sid).
And as this was filed against all/all, I'm removing the "verified" status I added with the above comment. Feel free to mark it again as Verified in case the verification against just one os/arch is enough (and sorry for the noise).
Status: VERIFIED → RESOLVED
Closed: 11 years ago → 11 years ago
Updated•11 years ago
|
Whiteboard: p=0 s=it-32c-31a-30b.2 [qa!] → p=0 s=it-32c-31a-30b.2 [qa?]
Comment 43•11 years ago
|
||
This will need a visual spot check, so qa+'ing. CC'ing Henrik in case this had been covered by a Mozmill test and will now need revision.
Whiteboard: p=0 s=it-32c-31a-30b.2 [qa?] → p=0 s=it-32c-31a-30b.2 [qa+]
Comment 44•11 years ago
|
||
(In reply to juan becerra [:juanb] from comment #43)
> This will need a visual spot check, so qa+'ing. CC'ing Henrik in case this
> had been covered by a Mozmill test and will now need revision.
No, we don't have a test for Mozmill. But if one is necessary this can perfectly become a Browser Chrome test, or?
status-firefox32:
--- → fixed
Flags: in-testsuite?
Updated•11 years ago
|
QA Contact: camelia.badau
Comment 45•11 years ago
|
||
Verified fixed on Windows 7 64bit, Ubuntu 13.10 32bit and Mac OSX 10.8.5 using latest Nightly 32.0a1 (buildID: 20140521030200).
Status: RESOLVED → VERIFIED
QA Contact: camelia.badau
Whiteboard: p=0 s=it-32c-31a-30b.2 [qa+] → p=0 s=it-32c-31a-30b.2 [qa!]
Updated•11 years ago
|
QA Contact: camelia.badau
You need to log in
before you can comment on or make changes to this bug.
Description
•