[User Story] Expand/Collapse Browser Chrome on Navigation

RESOLVED FIXED in FxOS-S6 (04Sep)

Status

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: benfrancis, Assigned: apastor)

Tracking

({feature})

unspecified
FxOS-S6 (04Sep)
ARM
Gonk (Firefox OS)
feature
Dependency tree / graph

Firefox Tracking Flags

(feature-b2g:2.5+)

Details

(Whiteboard: [systemsfe])

User Story

As a user I want the browser chrome to collapse when I navigate to a pinned site or page, to create more room for the content, and expand again when I exit a pinned site/page.

Attachments

(2 attachments)

(Reporter)

Description

3 years ago
As a user I want the browser chrome to collapse when I navigate to a pinned site or page, to create more room for the content, and expand again when I exit a pinned site/page.

Comment 1

3 years ago
A Pivotal Tracker story has been created for this Bug: https://www.pivotaltracker.com/story/show/95560452
feature-b2g: --- → 2.5+
(Reporter)

Comment 2

3 years ago
Created attachment 8644346 [details]
Expand Browser Chrome on Navigation - Specification
(Assignee)

Updated

3 years ago
Assignee: nobody → apastor
(Assignee)

Updated

3 years ago
Assignee: apastor → nobody
(Reporter)

Updated

3 years ago
Assignee: nobody → bfrancis
(Reporter)

Updated

3 years ago
Target Milestone: --- → FxOS-S6 (04Sep)
(Reporter)

Comment 3

3 years ago
I am probably not going to have time to finish this before I go on PTO.

My idea for implementing this was to keep a map/tree of pinned site scopes in memory indexed by hostname, populated from the pinned sites (bookmarks) store, and kept up to date, so:

scopes = {
  'foo.com': {
    'foo.com/bar': 'http://foo.com/bar/index.html',
    'foo.com/baz': 'http://foo.com/baz/index.html'
   },
  'bar.com': {
    'bar.com': 'http://bar.com/index.html'
  }
}

On every locationchange event we can do a quick lookup of the hostname of the new URL in the map to find out if there are any pinned sites for that hostname.

if (scopes[hostname]) { ... }

If there are then we can do longest-prefix matching on the pinned scopes under that hostname to determine which pinned site (if any) the URL belongs to, identified by the site's start URL. If it belongs to a pinned site then we should collapse and pin the browser chrome, otherwise we should expand and unpin it.

This will then also allow us to look up the pinned site in the pinned sites (bookmarks) store to retrieve any manifest metadata which needs applying to the browser chrome (e.g. name, theme_color, display_mode).
(Reporter)

Updated

3 years ago
Assignee: bfrancis → nobody
(Assignee)

Comment 4

3 years ago
Taking back :)
Assignee: nobody → apastor
Created attachment 8664908 [details] [review]
[gaia] albertopq:1168962-expand-collapse > mozilla-b2g:master
(Assignee)

Comment 6

3 years ago
Comment on attachment 8664908 [details] [review]
[gaia] albertopq:1168962-expand-collapse > mozilla-b2g:master

This patch uses the Bookmarks database to keep an object that will help to know if a site is pinned, when navigating to an specific URL. Etienne, could you please take a look? Thanks!
Attachment #8664908 - Flags: review?(etienne)
Comment on attachment 8664908 [details] [review]
[gaia] albertopq:1168962-expand-collapse > mozilla-b2g:master

Great work!
Made a tiny comment on github, but r+!
Attachment #8664908 - Flags: review?(etienne) → review+
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1202566
(Assignee)

Updated

3 years ago
Duplicate of this bug: 1202562
(Assignee)

Comment 10

3 years ago
master: https://github.com/mozilla-b2g/gaia/commit/c1cccd5e74373c9f93f9505386a70daf3f566ae0
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED

Updated

3 years ago
Depends on: 1209600
You need to log in before you can comment on or make changes to this bug.