Closed Bug 1361755 Opened 2 years ago Closed 2 years ago

Show Distribution homepage in homepage choices

Categories

(Firefox for Android :: Android partner distribution, enhancement)

enhancement
Not set

Tracking

()

RESOLVED FIXED
Firefox 55
Tracking Status
firefox55 --- fixed

People

(Reporter: mkaply, Assigned: mkaply)

Details

Attachments

(1 file, 1 obsolete file)

Currently for distributions, we allow a homepage to be specified, but that homepage is simply set as the user homepage.

If they change it, it can never be changed back.

We should provide a new option on the homepage dialog "distributon homepage" that allows the user to change back to the distribution homepage.

The text for this will be completely specified by the distribution - there will be no translation involved.
Attachment #8869125 - Flags: review?(snorp) → review?(s.kaspari)
Comment on attachment 8869125 [details]
Bug 1361755 - Allow distributions to specify a homepage option in prefs.

https://reviewboard.mozilla.org/r/140760/#review145540

LGTM. Although I'd bounce this off UX / product.

::: mobile/android/base/java/org/mozilla/gecko/preferences/SetHomepagePreference.java:23
(Diff revision 1)
>  import android.view.inputmethod.InputMethodManager;
>  import android.widget.EditText;
>  import android.widget.RadioButton;
>  import android.widget.RadioGroup;
>  
> +

nit: unnecessary newline?

::: mobile/android/base/resources/layout/preference_set_homepage.xml:24
(Diff revision 1)
>  
> +    <RadioButton android:id="@+id/radio_distribution"
> +                 android:layout_width="wrap_content"
> +                 android:layout_height="wrap_content"
> +                 android:layout_marginTop="8dp"
> +                 android:text="Distribution Placeholder"

Either do not specify any raw text in the layout. Or use tools:text=".." if it's just to see a preview in the IDE.
Attachment #8869125 - Flags: review?(s.kaspari) → review+
Anthony,

Who should double check this UI? It's distribution only.
Flags: needinfo?(alam)
Thanks for the ping! Some questions just to make sure I have enough context here.

(In reply to Mike Kaply [:mkaply] from comment #0)
> Currently for distributions, we allow a homepage to be specified, but that
> homepage is simply set as the user homepage.
> 
> If they change it, it can never be changed back.

Sorry! I'm not sure I follow. Who is the "they" in this case? is it:

The user? or the partner? and who will never be able to change it back?

> We should provide a new option on the homepage dialog "distributon homepage"
> that allows the user to change back to the distribution homepage.

This is interesting. But let's see if there are alternative options than simply another pref at this point? :) Mostly I'm worried about asking our users to wrap their heads around 2 types of Homepage setting. That might be a bit of a challenge. 

Were you suggesting it could sit next to the current "Set a Homepage" pref? Under Home?

> The text for this will be completely specified by the distribution - there
> will be no translation involved.

Do we not get to specify the pref label at all? or do you just mean the URL?
Flags: needinfo?(alam) → needinfo?(mozilla)
> Sorry! I'm not sure I follow. Who is the "they" in this case? is it:
> The user? or the partner? and who will never be able to change it back?

The user. So if they get a phone from say AT&T and AT&T sets the homepage, because the homepage is simply set as the default browser homepage, if the user changes it, they can never get back the AT&T homepage.

So the goal here is to have three options in the homepage:

1. Default homepage
2. Partner/distribution specific homepage (AT&T homepage for instance)
3. Custom homepage.

> Were you suggesting it could sit next to the current "Set a Homepage" pref? Under Home?

I should have posted a screenshot :).

When they click "Set a Homepage", they get the dialog with a third option:

Set a Homepage

(.) Firefox Home
( ) AT&T Homepage
( ) Custom

So they can choose AT&T homepage to get back the original homepage for the install.

> Do we not get to specify the pref label at all? or do you just mean the URL?

The label is specified completely by the distribution (which we create for the partners, so we do have control). Because the text could be anything:

"AT&T Portal", "Foo Homepage"
Flags: needinfo?(mozilla)
(In reply to Mike Kaply [:mkaply] from comment #5)
> When they click "Set a Homepage", they get the dialog with a third option:
> 
> Set a Homepage
> 
> (.) Firefox Home
> ( ) AT&T Homepage
> ( ) Custom
> 
> So they can choose AT&T homepage to get back the original homepage for the
> install.
> 
> > Do we not get to specify the pref label at all? or do you just mean the URL?
> 
> The label is specified completely by the distribution (which we create for
> the partners, so we do have control). Because the text could be anything:
> 
> "AT&T Portal", "Foo Homepage"

Awesome! I like this idea. Sounds good to me!

Thanks Mike!
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/970698e1bb62
Allow distributions to specify a homepage option in prefs. r=sebastian
Backed out for Android bustage at /mobile/android/base/resources/layout/preference_set_homepage.xml:20 (unbound prefix):

https://hg.mozilla.org/integration/autoland/rev/2645d067b1e3f4064f18a7d1241ec96b33402d07

Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=970698e1bb620df117a6da3964b9e4d9a7e7f7c2&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=103399554&repo=autoland

[task 2017-05-31T13:58:01.602155Z] 13:58:01     INFO -  Note: Some input files use or override a deprecated API.
[task 2017-05-31T13:58:01.602225Z] 13:58:01     INFO -  Note: Recompile with -Xlint:deprecation for details.
[task 2017-05-31T13:58:01.617588Z] 13:58:01     INFO -  /home/worker/workspace/build/src/java_home/bin/jar cMf gecko-thirdparty.jar -C gecko-thirdparty-classes .
[task 2017-05-31T13:58:02.744719Z] 13:58:02     INFO -  /home/worker/workspace/build/src/mobile/android/base/resources/layout/preference_set_homepage.xml:20: error: Error parsing XML: unbound prefix
[task 2017-05-31T13:58:02.753609Z] 13:58:02     INFO -  Makefile:487: recipe for target '.aapt.deps' failed
Flags: needinfo?(mozilla)
So it looks like just replacing with tools isn't good enough. Sorry about that.
Flags: needinfo?(mozilla)
Attachment #8869125 - Attachment is obsolete: true
Attachment #8869125 - Flags: review?(snorp)
Comment on attachment 8873115 [details]
Bug 1361755 - Allow distributions to specify a homepage option in prefs.

https://reviewboard.mozilla.org/r/144588/#review148442
Attachment #8873115 - Flags: review?(s.kaspari) → review+
Pushed by mozilla@kaply.com:
https://hg.mozilla.org/integration/autoland/rev/9b8b0f1e0c80
Allow distributions to specify a homepage option in prefs. r=sebastian
https://hg.mozilla.org/mozilla-central/rev/9b8b0f1e0c80
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 55
You need to log in before you can comment on or make changes to this bug.