Closed
Bug 1233250
Opened 9 years ago
Closed 8 years ago
Indicate cached version of site is being displayed
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox49 verified)
RESOLVED
FIXED
Firefox 49
Tracking | Status | |
---|---|---|
firefox49 | --- | verified |
People
(Reporter: antlam, Assigned: Grisha)
References
Details
Attachments
(6 files)
When we're trying "to be smart" by showing a cached version of a site to our users (cause we have it), we could probably indicate this status through something simple like a snackbar. copy tbd. Same padding and as snackbar: Roboto Regular, white, 14sp Background: link blue (#0096DD)
Reporter | ||
Comment 1•9 years ago
|
||
I think this is what we talked about in our convo today
Flags: needinfo?(mark.finkle)
Comment 2•9 years ago
|
||
(In reply to Anthony Lam (:antlam) from comment #1) > I think this is what we talked about in our convo today It is. We also talked about keeping the "snackbar" persistent until the user dismissed it. I'll use a normal snackbar in bug 935190 until we get something more specific in place.
Flags: needinfo?(mark.finkle)
Updated•8 years ago
|
Flags: needinfo?(margaret.leibovic)
Flags: needinfo?(gkruglov)
Comment 3•8 years ago
|
||
Is the design attached to this bug what we want to implement?
Flags: needinfo?(alam)
Reporter | ||
Comment 4•8 years ago
|
||
Yes! We currently have the standard snackbar for this "loading cached version" situation, and I think it'd be better with the spec in comment 0 :)
Flags: needinfo?(alam)
Assignee | ||
Comment 5•8 years ago
|
||
What's the final copy for this? This snackbar currently appears after the page finished loading (once "pageshow" event fires), so the message should take that into account. Current message: "Loading page from offline storage". - Showing cached version - ? Alternatively, we might consider showing this message when page begins loading, which I feel might be a better experience as page loads might take a while on certain pages (even from cache, it seems).
Assignee | ||
Updated•8 years ago
|
Flags: needinfo?(alam)
Assignee | ||
Comment 6•8 years ago
|
||
From offline conversation, "Showing offline version".
Flags: needinfo?(alam)
Assignee | ||
Comment 7•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50975/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/50975/
Attachment #8749467 -
Flags: review?(s.kaspari)
Attachment #8749468 -
Flags: review?(s.kaspari)
Attachment #8749469 -
Flags: review?(s.kaspari)
Assignee | ||
Comment 8•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50977/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/50977/
Assignee | ||
Comment 9•8 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/50979/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/50979/
Assignee | ||
Comment 10•8 years ago
|
||
Comment on attachment 8749469 [details] MozReview Request: Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50979/diff/1-2/
Attachment #8749469 -
Attachment description: MozReview Request: Bug 1233250 - Better copy for "loaded from cache" snackbar r=sebastian → MozReview Request: Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian
Reporter | ||
Comment 12•8 years ago
|
||
Comment on attachment 8749470 [details]
Screenshot_2016-05-05_16-54-19.png
nice! looks good!
Flags: needinfo?(alam)
Updated•8 years ago
|
Assignee: nobody → gkruglov
Assignee | ||
Updated•8 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 13•8 years ago
|
||
Comment on attachment 8749467 [details] MozReview Request: Bug 1233250: Pre - allow specifying snackbar's backgroundColor via Snackbars.jsm r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50975/diff/1-2/
Assignee | ||
Comment 14•8 years ago
|
||
Comment on attachment 8749468 [details] MozReview Request: Bug 1233250: Part 1 - Set offline snackbar background to link_blue r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50977/diff/1-2/
Assignee | ||
Comment 15•8 years ago
|
||
Comment on attachment 8749469 [details] MozReview Request: Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50979/diff/2-3/
Comment 16•8 years ago
|
||
Comment on attachment 8749467 [details] MozReview Request: Bug 1233250: Pre - allow specifying snackbar's backgroundColor via Snackbars.jsm r=sebastian https://reviewboard.mozilla.org/r/50975/#review48043 ::: mobile/android/base/java/org/mozilla/gecko/SnackbarHelper.java:92 (Diff revision 2) > + final String providedColor = object.getString("backgroundColor"); > + try { > + backgroundColor = Color.parseColor(providedColor); Does getString() return null if "backgroundColor" does not exist? Can Color.parseColor() handle null values? ::: mobile/android/base/java/org/mozilla/gecko/SnackbarHelper.java:94 (Diff revision 2) > + Integer backgroundColor = null; > + > + if (object.has("backgroundColor")) { > + final String providedColor = object.getString("backgroundColor"); > + try { > + backgroundColor = Color.parseColor(providedColor); Nice! I didn't know about parseColor(). ::: mobile/android/base/java/org/mozilla/gecko/SnackbarHelper.java:107 (Diff revision 2) > - showSnackbarWithAction(activity, > + showSnackbarWithActionAndColors(activity, > message, > duration, > action != null ? action.optString("label", null) : null, > - new SnackbarHelper.SnackbarEventCallback(callback)); > + new SnackbarHelper.SnackbarEventCallback(callback), > + null, backgroundColor, null); nit: Let's follow the style here and put every parameter on one line.
Attachment #8749467 -
Flags: review?(s.kaspari) → review+
Comment 17•8 years ago
|
||
Comment on attachment 8749468 [details] MozReview Request: Bug 1233250: Part 1 - Set offline snackbar background to link_blue r=sebastian https://reviewboard.mozilla.org/r/50977/#review48047
Attachment #8749468 -
Flags: review?(s.kaspari) → review+
Comment 18•8 years ago
|
||
Comment on attachment 8749469 [details] MozReview Request: Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian https://reviewboard.mozilla.org/r/50979/#review48051 ::: mobile/android/locales/en-US/chrome/browser.properties:426 (Diff revision 3) > openInApp.pageAction = Open in App > openInApp.ok = OK > openInApp.cancel = Cancel > > #Network Offline > -networkOffline.message = Loading page from offline storage > +networkOffline.message = Showing offline version When updating an existing string we add a counter so that the translation tools understand the change: > networkOffline.message2
Attachment #8749469 -
Flags: review?(s.kaspari) → review+
Assignee | ||
Comment 19•8 years ago
|
||
https://reviewboard.mozilla.org/r/50975/#review48043 > Does getString() return null if "backgroundColor" does not exist? Can Color.parseColor() handle null values? We're checking if `backgroundColor` exists right above. `parseColor` will throw if it can't handle its input, and it's wrapped in try/catch.
Assignee | ||
Comment 20•8 years ago
|
||
Comment on attachment 8749467 [details] MozReview Request: Bug 1233250: Pre - allow specifying snackbar's backgroundColor via Snackbars.jsm r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50975/diff/2-3/
Assignee | ||
Comment 21•8 years ago
|
||
Comment on attachment 8749468 [details] MozReview Request: Bug 1233250: Part 1 - Set offline snackbar background to link_blue r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50977/diff/2-3/
Assignee | ||
Comment 22•8 years ago
|
||
Comment on attachment 8749469 [details] MozReview Request: Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/50979/diff/3-4/
Assignee | ||
Comment 23•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ad28ba459bac
Assignee | ||
Comment 24•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/ebb9291ca4eabeb23d2625ba3e1bfb2f057f5e75 Bug 1233250: Pre - allow specifying snackbar's backgroundColor via Snackbars.jsm r=sebastian
Assignee | ||
Comment 25•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/04e8183848e9312e121b1645e58390f58f5549bb Bug 1233250: Part 1 - Set offline snackbar background to link_blue r=sebastian
Assignee | ||
Comment 26•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/91714307a799b978b0a94911cd99ee75a1de0ac5 Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar r=sebastian
Comment 27•8 years ago
|
||
(In reply to :Grisha Kruglov from comment #26) > https://hg.mozilla.org/integration/fx-team/rev/ > 91714307a799b978b0a94911cd99ee75a1de0ac5 > Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar > r=sebastian You changed the string label here but not in browser.js: https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js#7235
Flags: needinfo?(gkruglov)
Comment 28•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/ebb9291ca4ea https://hg.mozilla.org/mozilla-central/rev/04e8183848e9 https://hg.mozilla.org/mozilla-central/rev/91714307a799
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Assignee | ||
Comment 29•8 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/6b46587c1650471c6c112374f8f230b8d50929a9 Bug 1233250: use correct string name for offline message r=me
Assignee | ||
Comment 30•8 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #27) > (In reply to :Grisha Kruglov from comment #26) > > https://hg.mozilla.org/integration/fx-team/rev/ > > 91714307a799b978b0a94911cd99ee75a1de0ac5 > > Bug 1233250: Part 2 - Better copy for "loaded from cache" snackbar > > r=sebastian > > You changed the string label here but not in browser.js: > https://dxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/ > browser.js#7235 Bah! Thanks for the catch!
Flags: needinfo?(gkruglov)
Comment 31•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/6b46587c1650
Comment 32•8 years ago
|
||
Tested using: Device: Nexus 6 (Android 6.0) Build: Firefox for Android 49.0a1 (2016-05-12)
Updated•8 years ago
|
Updated•3 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
•