Closed
Bug 1157526
Opened 10 years ago
Closed 10 years ago
Replace super toasts with snackbar
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox45 fixed, relnote-firefox 45+)
RESOLVED
FIXED
Firefox 45
People
(Reporter: mhaigh, Assigned: sebastian)
References
Details
(Keywords: dev-doc-needed)
Attachments
(7 files)
|
60.24 KB,
image/png
|
Details | |
|
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
|
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
|
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
|
MozReview Request: Bug 1157526 - (Part 4) Replace "Add-on installed" toast with snackbar. r?mcomella
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
|
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
|
40 bytes,
text/x-review-board-request
|
mcomella
:
review+
|
Details |
According to the docs [1] "Toasts are similar to snackbars but _do not contain actions_ ...". We should remove our super toasts and replace them with snackbars [1] to ensure parity.
1: http://www.google.com/design/spec/components/snackbars-toasts.html#
Comment 1•10 years ago
|
||
Mr. Cranky Pants says "I'd rather get some of our stability work and glaring polish work underway, and delay this change for a while."
Comment 2•10 years ago
|
||
^ I'd agree, especially due to snack bar support for non-L versions.
Maybe this is something we can do for just L versions? would that be easier?
Comment 3•10 years ago
|
||
^ Although, even then - I can see a lot of cases in our UI that this might be more finicky in than anticipated.
(In reply to Anthony Lam (:antlam) from comment #2)
> ^ I'd agree, especially due to snack bar support for non-L versions.
Or any versions! Apparently there is no official API yet [1] so maybe we should hold out for the (presumably to-be-released) Google API.
[1]: https://stackoverflow.com/questions/25633695/is-there-code-for-snackbars-in-android-l-or-are-we-expected-to-implement-them-ou
| Reporter | ||
Updated•10 years ago
|
Assignee: mhaigh → nobody
Comment 5•10 years ago
|
||
Any chance we can get this back up for consideration? With the changes to the tabs tray, the current toasts are now blocking content. This is something we wouldn't have to worry about if we used the suggested SnackBar experience since they hug the bottom of the screen. Meaning that if a user is swiping away a few tabs, the perception of the blocked area is significantly smaller.
Plus we now have backwards compatibility thanks to the Android Design Support Library: http://developer.android.com/tools/support-library/features.html#design
(In reply to Paul [pwd] from comment #5)
> Plus we now have backwards compatibility thanks to the Android Design
> Support Library:
> http://developer.android.com/tools/support-library/features.html#design
Note: there are some concerns about how this might grow our APK size (see bug 1189306). But presumably we'll need to add it eventually...
Depends on: 1189306
Comment 7•10 years ago
|
||
Should we re-prioritize this? It would help with issues like bug 1204760.
Flags: needinfo?(bbermes)
Flags: needinfo?(alam)
Comment 8•10 years ago
|
||
How much engineering effort is this? I'd love to progress all our toasts to snack bars. I think this would move us a huge step closer to being more updated/polished.
Flags: needinfo?(alam)
(In reply to Anthony Lam (:antlam) from comment #8)
> How much engineering effort is this? I'd love to progress all our toasts to
> snack bars. I think this would move us a huge step closer to being more
> updated/polished.
The SnackBar API is simple so provided we have them draw over other views, it seems easy. I think some apps scroll the app content to get it out of the way of the SnackBar – that'd be much more difficult.
Comment 10•10 years ago
|
||
Looking at our roadmap, we are packed for 44...maybe something for 45?
(In reply to Paul [pwd] from comment #5)
> Any chance we can get this back up for consideration? With the changes to
> the tabs tray, the current toasts are now blocking content.
Not sure if I understand the issue here. Do we have a screenshot?
Flags: needinfo?(bbermes)
Flags: needinfo?(bbermes)
Comment 12•10 years ago
|
||
I really want this to happen. I'm noting it dev-doc-needed because I think https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/toast will need to be updated.
Keywords: dev-doc-needed
Comment 14•10 years ago
|
||
^oops, i meant to attach this link for ya :P
https://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-specs
Comment 15•10 years ago
|
||
(In reply to Nick Alexander :nalexander from comment #12)
> I really want this to happen. I'm noting it dev-doc-needed because I think
> https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/
> NativeWindow/toast will need to be updated.
Would we change the API for add-ons? Or do you just mean talking about the fact that the UI representation is now different?
Comment 16•10 years ago
|
||
I'd also like to see bug 1052276 impl'd too.
Comment 17•10 years ago
|
||
(In reply to Mark Finkle (:mfinkle) from comment #15)
> (In reply to Nick Alexander :nalexander from comment #12)
> > I really want this to happen. I'm noting it dev-doc-needed because I think
> > https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/
> > NativeWindow/toast will need to be updated.
>
> Would we change the API for add-ons? Or do you just mean talking about the
> fact that the UI representation is now different?
I think we would change the API for add-ons, since the UI guidelines more or less forbid icons: "Snackbars should contain a single line of text directly related to the operation performed. They may contain a text action. They cannot contain icons." (From http://www.google.com/design/spec/components/snackbars-toasts.html#snackbars-toasts-usage.)
Comment 18•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #11)
> Created attachment 8669724 [details]
> Toast blocks tabs tray example
Thanks mcomella - not really sure if I get this here --> the toast will disappear though after a while, wouldn't the snackbar cover some of the tabs tray as well (even if it's docked)?
Just trying to understand the urgency here and to prioritize. I understand Anthony wants to polish things but we need to understand effort etc.
Flags: needinfo?(bbermes)
(In reply to Barbara Bermes [:barbara] from comment #18)
> Thanks mcomella - not really sure if I get this here --> the toast will
> disappear though after a while, wouldn't the snackbar cover some of the tabs
> tray as well (even if it's docked)?
Yes – our current toast is more inconvenient though (i.e. covers the center of the tabs), which is probably a reason why Android is moving away from toasts and towards SnackBars.
Flags: needinfo?(bbermes)
Comment 20•10 years ago
|
||
Alright, thanks Mike.
I created an Aha card to discuss priority in our funnel meeting: https://mozilla.aha.io/features/FENN-350
Thanks
Flags: needinfo?(bbermes)
| Assignee | ||
Comment 21•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #19)
> (In reply to Barbara Bermes [:barbara] from comment #18)
> > Thanks mcomella - not really sure if I get this here --> the toast will
> > disappear though after a while, wouldn't the snackbar cover some of the tabs
> > tray as well (even if it's docked)?
>
> Yes – our current toast is more inconvenient though (i.e. covers the center
> of the tabs), which is probably a reason why Android is moving away from
> toasts and towards SnackBars.
Additionally a snackbar supports swipe-to-dismiss if used in conjunction with a CoordinatorLayout.
| Assignee | ||
Updated•10 years ago
|
Comment 22•10 years ago
|
||
I noticed that for adding a bookmark, we still use toasts - is there a bug for that?
| Assignee | ||
Comment 23•10 years ago
|
||
(In reply to Chenxia Liu [:liuche] from comment #22)
> I noticed that for adding a bookmark, we still use toasts - is there a bug
> for that?
I only migrated the "closed tab" toast for now. I'm planning on changing all other toasts here later.
Comment 24•10 years ago
|
||
(In reply to Sebastian Kaspari (:sebastian) from comment #23)
> (In reply to Chenxia Liu [:liuche] from comment #22)
> > I noticed that for adding a bookmark, we still use toasts - is there a bug
> > for that?
>
> I only migrated the "closed tab" toast for now. I'm planning on changing all
> other toasts here later.
We could file mentor bugs for the remaining button toasts. It would actually be pretty nice if we can remove our custom ButtonToast implementation (and deprecate the add-on API for buttons in toasts).
| Assignee | ||
Comment 25•10 years ago
|
||
Bug 1157526 - (Part 1) Replace "New tab" toast with snackbar. r?mcomella
Attachment #8686689 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 26•10 years ago
|
||
Bug 1157526 - (Part 2) Replace "New private tab" toast with snackbar. r?mcomella
Attachment #8686690 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 27•10 years ago
|
||
Bug 1157526 - (Part 3) Replace "Image unblocked" toast with snackbar. r?mcomella
Attachment #8686691 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 28•10 years ago
|
||
Bug 1157526 - (Part 4) Replace "Add-on installed" toast with snackbar. r?mcomella
Attachment #8686692 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 29•10 years ago
|
||
Bug 1157526 - (Part 5) Remove unused toast method. r?mcomella
Attachment #8686693 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 30•10 years ago
|
||
Bug 1157526 - (Part 6) Replace "Already signed in" toast with snackbar. r?mcomella
Attachment #8686694 -
Flags: review?(michael.l.comella)
| Assignee | ||
Comment 31•10 years ago
|
||
This series of patches replaces all button toasts with snackbars. This is enough to let us deprecate adding buttons to toast via the API.
Note: Some toasts used "short" durations previously and are now using "long" as a snackbar. The snackbar dismissed just too fast to read the text and press the button (Long = 2750ms, Short = 1500ms). I feel like "short" is more suitable for feedback snackbars without buttons.
We have bug 1216051 filed for thinking about deprecating toasts. After those patches I'd at least deprecate the button part - because that's custom non-Android stuff. Developers can now use the Snackbar API for that.
I'll also file a bug about the remaining (non-button) toasts. I feel like some of them make sense. For example non-important feedback toasts (e.g. "Printing..."). A snackbar could be too disruptive. But that's something to discuss with antlam in the new bug.
Assignee: nobody → s.kaspari
Status: NEW → ASSIGNED
Comment on attachment 8686689 [details]
MozReview Request: Bug 1157526 - (Part 1) Replace "New tab" toast with snackbar. r?mcomella
https://reviewboard.mozilla.org/r/25025/#review22607
Attachment #8686689 -
Flags: review?(michael.l.comella) → review+
Attachment #8686690 -
Flags: review?(michael.l.comella) → review+
Comment on attachment 8686690 [details]
MozReview Request: Bug 1157526 - (Part 2) Replace "New private tab" toast with snackbar. r?mcomella
https://reviewboard.mozilla.org/r/25027/#review22609
Comment on attachment 8686691 [details]
MozReview Request: Bug 1157526 - (Part 3) Replace "Image unblocked" toast with snackbar. r?mcomella
https://reviewboard.mozilla.org/r/25029/#review22611
Attachment #8686691 -
Flags: review?(michael.l.comella) → review+
Comment on attachment 8686692 [details]
MozReview Request: Bug 1157526 - (Part 4) Replace "Add-on installed" toast with snackbar. r?mcomella
https://reviewboard.mozilla.org/r/25031/#review22613
::: mobile/android/tests/browser/robocop/roboextender/base/robocop_prompt_gridinput.html:34
(Diff revision 1)
> - { iconUri: "drawable://alert_addon", name: "Icon 11" },
> + { iconUri: "drawable://icon", name: "Icon 11" },
Without digging deeper, I'm unsure this will pass but if it passes for you, wfm.
Attachment #8686692 -
Flags: review?(michael.l.comella) → review+
Comment on attachment 8686693 [details]
MozReview Request: Bug 1157526 - (Part 5) Remove unused toast method. r?mcomella
https://reviewboard.mozilla.org/r/25033/#review22615
Attachment #8686693 -
Flags: review?(michael.l.comella) → review+
Attachment #8686694 -
Flags: review?(michael.l.comella) → review+
Comment on attachment 8686694 [details]
MozReview Request: Bug 1157526 - (Part 6) Replace "Already signed in" toast with snackbar. r?mcomella
https://reviewboard.mozilla.org/r/25035/#review22617
Snackbars? [Give me a break!](https://www.youtube.com/watch?v=0nkcVz1mad0) ;)
| Assignee | ||
Comment 38•10 years ago
|
||
(In reply to Michael Comella (:mcomella) from comment #35)
> Without digging deeper, I'm unsure this will pass but if it passes for you,
> wfm.
Yeah, it passed locally. But I'm now going to push everything to try.
| Assignee | ||
Comment 39•10 years ago
|
||
| Assignee | ||
Comment 40•10 years ago
|
||
https://hg.mozilla.org/integration/fx-team/rev/4b30e5c0a1cd51dace28bf9939b8fbd9263de3df
Bug 1157526 - (Part 1) Replace "New tab" toast with snackbar. r=mcomella
https://hg.mozilla.org/integration/fx-team/rev/2cac2e4b0215cd3eb0f2e184b4d5d107a29b5e4a
Bug 1157526 - (Part 2) Replace "New private tab" toast with snackbar. r=mcomella
https://hg.mozilla.org/integration/fx-team/rev/8b14ccf741bbc4f8f7fd1f639c301e82fb3e1fdd
Bug 1157526 - (Part 3) Replace "Image unblocked" toast with snackbar. r=mcomella
https://hg.mozilla.org/integration/fx-team/rev/fa6c456d5640a02966186277402295c58e90e7c9
Bug 1157526 - (Part 4) Replace "Add-on installed" toast with snackbar. r=mcomella
https://hg.mozilla.org/integration/fx-team/rev/a0d08563a76e53b393b81d73538e43e6591b3797
Bug 1157526 - (Part 5) Remove unused toast method. r=mcomella
https://hg.mozilla.org/integration/fx-team/rev/68df6df19968bf7015ace65985e63a577a7d4725
Bug 1157526 - (Part 6) Replace "Already signed in" toast with snackbar. r=mcomella
Comment 41•10 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/4b30e5c0a1cd
https://hg.mozilla.org/mozilla-central/rev/2cac2e4b0215
https://hg.mozilla.org/mozilla-central/rev/8b14ccf741bb
https://hg.mozilla.org/mozilla-central/rev/fa6c456d5640
https://hg.mozilla.org/mozilla-central/rev/a0d08563a76e
https://hg.mozilla.org/mozilla-central/rev/68df6df19968
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 45
Comment 42•10 years ago
|
||
Is it expected that going to the grid view in top sites and long tap on a page and choosing "Open in New Tab" / "Open in Private Tab", will not display a snackbar? If you long tap on a link from news.google.com and choose "Open Link in New Tab" / "Open Link in Private Tab" a snackbar will be displayed.
The same message is displayed on both toasts: "New tab opened | Switch"
| Assignee | ||
Comment 43•10 years ago
|
||
(In reply to Teodora Vermesan (:TeoVermesan) from comment #42)
> Is it expected that going to the grid view in top sites and long tap on a
> page and choosing "Open in New Tab" / "Open in Private Tab", will not
> display a snackbar? If you long tap on a link from news.google.com and
> choose "Open Link in New Tab" / "Open Link in Private Tab" a snackbar will
> be displayed.
> The same message is displayed on both toasts: "New tab opened | Switch"
This has been fixed in bug 1224530. :)
Comment 44•10 years ago
|
||
As far as I can tell, the only docs update needed here is to add a deprecation notice to https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/NativeWindow/toast/show, pointing people at https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/Snackbars.jsm, but please let me know if I am wrong.
Flags: needinfo?(s.kaspari)
| Assignee | ||
Comment 45•10 years ago
|
||
(In reply to Will Bamberg [:wbamberg] from comment #44)
> As far as I can tell, the only docs update needed here is to add a
> deprecation notice to
> https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/
> NativeWindow/toast/show, pointing people at
> https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/
> Snackbars.jsm, but please let me know if I am wrong.
Yeah, that's correct. Alex Johnson did a great job documenting Snackbars.jsm on MDN and adding deprecation warnings.
Flags: needinfo?(s.kaspari)
Comment 46•10 years ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]:
[Suggested wording]: Replace super toasts with snackbar
[Links (documentation, blog post, etc)]:
relnote-firefox:
--- → ?
Comment 47•10 years ago
|
||
Added to the release notes with "Replace super toasts with snackbar" as wording
With a link pointing to http://www.google.com/design/spec/components/snackbars-toasts.html
Updated•5 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
•