Closed Bug 2028030 Opened 7 months ago Closed 7 months ago

Support browser back (in toolbar and menu) for stories opened from the home screen

Categories

(Firefox for Android :: Toolbar, enhancement)

All
Android
enhancement

Tracking

()

VERIFIED FIXED
152 Branch
Tracking Status
firefox152 --- verified

People

(Reporter: petru, Assigned: petru)

References

Details

(Whiteboard: [fxdroid][group3])

Attachments

(2 external files)

Use SessionState.Source as the marker for when a tab has been started for a home screen story.
Based on this marker we should know to:

  • enable the back buttons in the toolbar and the menu
  • when these back buttons^^ are pressed: get the user back to the specific story on the homescreen.

While working on this I saw an ugly edgecase with HNT enabled:
In a tab already opened for a specific usecase - with parentId, source etc users can type about:home then go to stories and load a new story in an existing tab, on top of 10 other tab history entries. So we should not update the tab parentId or source or any such properties.
And even if the user typed about:home and then loaded a new story we cannot let them go back to home from a story - we want to get them back to the stories page of the homescreen.

So I’m now leaning towards adding our own internal UTM parameter to the stories URLs and use this to know that pressing back while on an URL with that UTM parameter should bring the user back to the stories’ page.

Checked with Jonathan about this and he also supports relying on an UTM parameter.

John Hall recommends having this functionality only until the application is restarted.

Attachment #9563581 - Attachment description: WIP: Bug 2028030 - part 1 - Use a custom UTM parameter to know if an url was opened from home → Bug 2028030 - part 1 - Use a custom UTM parameter to know if an url was opened from home r=#android-reviewers
Attachment #9563582 - Attachment description: WIP: Bug 2028030 - part 2 - Persist internally set UTM params in case of redirect → Bug 2028030 - part 2 - Persist internally set UTM params in case of redirect r=#android-reviewers
Pushed by plingurar@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/d2094eb5d36d https://hg.mozilla.org/integration/autoland/rev/55497e4d70be part 1 - Use a custom UTM parameter to know if an url was opened from home r=android-reviewers,jonalmeida https://github.com/mozilla-firefox/firefox/commit/73ffd39148b1 https://hg.mozilla.org/integration/autoland/rev/aa76abbfe951 part 2 - Persist internally set UTM params in case of redirect r=android-reviewers,jonalmeida
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 152 Branch
Flags: qe-verify+

Verified as implemented on the latest Firefox for Android Nightly 152.0a1 from 4/24 with a Samsung Galaxy S24 (Android 16), and a Pixel tablet (Android 16).
After a story has been opened in a new tab, tapping back, or performing the back gesture, returns the user to the "News" page, on the same scrolling position the user has left the "News" page.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 2081606
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: