Closed Bug 872329 Opened 11 years ago Closed 11 years ago

Apply existing settings to proposed Settings UI rework hierarchy

Categories

(Firefox for Android Graveyard :: Theme and Visual Design, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 25

People

(Reporter: liuche, Assigned: liuche)

References

Details

Attachments

(5 files, 20 obsolete files)

40.76 KB, image/png
Details
75.64 KB, image/png
Details
7.26 KB, patch
Details | Diff | Splinter Review
44.09 KB, patch
Details | Diff | Splinter Review
31.26 KB, patch
gbrown
: review+
Details | Diff | Splinter Review
Fit the existing settings into the proposed hierarchy in https://etherpad.mozilla.org/settings-reorg
OS: Mac OS X → Android
Hardware: x86 → ARM
Ian, here's a straight lift of settings into the new settings layout. Let me know what you think - some of the preference screens are a little sparse, because we don't have some of the features. Also reusing strings at the moment (see etherpad for some notes), so let me know if you have specific strings in mind already.

Works for tablet, v11+ phones, and pre-v11 phones (I need to fix the transitions on old phones so it's not so jerky).
Flags: needinfo?(ibarlow)
Derp, forgot to include link: http://people.mozilla.com/~liuche/bug-872329/fennec.apk
Attached patch Part 1: New strings. (obsolete) — Splinter Review
Ugly transitions in pre-v11 phones.
Assignee: nobody → liuche
Talked to ibarlow in person about some changes to the settings reorganization: two proposed versions are on the updated etherpad, saved as revision 1 (https://etherpad.mozilla.org/settings-reorg)

I'm making two apks to reflect to the different settings hierarchies.
Flags: needinfo?(ibarlow)
Early feedback: I don't think "Show product announcements [ ]" belongs in "Privacy". The rest of "Privacy" is focused on what happens when using web content. "Show product announcements [ ]" seems more like Telemetry/FHR/CrashReporter. Maybe.
(In reply to Mark Finkle (:mfinkle) from comment #7)
> Early feedback: I don't think "Show product announcements [ ]" belongs in
> "Privacy". The rest of "Privacy" is focused on what happens when using web
> content. "Show product announcements [ ]" seems more like
> Telemetry/FHR/CrashReporter. Maybe.

Do not block on this. Keep moving ahead.
(In reply to Mark Finkle (:mfinkle) from comment #7)
> Early feedback: I don't think "Show product announcements [ ]" belongs in
> "Privacy". The rest of "Privacy" is focused on what happens when using web
> content. "Show product announcements [ ]" seems more like
> Telemetry/FHR/CrashReporter. Maybe.

Yeah, looking at this again I think I agree with that.
Screenshot of privacy screen with no top privacy category ("General").
This screenshot is kind of weird-looking because categories do not automatically have a bottom cut-off, so it kind of looks like "Customize" spans more than we intended in the mock.
This screenshot displays the "faked" category in Froyo, basically inserting a category w/o a title.

The v3-layout-A.apk uses this (though there is extra space in ICS, that you'll see when you try it out).
This is another alternative layout for A w/o the faked categories, where we rearrange the nested screens above the category.
Ian, the test apks (v3-layout*) I promised you are here: http://people.mozilla.com/~liuche/bug-872329/

A and B are from our mocks, and C is another mock I threw together with a "Vendor" screen, that collects data collection and Mozilla info (see etherpad for more details).

The other screenshots are alternatives that I went through, with screenshots so you have an idea of what they look like.

One note: launching preferences from the data notification works, but I need to make some tweaks to get the scrolling right. Just scroll down manually to the telemetry stuff and pretend that it was done automatically :)

Let me know what you think.
Flags: needinfo?(ibarlow)
Thanks for these options, Chenxia!

I quite like what you did with option C. Using a "Mozilla" section to roll up the about, FAQs, Feedback and data sharing stuff makes sense to me. 

My only feedback so far is that exposing the "customize" items on the first page still feels a little awkward. Like we discussed last week, it's nice to have options on that top level, but given that these are things that you would likely only turn on or off once it might not make sense to promote them like this. Maybe for now the top level should just be titles that you have to drill down into:

Sync
---
Display
---
Customize
---
Privacy
---
Mozilla

With these last changes, I would be happy to land this into Nightly to get some wider feedback. 

From here, we can use follow-ups to work on polishing strings / adding descriptions as you pointed out in the etherpad.
Flags: needinfo?(ibarlow)
Blocks: 877791
Attachment #750771 - Attachment is obsolete: true
Attached patch Part 2: v4 layout xmls (obsolete) — Splinter Review
Attachment #750773 - Attachment is obsolete: true
Attachment #750774 - Attachment is obsolete: true
Attachment #755812 - Attachment is obsolete: true
Attachment #755814 - Attachment is obsolete: true
Attachment #755815 - Attachment is obsolete: true
Attachment #755816 - Attachment is obsolete: true
(added commit message)
Attachment #756193 - Attachment is obsolete: true
Attachment #756652 - Flags: review?(wjohnston)
Attached patch Part 2: layout xmls v1 (obsolete) — Splinter Review
Attachment #756654 - Flags: review?(wjohnston)
Going to file a follow-up for auto-scrolling to data reporting so that this can get landed and final strings can be decided.
Attachment #756194 - Attachment is obsolete: true
Ian, just a heads up with the data reporting category. I thought it would be good to separate the "data collection" from the "info" stuff.
Attachment #756661 - Flags: review?
YEP(In reply to Chenxia Liu [:liuche] from comment #22)
> Created attachment 756661 [details]
> Screenshot: "Mozilla" category
> 
> Ian, just a heads up with the data reporting category. I thought it would be
> good to separate the "data collection" from the "info" stuff.

You read my mind :)
Attachment #756661 - Flags: review? → review?(ibarlow)
Blocks: 878145
Attachment #756661 - Flags: review?(ibarlow)
Updated apk for anyone who wants to see the flow: http://people.mozilla.com/~liuche/bug-872329/v4.apk
Comment on attachment 756652 [details] [diff] [review]
Part 1: new strings + grouping unused ones v1

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

::: mobile/android/base/locales/en-US/android_strings.dtd
@@ +66,4 @@
>  
>  <!ENTITY settings "Settings">
>  <!ENTITY settings_title "Settings">
> +<!-- NEW CATEGORY STRINGS -->

Probably don't want the word "new" in here, as it will quickly become old. I don't think we need this header really.

::: mobile/android/base/strings.xml.in
@@ +78,5 @@
>  
>    <string name="settings">&settings;</string>
>    <string name="settings_title">&settings_title;</string>
> +
> +  <!-- NEW CATEGORY STRINGS -->

Same
Attachment #756652 - Flags: review?(wjohnston) → review+
Comment on attachment 756654 [details] [diff] [review]
Part 2: layout xmls v1

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

Looks good! I'm sure this breaks some tests, so you should run it through try and fix 'em before you land.

::: mobile/android/base/resources/xml-v11/preferences_customize_tablet.xml
@@ +11,5 @@
> +                  android:title="@string/pref_category_customize"
> +                  android:enabled="false">
> +
> +    <org.mozilla.gecko.SyncPreference android:title="@string/pref_sync"
> +                                      android:persistent="false" />

Add a note about this being different between phone tablet. Can we do that throughout to help simplify anyone trying to figure it out?
Attachment #756654 - Flags: review?(wjohnston) → review+
Attachment #756652 - Attachment is obsolete: true
Attached patch Part 2: layout xmls v2 (obsolete) — Splinter Review
Added clarification comments in xml resource files.

Tests patch will follow.
Attachment #756654 - Attachment is obsolete: true
Attached patch Part 2: layout xmls v3 (obsolete) — Splinter Review
Used incorrect default resource file for tablet.
Attachment #758303 - Attachment is obsolete: true
Attached patch Part 3: tests! (obsolete) — Splinter Review
Re-worked and re-enabled the settings tests; also fixed other broken tests. Running everything on try atm because robocop: https://tbpl.mozilla.org/?tree=Try&rev=9789c2314bbe
Attached patch Part 2: layout xmls v3 (obsolete) — Splinter Review
Use correct resource for tablet Customize fragment on settings launch.
Attachment #760653 - Attachment is obsolete: true
Attached patch Part 3: tests v2 (obsolete) — Splinter Review
Re-enable settings tests, fix a keyboard dismiss that fail on devices with hardware keyboard, clean up some other tests, etc.

WIP because still need to handle bug 882191.
Attachment #760654 - Attachment is obsolete: true
Attached patch Part 2: layout xmls v4 (obsolete) — Splinter Review
Bitrot caused by landing bug 873072
Attachment #761560 - Attachment is obsolete: true
Attachment #761560 - Attachment is obsolete: false
Comment on attachment 761559 [details] [diff] [review]
Part 2: layout xmls v3

Mis-click in obsoleting patches.
Attachment #761559 - Attachment is obsolete: true
Un-bitrotted. This keeps the old strings so we won't have to risk re-localizing them in case we want to go back to any of them. Bug 877791 tracks removing old strings when we've finalized them.
Attachment #758205 - Attachment is obsolete: true
Un-bitrot.
Attachment #762979 - Attachment is obsolete: true
Attached patch Part 3: tests v3 (obsolete) — Splinter Review
Quick look-over from you, Geoff, since some of this is from your patch in bug 882191. I removed the Privacy/Privacy & Settings duality because that was a bug on my part - they should all use the same strings.
Attachment #761560 - Attachment is obsolete: true
Attachment #767006 - Flags: review?(gbrown)
Try build with test fix from bug 882191 applied on top: https://tbpl.mozilla.org/?tree=Try&rev=9d119ffdb171
Depends on: 882191
Comment on attachment 767006 [details] [diff] [review]
Part 3: tests v3

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

This is great -- mostly just nits below. The try run looks a little rough still, especially testSettingsMenuItems -- let's get that running reliably for the next review.

::: mobile/android/base/tests/BaseTest.java.in
@@ +401,5 @@
>  
>      /** 
>       * Select <item> from Menu > "Settings" > <section>
> +     *
> +     * Caller must already be in Settings, by calling selectMenuItem("Settings").

I really prefer this the way it was: Have selectSettingsItem call selectMenuItem("Settings") rather than make all the callers do it.

@@ +406,4 @@
>       */
>      public void selectSettingsItem(String section, String item) {
>          String itemName = "^" + item + "$";
> +        waitForText(section);

Not waitForEnabledText()? You don't need that any more?

::: mobile/android/base/tests/testSettingsMenuItems.java.in
@@ +2,5 @@
>  package @ANDROID_PACKAGE_NAME@.tests;
>  
>  import @ANDROID_PACKAGE_NAME@.*;
>  
> +import android.test.ActivityInstrumentationTestCase2;

Are you sure you need this?

@@ +92,2 @@
>  
> +        navigation = new Navigation(new Device());

nit - use mDevice (from BaseTest) instead of a new instance

@@ +99,5 @@
>          verifyUrl("about:home");
>          mActions.sendSpecialKey(Actions.SpecialKey.BACK);
>          waitForText("Enter Search"); // Waiting for page title to appear to be sure that is fully loaded before opening the menu
>  
> +        Device mDevice = new Device();

use mDevice from BaseTest

@@ +113,5 @@
> +     *
> +     * Sync location is a top level menu item on phones, but is under "Customize" on tablets.
> +     *
> +     */
> +    public void checkForSync(Device device) {

Just use mDevice member -- no need to pass as a parameter.

@@ +137,5 @@
> +            for (String[] item : sectionItems) {
> +                int itemLen = item.length;
> +
> +                // Each item must at least have a title.
> +                ActivityInstrumentationTestCase2.assertTrue(item.length > 0);

Why not use a method from mAsserter here?

@@ +174,5 @@
> +                  mSolo.clickOnText("^Cancel$");
> +                }
> +            }
> +            // Navigate back a screen if on a phone.
> +            Device device = new Device();

mDevice again
Attachment #767006 - Flags: review?(gbrown) → review-
Thanks, I'll make those changes. While looking at the try builds, I discovered that I had added a regression (bug 886916) that was breaking the settings tests. I'll land that and upload a new patch with review comments addressed.
Attached patch Part 3: tests v4 (obsolete) — Splinter Review
Responded to comments, fixed some other tests that dealt with nested settings.

When testing locally, I'm seeing a failure in testImportFromAndroid on a 2.3 phone, but not my 4.0 phone or 4.0 tablet, where the last history item is not found. I suspect it's a race condition related to [1], but let me know what you think.

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tests/testImportFromAndroid.java.in#54
Attachment #767006 - Attachment is obsolete: true
Attachment #767551 - Flags: review?(gbrown)
Attached patch Part 3: tests v5Splinter Review
Whoops, qref
Attachment #767551 - Attachment is obsolete: true
Attachment #767551 - Flags: review?(gbrown)
Attachment #767553 - Flags: review?(gbrown)
(In reply to Chenxia Liu [:liuche] from comment #41)
> Created attachment 767551 [details] [diff] [review]
> Part 3: tests v4
> 
> Responded to comments, fixed some other tests that dealt with nested
> settings.
> 
> When testing locally, I'm seeing a failure in testImportFromAndroid on a 2.3
> phone, but not my 4.0 phone or 4.0 tablet, where the last history item is
> not found. I suspect it's a race condition related to [1], but let me know
> what you think.
> 
> [1]
> http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/tests/
> testImportFromAndroid.java.in#54

I think you are probably right. Does it help if you change the timeout to something like 10000 instead of MAX_WAIT_MS?
Comment on attachment 767553 [details] [diff] [review]
Part 3: tests v5

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

Thanks for all the updates. 

r+ conditional on a good try run, of course.

::: mobile/android/base/tests/BaseTest.java.in
@@ +457,5 @@
>              mSolo.clickOnText(itemName);
>          } else {
> +            // Record that we've timed out waiting for "Settings" on the top menu
> +            // screen so we can skip the timeout step next time.
> +            menuSettingsTimedOut = true;

Good idea!
Attachment #767553 - Flags: review?(gbrown) → review+
This enables testSettingsMenuItems, so dropping a ref to bug 843947 here because these patches should fix the intermittent oranges.
Blocks: 888374
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: