Closed
Bug 1234148
Opened 9 years ago
Closed 8 years ago
Replace toasts in JS modules with snackbars
Categories
(Firefox for Android Graveyard :: General, defect)
Tracking
(firefox46 fixed)
RESOLVED
FIXED
Firefox 46
Tracking | Status | |
---|---|---|
firefox46 | --- | fixed |
People
(Reporter: sebastian, Assigned: alex_johnson, Mentored)
References
Details
(Whiteboard: [lang=js][good next bug])
Attachments
(1 file)
I just saw that we still create toasts in some JS modules: https://dxr.mozilla.org/mozilla-central/search?q=toast.show+path%3A.js&redirect=false&case=true We already show snackbars here because we delegate all calls to toast.show to show a snackbar instead (Bug 1216051). But we should clean up the code eventually and use Snackbars.jsm directly: https://developer.mozilla.org/en-US/Add-ons/Firefox_for_Android/API/Snackbars.jsm
Reporter | ||
Comment 1•9 years ago
|
||
Alex: Do you want to pick this up? You know Snackbars.jsm and the toast code. :)
Flags: needinfo?(me)
Assignee | ||
Comment 2•9 years ago
|
||
Yeah, I'd love to. :)
Assignee: nobody → me
Status: NEW → ASSIGNED
Flags: needinfo?(me)
Assignee | ||
Comment 3•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/28779/diff/#index_header See other reviews: https://reviewboard.mozilla.org/r/28779/
Attachment #8700665 -
Flags: review?(s.kaspari)
Reporter | ||
Updated•9 years ago
|
Attachment #8700665 -
Flags: review?(s.kaspari) → review+
Reporter | ||
Comment 4•9 years ago
|
||
Comment on attachment 8700665 [details] MozReview Request: Bug 1234148 - Replaced toasts in JS modules with snackbars. r?sebastian https://reviewboard.mozilla.org/r/28779/#review25559 ::: mobile/android/chrome/content/MasterPassword.js:66 (Diff revision 1) > - NativeWindow.toast.show(Strings.browser.GetStringFromName("masterPassword.incorrect"), "short"); > + Snackbars.show(Strings.browser.GetStringFromName("masterPassword.incorrect"), Snackbars.LENGTH_SHORT); This probably is not going to work: I assume this is called from within preferences. But currently we only show snackbars in BrowserApp. However this is not a problem introduced by this patch: The NativeWindow.toast code will try to show a snackbar too. I'll file a follow-up bug where we can see how to handle this problem. ::: mobile/android/chrome/content/aboutLogins.js:30 (Diff revision 1) > function copyStringAndToast(string, notifyString) { NIT: We could update the method name too. ::: mobile/android/modules/DownloadNotifications.jsm:76 (Diff revision 1) > // If this is a new download, show a toast as well. NIT: We could update the comment too.
Assignee | ||
Comment 5•9 years ago
|
||
Comment on attachment 8700665 [details] MozReview Request: Bug 1234148 - Replaced toasts in JS modules with snackbars. r?sebastian Review request updated; see interdiff: https://reviewboard.mozilla.org/r/28779/diff/1-2/
Assignee | ||
Comment 6•9 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=cb199593cf4d
Assignee | ||
Comment 7•9 years ago
|
||
Sebastian, should I set checkin-needed on this, or should I wait for bug 1234295 to land?
Flags: needinfo?(s.kaspari)
Reporter | ||
Comment 8•9 years ago
|
||
Go ahead and land this. bug 1234295 is more or less independent from the changes here.
Flags: needinfo?(s.kaspari)
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Comment 10•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5a814b26505b
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
status-firefox46:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 46
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
•