Closed
Bug 708414
Opened 13 years ago
Closed 13 years ago
invite users to set up sync on about:home
Categories
(Firefox for Android Graveyard :: General, defect, P2)
Tracking
(firefox11 verified, firefox12 verified, firefox13 verified, fennec11+)
VERIFIED
FIXED
Firefox 12
People
(Reporter: madhava, Assigned: lucasr)
References
Details
(Keywords: uiwanted)
Attachments
(7 files, 3 obsolete files)
523.52 KB,
image/png
|
Details | |
196.27 KB,
image/png
|
Details | |
47.05 KB,
application/zip
|
Details | |
2.41 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
6.36 KB,
patch
|
mfinkle
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
4.08 KB,
patch
|
blassey
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
74.71 KB,
patch
|
lucasr
:
review+
akeybl
:
approval-mozilla-aurora+
|
Details | Diff | Splinter Review |
The main about:home design/dev is going on over in bug 706667.
The sync setup overview bug is here: bug 698594.
The current mockups in 706667 don't include the invitation to set up sync that is stipulated in 698594, but the next rev will. Oh yes - IT WILL.
Updated•13 years ago
|
Assignee: nobody → lucasr.at.mozilla
Priority: -- → P2
Comment 1•13 years ago
|
||
Button specs and assets to follow soon
Comment 2•13 years ago
|
||
(also, changed the button to grey)
Comment 3•13 years ago
|
||
Updated•13 years ago
|
OS: Mac OS X → Android
Hardware: x86 → ARM
Updated•13 years ago
|
tracking-fennec: --- → 11+
Comment 4•13 years ago
|
||
I expect this to come with strings?
Assignee | ||
Comment 5•13 years ago
|
||
(In reply to Axel Hecht [:Pike] from comment #4)
> I expect this to come with strings?
Yes, it will add a new string. I saw that Brian has fixed the hardcoded strings in about:home in his patch for bug 712970.
Assignee | ||
Comment 6•13 years ago
|
||
Attachment #589592 -
Flags: review?(blassey.bugs)
Assignee | ||
Comment 7•13 years ago
|
||
Attachment #589593 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 8•13 years ago
|
||
Attachment #589595 -
Flags: review?(mark.finkle)
Assignee | ||
Comment 9•13 years ago
|
||
Attachment #589597 -
Flags: review?(mark.finkle)
Updated•13 years ago
|
Attachment #589593 -
Flags: review?(mark.finkle) → review+
Comment 10•13 years ago
|
||
Comment on attachment 589592 [details] [diff] [review]
(1/4) Add API to check if Fennec is running for the first time
Let's just make sure we don't get a StrictMode violation on this. Being in a background thread should keep that from being a problem.
Attachment #589592 -
Flags: feedback+
Comment 11•13 years ago
|
||
Comment on attachment 589595 [details] [diff] [review]
(3/4) Show message when there are no top sites to show in about:home
>diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd
>+<!ENTITY abouthome_no_top_sites "You do no have any top sites yet. Tap the Title bar to start browsing.">
>\ No newline at end of file
nit: add a newline at end of file
Attachment #589595 -
Flags: review?(mark.finkle) → review+
Comment 12•13 years ago
|
||
Comment on attachment 589597 [details] [diff] [review]
(4/4) Invite users to set up sync on about:home
>diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java
>+ TextView syncTextView = (TextView) findViewById(R.id.sync_text);
>+ String syncText = syncTextView.getText().toString() + " \u00BB";
>+ int styleIndex = syncText.indexOf("Firefox Sync");
Don't hard code this. Make a second string "abouthome_sync_bold" and use it to find the style index
>diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd
>+<!ENTITY abouthome_no_top_sites "You do no have any top sites yet. Tap the Title bar to start browsing.">
>+<!ENTITY abouthome_sync "Set up Firefox Sync to access bookmarks, history and tabs from your other devices">
Normally I would suggest using brandShortName entity to make the string, but we use "Firefox Sync" like this in XUL too.
I do think we want to better control the "bold" string, so add:
<!ENTITY abouthome_sync_bold "Firefox Sync">
>\ No newline at end of file
nit: add one
>diff --git a/mobile/android/base/resources/drawable/abouthome_sync_box.xml b/mobile/android/base/resources/drawable/abouthome_sync_box.xml
>\ No newline at end of file
nit: add one
Attachment #589597 -
Flags: review?(mark.finkle) → review+
Comment 13•13 years ago
|
||
Comment on attachment 589592 [details] [diff] [review]
(1/4) Add API to check if Fennec is running for the first time
pretty sure this will regress start up. SharedPreferences is pretty heavy for this particular purpose, according to DougT accessing it can take ~200ms because it needs to hit the disk. Since you're posting to the front of the queue in onCreate, you'll delay onNewIntent() by that time.
Instead I suggest you perform your own disk access on a background thread to do this.
Its also not obvious to me that we need to do this so early in start up anyway. Unless there's a good reason not to, I'd suggest you delay initializing mStartupMode until it is accessed. And we shouldn't have to access it until about:home is being created or even after it is displayed.
Attachment #589592 -
Flags: review?(blassey.bugs) → review-
Comment 14•13 years ago
|
||
sorry, just realized that you're doing this on the background thread, my assumption that this was the main UI thread came from the fact that you're using SharedPreferences and as far as I know that needs to be accessed on the main UI thread. I'll look into that further in the morning.
Assignee | ||
Comment 15•13 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #14)
> sorry, just realized that you're doing this on the background thread, my
> assumption that this was the main UI thread came from the fact that you're
> using SharedPreferences and as far as I know that needs to be accessed on
> the main UI thread. I'll look into that further in the morning.
AFAIK, SharedPreferences is thread-safe. What you can't do is reading and writing prefs from different *processes*.
Reporter | ||
Comment 16•13 years ago
|
||
Regarding bug 717691 -- looks like sync setup isn't possible for certain older versions of Android? If it's not possible, we shouldn't show the UI on the start page (vs. showing it and then having setup fail).
Comment 17•13 years ago
|
||
Comment on attachment 589592 [details] [diff] [review]
(1/4) Add API to check if Fennec is running for the first time
Review of attachment 589592 [details] [diff] [review]:
-----------------------------------------------------------------
looks like SharedPreferences is safe to use on the background thread. But the rest of my reviewis still valid, we don't need to be doing this so early on startup.
Assignee | ||
Comment 18•13 years ago
|
||
Assignee | ||
Comment 19•13 years ago
|
||
Comment on attachment 590717 [details] [diff] [review]
Add API to check if Fennec is running for the first time (
Sorry for the spam. Ignore this one.
Attachment #590717 -
Attachment is obsolete: true
Assignee | ||
Comment 20•13 years ago
|
||
Removed early initialization of startup mode. Moved it to when we init about:home's content (see patch 4/4).
Attachment #590718 -
Flags: review?(blassey.bugs)
Assignee | ||
Updated•13 years ago
|
Attachment #589592 -
Attachment is obsolete: true
Assignee | ||
Comment 21•13 years ago
|
||
Just added a getStartupMode() call in background thread while loading about:home's content. Keeping r+.
Attachment #589597 -
Attachment is obsolete: true
Attachment #590720 -
Flags: review+
Comment 22•13 years ago
|
||
Comment on attachment 590718 [details] [diff] [review]
(1/4) Add API to check if Fennec is running for the first time
Review of attachment 590718 [details] [diff] [review]:
-----------------------------------------------------------------
::: mobile/android/base/GeckoApp.java
@@ +774,5 @@
> }
> });
> }
>
> + public StartupMode getStartupMode() {
add a comment above this that says "this function may touch the disk, don't call it on the main thread"
Also, this should probably be synchronized unless we can guarantee its always run on the same thread. If you're going with the "always run on the same thread" approach, add a check for that.
@@ +775,5 @@
> });
> }
>
> + public StartupMode getStartupMode() {
> + if (mStartupMode == null) {
I'm a fan of early returns, so:
if (mStartupMode != null)
return mStartupMode;
// initialize it
return mStartupMode;
Attachment #590718 -
Flags: review?(blassey.bugs) → review+
Assignee | ||
Comment 23•13 years ago
|
||
(In reply to Brad Lassey [:blassey] from comment #22)
> Comment on attachment 590718 [details] [diff] [review]
> (1/4) Add API to check if Fennec is running for the first time
>
> Review of attachment 590718 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: mobile/android/base/GeckoApp.java
> @@ +774,5 @@
> > }
> > });
> > }
> >
> > + public StartupMode getStartupMode() {
>
> add a comment above this that says "this function may touch the disk, don't
> call it on the main thread"
Done.
> Also, this should probably be synchronized unless we can guarantee its
> always run on the same thread. If you're going with the "always run on the
> same thread" approach, add a check for that.
Good point. Enclosed everything in a synchronized block.
> @@ +775,5 @@
> > });
> > }
> >
> > + public StartupMode getStartupMode() {
> > + if (mStartupMode == null) {
>
> I'm a fan of early returns, so:
Me too :-) Don't know why I did it differently now. Fixed.
Assignee | ||
Comment 24•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #11)
> Comment on attachment 589595 [details] [diff] [review]
> (3/4) Show message when there are no top sites to show in about:home
>
> >diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd
> >+<!ENTITY abouthome_no_top_sites "You do no have any top sites yet. Tap the Title bar to start browsing.">
> >\ No newline at end of file
>
> nit: add a newline at end of file
Fixed.
Assignee | ||
Comment 25•13 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #12)
> Comment on attachment 589597 [details] [diff] [review]
> (4/4) Invite users to set up sync on about:home
>
>
> >diff --git a/mobile/android/base/AboutHomeContent.java b/mobile/android/base/AboutHomeContent.java
>
> >+ TextView syncTextView = (TextView) findViewById(R.id.sync_text);
> >+ String syncText = syncTextView.getText().toString() + " \u00BB";
> >+ int styleIndex = syncText.indexOf("Firefox Sync");
>
> Don't hard code this. Make a second string "abouthome_sync_bold" and use it
> to find the style index
>
> >diff --git a/mobile/android/base/locales/en-US/android_strings.dtd b/mobile/android/base/locales/en-US/android_strings.dtd
>
> >+<!ENTITY abouthome_no_top_sites "You do no have any top sites yet. Tap the Title bar to start browsing.">
> >+<!ENTITY abouthome_sync "Set up Firefox Sync to access bookmarks, history and tabs from your other devices">
>
> Normally I would suggest using brandShortName entity to make the string, but
> we use "Firefox Sync" like this in XUL too.
>
> I do think we want to better control the "bold" string, so add:
>
> <!ENTITY abouthome_sync_bold "Firefox Sync">
Done.
> >\ No newline at end of file
>
> nit: add one
Done.
> >diff --git a/mobile/android/base/resources/drawable/abouthome_sync_box.xml b/mobile/android/base/resources/drawable/abouthome_sync_box.xml
>
> >\ No newline at end of file
>
> nit: add one
Done.
Assignee | ||
Comment 26•13 years ago
|
||
Assignee | ||
Comment 27•13 years ago
|
||
Comment on attachment 589593 [details] [diff] [review]
(2/4) Improve layout of about:home for top sites
Missing feature in aurora. Mobile only.
Attachment #589593 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 28•13 years ago
|
||
Comment on attachment 589595 [details] [diff] [review]
(3/4) Show message when there are no top sites to show in about:home
Missing feature in aurora. Mobile only.
Attachment #589595 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 29•13 years ago
|
||
Comment on attachment 590718 [details] [diff] [review]
(1/4) Add API to check if Fennec is running for the first time
Missing feature in aurora. Mobile only.
Attachment #590718 -
Flags: approval-mozilla-aurora?
Assignee | ||
Comment 30•13 years ago
|
||
Comment on attachment 590720 [details] [diff] [review]
(4/4) Invite users to set up sync on about:home
Missing feature in aurora. Mobile only.
Attachment #590720 -
Flags: approval-mozilla-aurora?
Comment 31•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/16cc48013e6a
https://hg.mozilla.org/mozilla-central/rev/977686f756fe
https://hg.mozilla.org/mozilla-central/rev/3a59fe0a2dbe
https://hg.mozilla.org/mozilla-central/rev/9e1503b399a7
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 12
Comment 32•13 years ago
|
||
Comment on attachment 589593 [details] [diff] [review]
(2/4) Improve layout of about:home for top sites
[Triage Comment]
Mobile only - approved for Aurora.
Attachment #589593 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•13 years ago
|
Attachment #589595 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•13 years ago
|
Attachment #590718 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Updated•13 years ago
|
Attachment #590720 -
Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Comment 33•13 years ago
|
||
https://hg.mozilla.org/releases/mozilla-aurora/rev/68105795f01d
https://hg.mozilla.org/releases/mozilla-aurora/rev/7d59e1b01229
https://hg.mozilla.org/releases/mozilla-aurora/rev/1fae65115913
https://hg.mozilla.org/releases/mozilla-aurora/rev/c77e8f61673d
status-firefox11:
--- → fixed
Comment 34•13 years ago
|
||
Nightly 13.0a1 (2012-02-03)
Aurora 12.0a2 (2012-02-02)
Beta 11.0 (2012-02-01)
Device: Samsung Google Nexus S - Android 2.3.6
Invite to sync is displayed on about:home page. After sync is performed, invite is not displayed anymore on start page.
Marking bug as verified fixed.
Updated•4 years ago
|
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•