User Story
I want to easily go back to websites I regularly visit in Focus (without ads)
As a Focus user, I want to easily frequent my favorite website so that I don't have to type in the full-length, same, URL each time
Tasks
@brampitoyo @antlam Do you think this should be an additional menu item? Should we just add the icon to the home screen (like Fennec) does or do we need additional UI to let the user modify the name (like Chrome does)?
For reference: This is the dialog Chrome shows.

For V1, let's keep the additional UI out of it.
We still want some sort of confirmation UI though!
We still want some sort of confirmation UI though!
I was thinking about using the approach we implemented for the "add to home screen" promotion in Fennec: Switching to the home screen - where the user will see the icon appear.
For V1, let's keep the additional UI out of it.
I'm okay with that. But note that we have been using the page's title in Fennec and sometime this is not the best title for a launcher icon.
From my meeting with @pocmo:
Messaging this will be important. It might also be an opportunity to try some stuff and figure out what options we have. For example, "save", "download", "install"?
@mheubusch thoughts?
Adding @antlam because you鈥檝e been meeting with @pocmo about this.
iOS issue: https://github.com/mozilla-mobile/focus-ios/issues/124
Note: language here is still undecided (Save, Add, etc)
Recent user story proposal:
As a Focus user, I want to easily frequent my favorite website so that I don't have to type in the full-length, same, URL each time.

Essentially what we're talking about ^ (another menu item)
@pocmo if engineering effort isn't too great, a dialog like what you've shown up there actually starts to make a lot of sense because it helps drive home the messaging and also serves as a confirmation step.
@antlam I landed the first part of this. There's now a menu item and it will add a home screen icon on Android <= 7 (on Android O it doesn't work yet). @ekager is taking this over. For the dialog UI - should we copy what Chrome does or is there anything we should do differently?
@pocmo awesome! I was playing with it over the weekend.
Let's start with the pattern we're seeing in Chrome and then improve from there.
I manged to land this without the code to build the actual VIEW intent: Currently shortcuts only open the app and not load a page 馃檭
https://github.com/mozilla-mobile/focus-android/blob/master/app/src/main/java/org/mozilla/focus/shortcut/HomeScreen.java#L68
@antlam you want the dialog to look like Chrome style? With the white background?
@ekager that's what I was imagining.
But since we've adopted a dark theme everywhere else, would it be easier to carry this through here? I think that would look good too!
@antlam this is what I currently have with the dark theme. It also sets the cursor at the end of the text and pulls up the keyboard automatically to save the user an extra click. Once I get the copy I can easily switch out the button text. Let me know what other changes you would like to see! :)

Leaving a comment here, we've been polishing and finalizing this UX on Slack. New icon PR incoming.
For the strings,
the label on the menu - Add to Home screen (cap H, lowercase s)
the label for the dialog - Add to Home screen (or Add shortcut to Home screen if there is any reason to think users won't recognize this pattern and need the help)
for the buttons, CANCEL and OK are fine (though ADD might be better)
Do we need a confirmation message? Or is that replaced by the suggestion to switch to Home and show the shortcut?
I don't think we need a confirmation message. The icon shows up on the Home screen and animates in as well.
@ekager I added three new strings to the repo and export: dialog_addtohomescreen_title, dialog_addtohomescreen_action_add, dialog_addtohomescreen_action_cancel. We already had one for the menu item: menu_add_to_home_screen. I just updated the text.
Definitely too late for this release, but I'd love to see what wording does to the usage of this feature, i.e. if we were to change it. to "Save to Homescreen" or "Bookmark to Homescreen".....thinking "Switchboard" here
@pocmo @ekager I was wondering, should the homescreen icon also remember the state of 'Trackers Blocked' switch? (if the user frequents the site that needs TP turned off)
@npark-mozilla Not a requirement for this version. But you could file a new issue for this. :)
Good catch to watch out for in the future.
@pocmo I'm investigating Focus code at the moment and thinking about HomeScreen class. It has different implementations for android API < 26 and 26+. Version for Android prior to Nougat operates with deprecated intent directly. But ShortcutManagerCompat support library implementation already exists. Are there any reasons Focus doesn't use this?
@Bringoff We have a slightly different behavior (On Android < 26 we switch to the home screen after creating the shortcut). But apart from that no there's no reason. We could switch to ShortcutManagerCompat - If you want to do it file an issue and open a PR. :)
Suggested as feature request at here:
https://github.com/mozilla-mobile/focus-android/issues/1487
This doesn't quite fit under this, but kind of still does. Could there be also possibility to add "quick selection" icon of web page to start screen? It might be just me, but I feel it clumsy to open browser, then if you decide to go at some website you already have at home screen (or folder at heme screen), you have to switch browser to background or close it. Then looking the right shortcut from home screen...
I personally would love an option to add 9 quick selection icons at start screen and maybe side swipe for have 9 more (with dots at bottom to show how many and which page you ar at the moment). What do you think?
@huuhaa Please file a new issue for that! Thank you!
Most helpful comment
@antlam I landed the first part of this. There's now a menu item and it will add a home screen icon on Android <= 7 (on Android O it doesn't work yet). @ekager is taking this over. For the dialog UI - should we copy what Chrome does or is there anything we should do differently?