Closed Bug 1395841 Opened 8 years ago Closed 8 years ago

implement change for separating “add to home screen” & “add page shortcut”

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), enhancement, P1)

enhancement

Tracking

(firefox58 verified)

VERIFIED FIXED
Firefox 58
Tracking Status
firefox58 --- verified

People

(Reporter: jcheng, Assigned: cnevinchen)

References

Details

(Whiteboard: [FNC][SPT58.3][MVP][pwa-front-end])

Attachments

(2 files, 2 obsolete files)

Change the existing menu -> page -> "add to home screen" to "add page shortcut" Have the Add PWA to homescreen badge to use the name "Add to home screen"
Priority: -- → P1
Whiteboard: [pwa-front-end]
Whiteboard: [pwa-front-end] → [FNC][SPT58.1][MVP][pwa-front-end]
Assignee: nobody → topwu.tw
Comment on attachment 8912620 [details] Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. https://reviewboard.mozilla.org/r/183944/#review189220 ::: mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java:583 (Diff revision 1) > - urlAnnotations.insertHomeScreenShortcut(context.getContentResolver(), aURI, true); > + urlAnnotations.insertHomeScreenShortcut(context.getContentResolver(), aURI, true); > + } > + }); > > // After shortcut is created, show the mobile desktop. > ActivityUtils.goToHomeScreen(context); Should we wait for insertHomeScreenShortcut() to complete and go back to ui thread to do this?
Attachment #8912620 - Flags: review?(cnevinchen) → review+
Comment on attachment 8912619 [details] Bug 1395841 - Part 1: Change page option strings fom 'add to home screen' to 'add page shortcut'. https://reviewboard.mozilla.org/r/183942/#review189222
Attachment #8912619 - Flags: review?(cnevinchen) → review+
(In reply to Nevin Chen [:nechen] from comment #3) > Comment on attachment 8912620 [details] > Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. > > https://reviewboard.mozilla.org/r/183944/#review189220 > > ::: mobile/android/base/java/org/mozilla/gecko/GeckoApplication.java:583 > (Diff revision 1) > > - urlAnnotations.insertHomeScreenShortcut(context.getContentResolver(), aURI, true); > > + urlAnnotations.insertHomeScreenShortcut(context.getContentResolver(), aURI, true); > > + } > > + }); > > > > // After shortcut is created, show the mobile desktop. > > ActivityUtils.goToHomeScreen(context); > > Should we wait for insertHomeScreenShortcut() to complete and go back to ui > thread to do this? Yes you're right, I should use `UIAsyncTask` to wait `insertHomeScreenShortcut()` finished.
Pushed by topwu.tw@gmail.com: https://hg.mozilla.org/integration/autoland/rev/13e001aa0253 Part 1: Change page option strings fom 'add to home screen' to 'add page shortcut'. r=nechen https://hg.mozilla.org/integration/autoland/rev/38571a57eb11 Part 2: Support creating a shortcut from page option in menu. r=nechen
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
These patches conflicted with the ones from bug 1372926 when they got merged together. I think I resolved the conflicts, but it wouldn't hurt to make sure I did it right.
Sorry but I'm going to ask for a backout at this point. Sadly, I think that's the only way to make sure reviewers get the importance of checking for this kind of issues https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Changing_existing_strings
Backed out for altering strings without using new string ids: https://hg.mozilla.org/mozilla-central/rev/02eed89f56e3006140d475855d0d22e742f79ab2
Status: RESOLVED → REOPENED
Flags: needinfo?(topwu.tw)
Resolution: FIXED → ---
Target Milestone: Firefox 58 → ---
The parts of this bug that did land have removed the ability to add a PWA shortcut. Can we add that back until bug 1379115 lands? It'll be impossible to test standalone PWA mode otherwise.
Flags: needinfo?(wehuang)
I backed this out for now, it looks like it got a little busted in the merge per comment #10 anyway.
Backout by jwillcox@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/4d4e89492b76 Back out - Part 2 for breaking PWA shortcut installation r=me
Flags: needinfo?(wehuang)
Whiteboard: [FNC][SPT58.1][MVP][pwa-front-end] → [pwa-front-end]
we can land this now
Flags: needinfo?(cnevinchen)
I can't reopen this bug. I'll try to assign to myself and see if it works.
Assignee: topwu.tw → cnevinchen
No luck.. :( Hi Jing Wei. Could you please help re-land this patch again?
(In reply to Nevin Chen [:nechen] from comment #19) > Could you please help re-land this patch again? Please don't… It was backed out for a reason (comment 11 and comment 12), and that was never addressed.
Can I reopen this bug and submit a new patch?
(In reply to Nevin Chen [:nechen] from comment #22) > Can I reopen this bug and submit a new patch? The bug is already "reopened", no blocker on submitting a new patch. I assumed you were asking to re-land the same patch.
Whiteboard: [pwa-front-end] → [FNC][SPT58.3][MVP][pwa-front-end]
Nevin, Andreas would really like this done this week. Are you able to do this? Would you like help?
doing it.
Flags: needinfo?(cnevinchen)
Comment on attachment 8919964 [details] Bug 1395841 - Part 1: Change page option strings fom 'add to home screen' to 'add page shortcut'. https://reviewboard.mozilla.org/r/190910/#review196428
Attachment #8919964 - Flags: review?(snorp) → review+
Comment on attachment 8919965 [details] Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. https://reviewboard.mozilla.org/r/190912/#review196434 ::: mobile/android/base/java/org/mozilla/gecko/promotion/HomeScreenPrompt.java:123 (Diff revision 2) > > private void addToHomeScreen() { > ThreadUtils.postToBackgroundThread(new Runnable() { > @Override > public void run() { > - GeckoApplication.createShortcut(title, url); > + GeckoApplication.createBrowserShortcut(title, url); This will break manifest-enabled shortcuts, no?
Attachment #8919965 - Flags: review?(snorp) → review-
Comment on attachment 8919965 [details] Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. https://reviewboard.mozilla.org/r/190912/#review196518 I guess this is ok to land if you fix the one problem.
Attachment #8919965 - Flags: review- → review+
(In reply to James Willcox (:snorp) (jwillcox@mozilla.com) from comment #31) > Comment on attachment 8919965 [details] > Bug 1395841 - Part 2: Support creating a shortcut from page option in menu. > > https://reviewboard.mozilla.org/r/190912/#review196434 > > ::: > mobile/android/base/java/org/mozilla/gecko/promotion/HomeScreenPrompt.java: > 123 > (Diff revision 2) > > > > private void addToHomeScreen() { > > ThreadUtils.postToBackgroundThread(new Runnable() { > > @Override > > public void run() { > > - GeckoApplication.createShortcut(title, url); > > + GeckoApplication.createBrowserShortcut(title, url); > > This will break manifest-enabled shortcuts, no? We don't create manifest-enabled shortcuts in HomeScreenPrompt. This is because the only place to add PWA shortcut is through the badge. Hi Joe, Mark Please help confirm if my understanding is correct.
Flags: needinfo?(mliang)
Flags: needinfo?(jcheng)
I have the same understanding as you Nevin.
Flags: needinfo?(jcheng)
Since Mark is on PTO, and this is uregent. I'll land this as is. I'll submit another patch if the requirement changes.
Flags: needinfo?(topwu.tw)
Flags: needinfo?(mliang)
Attachment #8912619 - Attachment is obsolete: true
Attachment #8912620 - Attachment is obsolete: true
Pushed by nechen@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/e12e4ab70862 Part 1: Change page option strings fom 'add to home screen' to 'add page shortcut'. r=snorp https://hg.mozilla.org/integration/autoland/rev/8bfc3d92c6ef Part 2: Support creating a shortcut from page option in menu. r=snorp
Status: REOPENED → RESOLVED
Closed: 8 years ago8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 58
Verified that the distinction between add to home screen and add page shortcut is working as described.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: