Closed Bug 1258971 Opened 4 years ago Closed 4 years ago

Preferences: Replace some checkboxes with switches

Categories

(Firefox for Android :: Settings and Preferences, defect)

All
Android
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 48
Tracking Status
firefox48 --- verified

People

(Reporter: sebastian, Assigned: sebastian)

References

(Depends on 1 open bug, Blocks 1 open bug, )

Details

Attachments

(3 files)

In some of antlam's mock he wanted to use switches instead of checkboxes in our preferences. We couldn't do this easily because SwitchPreference was introduced with Android 4. Now that Android 4 is our base line it should be simple to replace some of the checkboxes with switches.
@antlam: Do you have or want to create a list of settings where you prefer to have a switch over a checkbox? I only remember the notifications settings (bug 1247788) but those haven't landed yet.
Flags: needinfo?(alam)
From a quick scan, these are the areas where I think makes sense to have a switch instead of a checkbox. They're mostly one off features and preferences. 

---
General
---
Full-screen browsing
Tab queue

---
Privacy
---
Do not track

---
Accessibility
---
Always enable zoom
Magnify small areas
Voice input
QR code reader

---
Advanced
---
Allow autoplay
Remote debugging via USD
Remote debugging via Wi-Fi
Flags: needinfo?(alam)
Flags: needinfo?(s.kaspari)
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Flags: needinfo?(s.kaspari)
Attachment #8736682 - Flags: feedback?(alam)
xml/preferences_general.xml isn't used anymore. Replace it with the xml-v11 version
and then remove it from the xml-v11 folder.

Review commit: https://reviewboard.mozilla.org/r/43521/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/43521/
Attachment #8736685 - Flags: review?(gkruglov)
Attachment #8736686 - Flags: review?(gkruglov)
Comment on attachment 8736682 [details]
preferences_switches.png

This looks good! I filed bug 1261137 to group data-related prefs in Advanced under a title.
Attachment #8736682 - Flags: feedback?(alam) → feedback+
Attachment #8736686 - Flags: review?(gkruglov) → review+
Comment on attachment 8736686 [details]
MozReview Request: Bug 1258971 - Preferences: Replace some checkboxes with switches. r?grisha

https://reviewboard.mozilla.org/r/43523/#review40113

looks good!
Comment on attachment 8736685 [details]
MozReview Request: Bug 1258971 - Pre: Replace preferrences_general(_tablet).xml with v11 version. r?grisha

https://reviewboard.mozilla.org/r/43521/#review40115

looks good, just curious about comment below

::: mobile/android/base/resources/xml/preferences_general_tablet.xml:7
(Diff revision 1)
>  <!-- This Source Code Form is subject to the terms of the Mozilla Public
>     - License, v. 2.0. If a copy of the MPL was not distributed with this
>     - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
>  
> -<!-- Stub to preserve IDs. -->
> +<!-- Tablet only: The contents under the "General" header for tablets,
> +     See xml-v11/preferences.xml for single-pane v11+ phone layout.

can we now merge xml-v11 into xml versions of these prefs as well?
Attachment #8736685 - Flags: review?(gkruglov) → review+
(In reply to :Grisha Kruglov from comment #8)
> > -<!-- Stub to preserve IDs. -->
> > +<!-- Tablet only: The contents under the "General" header for tablets,
> > +     See xml-v11/preferences.xml for single-pane v11+ phone layout.
> 
> can we now merge xml-v11 into xml versions of these prefs as well?

Yeah, I filed bug 1261037: We shouldn't have any *-v11 up to *-v15 anymore since we use minSdkVersion 15.
https://hg.mozilla.org/integration/fx-team/rev/f06df39f560f722c2d98376b3be769c7a97aead0
Bug 1258971 - Pre: Replace preferrences_general(_tablet).xml with v11 version. r=grisha

https://hg.mozilla.org/integration/fx-team/rev/a73c2c9f6872dab1423744a4aa905a826dcd3f49
Bug 1258971 - Preferences: Replace some checkboxes with switches. r=grisha
https://hg.mozilla.org/mozilla-central/rev/f06df39f560f
https://hg.mozilla.org/mozilla-central/rev/a73c2c9f6872
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 48
The following preferences have switch instead of a checkbox:
General
-Full-screen browsing
-Tab queue
Privacy
-Do not track
Accessibility
-Always enable zoom
-Magnify small areas
-Voice input
Advanced
-Allow autoplay
-Remote debugging via USB
-Remote debugging via Wi-Fi

so, verified as fixed using:
Device: Nexus 7 (Android 5.1.1)
Build: Firefox for Android 48.0a1 (2016-04-05)
You need to log in before you can comment on or make changes to this bug.