Closed
Bug 1109854
Opened 10 years ago
Closed 10 years ago
Add string for empty search field
Categories
(Firefox :: Search, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox37 | --- | verified |
People
(Reporter: phlsa, Assigned: abdelrahman, Mentored)
References
Details
Attachments
(1 file, 5 obsolete files)
(deleted),
patch
|
florian
:
review+
Gavin
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
When the user just presses the down arrow on an empty search field, we show an awkward string (»Search for with:«) in the title of the one-off buttons.
That section should instead say:
»Search with:«
Updated•10 years ago
|
Status: NEW → ASSIGNED
Iteration: --- → 37.2
Points: --- → 2
Flags: qe-verify+
Flags: firefox-backlog+
Comment 1•10 years ago
|
||
We have finally decided against doing this for 35; still something we want to do in 37 if possible. I'm unlikely to work in this bug this week, so unassigning myself.
Assignee: florian → nobody
Updated•10 years ago
|
Status: ASSIGNED → NEW
Iteration: 37.2 → ---
Comment 2•10 years ago
|
||
The current string is set at https://hg.mozilla.org/releases/mozilla-beta/annotate/c29a347abadc/browser/base/content/urlbarBindings.xml#l971
I guess we could use a different label when nothing has been typed in the search box, and alternate between that label and the existing set using a xul deck.
Mentor: florian
Assignee | ||
Comment 3•10 years ago
|
||
Attachment #8541492 -
Flags: review?(florian)
Updated•10 years ago
|
Assignee: nobody → a.ahmed1026
Updated•10 years ago
|
Status: NEW → ASSIGNED
Comment 4•10 years ago
|
||
Comment on attachment 8541492 [details] [diff] [review]
rev 1 - empty search field
Review of attachment 8541492 [details] [diff] [review]:
-----------------------------------------------------------------
The patch works and looks good overall, but I'm not sure this approach is acceptable from a localization point of view.
::: browser/base/content/urlbarBindings.xml
@@ +1066,5 @@
> self.removeAttribute("showonlysettings");
> + headerSearchFor.removeAttribute("hidden");
> + }
> + else {
> + headerSearchFor.setAttribute("hidden", true);
I think setting headerSearchFor.hidden to true or false should work in this case.
::: browser/locales/en-US/chrome/browser/browser.dtd
@@ +420,5 @@
> <!-- LOCALIZATION NOTE (searchFor.label, searchWith.label):
> These two strings are used to build the header above the list of one-click
> search providers: "Search for <used typed keywords> with:" -->
> +<!ENTITY search.label "Search">
> +<!ENTITY searchFor.label " for ">
When we change the content of a string, we should change its identifier to ensure localizers will notice the string has changed.
@@ +425,1 @@
> <!ENTITY searchWith.label " with:">
flod, can you confirm if breaking this string into 3 parts to hide the "for" word is acceptable or if we need a separate "Search with:" like I initially thought?
Attachment #8541492 -
Flags: feedback?(francesco.lodolo)
Comment 5•10 years ago
|
||
Comment on attachment 8541492 [details] [diff] [review]
rev 1 - empty search field
Review of attachment 8541492 [details] [diff] [review]:
-----------------------------------------------------------------
Besides reused ID and obsolete comment, unfortunately this has way too many assumptions on the grammar structure to be safe.
"Search" + " for " + X + " with:"
You don't know if the equivalent of " for " is the right string to hide. Much safer using a separate string and clearly explaining its scope in the comment.
Ideally we should get rid completely of concatenations and use placeholders, e.g. "Search for %1$S with: %2$S" and "Search with %S" (even if it implies using a string from .properties instead of .dtd).
Attachment #8541492 -
Flags: feedback?(francesco.lodolo) → feedback-
Comment 6•10 years ago
|
||
(In reply to Francesco Lodolo [:flod] from comment #5)
Thanks for the confirmation!
> Ideally we should get rid completely of concatenations and use placeholders,
> e.g. "Search for %1$S with: %2$S" and "Search with %S" (even if it implies
> using a string from .properties instead of .dtd).
The reason for using concatenation here is that the string the user typed is displayed with a different theming.
Comment 7•10 years ago
|
||
Comment on attachment 8541492 [details] [diff] [review]
rev 1 - empty search field
Review of attachment 8541492 [details] [diff] [review]:
-----------------------------------------------------------------
Sorry for the late review here.
Per comment 5, this approach won't be acceptable for localization; we need to have "Search with:" as a single localizable string. I proposed a different solution in comment 2, see https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/deck.
Attachment #8541492 -
Flags: review?(florian) → review-
Assignee | ||
Comment 8•10 years ago
|
||
Attachment #8541492 -
Attachment is obsolete: true
Attachment #8544558 -
Flags: review?(florian)
Comment hidden (typo) |
Assignee | ||
Updated•10 years ago
|
Attachment #8544558 -
Attachment is obsolete: true
Attachment #8544558 -
Flags: review?(florian)
Assignee | ||
Comment 10•10 years ago
|
||
Attachment #8544568 -
Flags: review?(florian)
Comment 11•10 years ago
|
||
(In reply to Florian Quèze [:florian] [:flo] from comment #7)
> we need
> to have "Search with:" as a single localizable string. I proposed a
> different solution in comment 2, see
> https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/deck.
Hi Abdelrhman,
Thanks for the updated patch. It seems your updated patch doesn't follow this suggestion. Is there something in my comment that you didn't understand and that I should further explain?
Assignee | ||
Comment 12•10 years ago
|
||
Sorry, I haven't read your comments well.
I think this patch fulfills requirements.
Attachment #8544568 -
Attachment is obsolete: true
Attachment #8544568 -
Flags: review?(florian)
Attachment #8544609 -
Flags: review?(florian)
Comment 13•10 years ago
|
||
Is there a reason why setting the hidden attribute on 3 different nodes seems better to you than using a XUL deck like I suggested?
Also, I suggested in comment 4 that you may be able to simplify lines like:
headerSearchFor.setAttribute("hidden", true);
to:
headerSearchFor.hidden = true;
Have you tried this? Did it not work?
Assignee | ||
Comment 14•10 years ago
|
||
Attachment #8544609 -
Attachment is obsolete: true
Attachment #8544609 -
Flags: review?(florian)
Attachment #8545883 -
Flags: review?(florian)
Comment 15•10 years ago
|
||
Comment on attachment 8545883 [details] [diff] [review]
rev 5 - empty search field
Review of attachment 8545883 [details] [diff] [review]:
-----------------------------------------------------------------
The code looks good overall now, thanks :-). I'm just proposing a simplification in the XUL markup, and requesting more comments for localizers.
::: browser/base/content/urlbarBindings.xml
@@ +988,5 @@
> </xul:treecols>
> <xul:treechildren class="autocomplete-treebody"/>
> </xul:tree>
> + <xul:deck anonid="search-panel-one-offs-header"
> + selectedIndex="0"
You can move class="search-panel-header search-panel-current-input" to here...
@@ +993,2 @@
> xbl:inherits="hidden=showonlysettings">
> + <xul:hbox anonid="search-panel-searchwith"
... and then this hbox is no longer needed.
@@ +995,5 @@
> + class="search-panel-header search-panel-current-input">
> + <xul:label anonid="searchbar-oneoffheader-search" value="&search.label;"/>
> + </xul:hbox>
> + <xul:hbox anonid="search-panel-searchforwith"
> + class="search-panel-header search-panel-current-input">
You can remove the search-panel-header class here if you set it on the deck.
@@ +1077,5 @@
> self.removeAttribute("showonlysettings");
> + headerPanel.selectedIndex = 1;
> + }
> + else {
> + headerPanel.selectedIndex = 0;
nit: please fix the indent here.
::: browser/locales/en-US/chrome/browser/browser.dtd
@@ +418,5 @@
> <!ENTITY searchFocusUnix.commandkey "j">
>
> <!-- LOCALIZATION NOTE (searchFor.label, searchWith.label):
> These two strings are used to build the header above the list of one-click
> search providers: "Search for <used typed keywords> with:" -->
The searcFor.label and searchWith.label strings should stay directly after this comment.
@@ +419,5 @@
>
> <!-- LOCALIZATION NOTE (searchFor.label, searchWith.label):
> These two strings are used to build the header above the list of one-click
> search providers: "Search for <used typed keywords> with:" -->
> +<!ENTITY search.label "Search with:">
We should probably find a slightly more descriptive id for this string. What about "searchWithHeader.label"?
Please add a localization note (see the comment of the other 2 strings for the format of these comments) explaining that this string will be shown instead of the searchFor.label and searchWith.label strings when the user hasn't typed anything, and that the wording should be as close as possible to the wording of these other 2 strings.
Attachment #8545883 -
Flags: review?(florian)
Attachment #8545883 -
Flags: review-
Attachment #8545883 -
Flags: feedback+
Comment 16•10 years ago
|
||
Just a reminder: we need to get this patch landed before the merge on Monday.
Flags: needinfo?(florian)
Assignee | ||
Comment 17•10 years ago
|
||
Attachment #8545883 -
Attachment is obsolete: true
Attachment #8547177 -
Flags: review?(florian)
Comment 18•10 years ago
|
||
Comment on attachment 8547177 [details] [diff] [review]
rev 6 - empty search field
Review of attachment 8547177 [details] [diff] [review]:
-----------------------------------------------------------------
Thanks, looks great now! :-)
https://hg.mozilla.org/integration/fx-team/rev/9eb7ebdb6f6e
::: browser/locales/en-US/chrome/browser/browser.dtd
@@ +419,5 @@
>
> +<!-- LOCALIZATION NOTE (searchWithHeader.label):
> + This string is used to build the header above the list of one-click
> + instead of (searchFor.label, searchWith.label) in case of typed keyword is empty
> + search providers: "Search with:" -->
It seems there was a copy/paste mistake here. I rephrased this comment a little bit before the check-in.
Attachment #8547177 -
Flags: review?(florian) → review+
Updated•10 years ago
|
Flags: needinfo?(florian)
Updated•10 years ago
|
Attachment #8547177 -
Flags: approval-mozilla-aurora+
Comment 19•10 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Assignee | ||
Comment 20•10 years ago
|
||
Thanks Florian for your help and your efforts with me.
Updated•10 years ago
|
Iteration: --- → 37.3 - 12 Jan
Updated•10 years ago
|
QA Contact: petruta.rasa
Comment 21•10 years ago
|
||
(In reply to Abdelrhman Ahmed from comment #20)
> Thanks Florian for your help and your efforts with me.
You are welcome! If you would like to work on other search bugs, I just marked bug 1115002, bug 1113681, bug 1113639 and bug 1120957 as mentored.
Comment 22•10 years ago
|
||
This ended up getting merged to m-c in time for the uplift to Aurora.
status-firefox37:
--- → fixed
Comment 23•10 years ago
|
||
Verified as fixed using Developer Edition 37.0a2 2014-01-14 under Ubuntu 12.04 LTS 32-bit, Windows 7 64-bit and Mac OS X 10.9.5.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•