Closed Bug 345786 Opened 18 years ago Closed 18 years ago

Match case button missing from Find Bar

Categories

(Toolkit :: Find Toolbar, defect)

1.8 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1beta2

People

(Reporter: beltzner, Assigned: pkasting)

References

Details

(Keywords: fixed1.8.1, late-l10n)

Attachments

(1 file)

Bug 340849 went through a couple of iterations looking at making an "auto-case sensitve" mode for the Find Bar, and part of the solution was to remove the "Match Case" button from the bar.

The hidden pref is great, and I think will be a real gem for power users, but when it's not set, there still needs to be a way for users to get to their case sensitivity for those (admittedly few!) times that they need it.

What I'd suggest is:

 - no changes to the FastFind bar
 - when accessibility.typeaheadfind.casesensitive == (0||1) show the "Match Case" checkbox on the Find Toolbar and toggling the checkbox toggles these values
 - when accessibility.typeaheadfind.casesensitive == -1, only show a "(Case Sensitive)" label on the Find Toolbar when the user triggers auto case sensitivity mode

So net: add the "Match Case" box back to the Find Bar when accessibility.typeaheadfind.casesensitive == (0||1)
Assignee: nobody → pkasting
One other "net" out of this is that I should remove the "(Case sensitive)" label when the match case button is present.

Note that the Quick Find bar keeps the mode that the Find bar has, and has the "(Case sensitive)" label if applicable.  That is the current behavior (I think) and shouldn't change.
Blocks: 340849
Blocks: 341999
How about leaving the checkbox visible even for users with "auto-case sensitive" mode enabled?  (Typing a capital letter would then make the box become checked.) The advantages of using a checkbox rather than a label are that these users would still be able to do an all-lowercase case-sensitive search, and would still be able to do a case-insensitive search after pasting a mixed-case string.
(In reply to comment #2)
> How about leaving the checkbox visible even for users with "auto-case
> sensitive" mode enabled?  (Typing a capital letter would then make the box
> become checked.)

Checkboxes should never auto-toggle.  They should ESPECIALLY never toggle after a user has twiddled them, even once.  I've considered this before, and I just can't come up with a UI that doesn't make me run screaming.

I can see the desire for a "auto mostly, but sometimes forced one way" UI, but I don't think a checkbox is the right way to get that.  At this point I consider bug 341999 to be about solving that for Firefox 3.  I just posted more thoughts on this there.
(In reply to comment #3)
> I can see the desire for a "auto mostly, but sometimes forced one way" UI, but
> I don't think a checkbox is the right way to get that.  At this point I
> consider bug 341999 to be about solving that for Firefox 3.  I just posted more
> thoughts on this there.

As an added problem with the approach, it would mean that in some cases (ie: when case sensitive mode was set to "auto") clicking the checkbox would be temporary, but in other cases clicking the checkbox would actually change the setting. Boo.
Marking "at risk" as I'm still involved with bug 339127 (spellcheck attribute).  This shouldn't be too hard to do.
Whiteboard: [at risk]
CCing jminta, who said at dinner tonight he might be able to help with this.
(In reply to comment #6)
> CCing jminta, who said at dinner tonight he might be able to help with this.
> 
I got some feeds stuff assigned to me today, so it looks like I won't have time after all. :-(
Attached patch patch v1Splinter Review
This should do it.
Attachment #232050 - Flags: review?(mconnor)
Requesting blocking, removing at-risk
Status: NEW → RESOLVED
Closed: 18 years ago
Flags: blocking-firefox2?
Resolution: --- → FIXED
Whiteboard: [at risk]
Argh, I hadn't meant to RESOLVE FIXED :(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 232050 [details] [diff] [review]
patch v1

+    matchCaseCheckbox.hidden = this.mUsingMinimalUI ||
+      (this.mTypeAheadCaseSensitive != 0 && this.mTypeAheadCaseSensitive != 1);
+    matchCaseText.hidden = !matchCaseCheckbox.hidden;

why not just compare to 2?  r=me otherwise
Attachment #232050 - Flags: review?(mconnor) → review+
Blocks: 341716
(In reply to comment #11)
> (From update of attachment 232050 [details] [diff] [review] [edit])
> +    matchCaseCheckbox.hidden = this.mUsingMinimalUI ||
> +      (this.mTypeAheadCaseSensitive != 0 && this.mTypeAheadCaseSensitive !=
> 1);
> +    matchCaseText.hidden = !matchCaseCheckbox.hidden;
> 
> why not just compare to 2?  r=me otherwise

Because we actually treat any value other than 0 or 1 as meaning auto... I think this is noted in the comments on the pref itself.  The "official value" is in theory -1 (that was what the default was set to for the week or so that auto case was on by default).
Flags: blocking-firefox2? → blocking-firefox2+
Checked into trunk to bake.

/mozilla/toolkit/components/typeaheadfind/content/findBar.inc 1.13
/mozilla/toolkit/components/typeaheadfind/content/findBar.js 1.45
/mozilla/toolkit/locales/en-US/chrome/global/findbar.dtd 1.9
Whiteboard: [baking]
Status: REOPENED → RESOLVED
Closed: 18 years ago18 years ago
Resolution: --- → FIXED
Comment on attachment 232050 [details] [diff] [review]
patch v1

Requesting approval for branch.
Attachment #232050 - Flags: approval1.8.1?
I should note: the l10n impact here is that it re-adds a string from Fx 1.0/1.5 that was removed in B1.
Comment on attachment 232050 [details] [diff] [review]
patch v1

a=drivers for landing on the branch.
Attachment #232050 - Flags: approval1.8.1? → approval1.8.1+
Fixed on branch.

/mozilla/toolkit/components/typeaheadfind/content/findBar.inc 1.4.4.8
/mozilla/toolkit/components/typeaheadfind/content/findBar.js 1.21.2.22
/mozilla/toolkit/locales/en-US/chrome/global/findbar.dtd 1.3.4.6
Keywords: fixed1.8.1
Whiteboard: [baking]
*** Bug 351401 has been marked as a duplicate of this bug. ***
Product: Firefox → Toolkit
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: