Closed Bug 1006172 Opened 10 years ago Closed 10 years ago

[User Story] [Home2] Customization of vertical homescreen

Categories

(Firefox OS Graveyard :: Gaia::Homescreen, defect, P1)

x86
macOS
defect

Tracking

(feature-b2g:2.0, b2g-v2.0 fixed)

RESOLVED FIXED
2.0 S3 (6june)
feature-b2g 2.0
Tracking Status
b2g-v2.0 --- fixed

People

(Reporter: kgrandon, Assigned: macajc)

References

Details

(Whiteboard: [p=5],[systemsfe])

User Story

As an operator I want to be able to customize vertical home screen in a similar way as former horizontal home screen

Acceptance criteria:
* Dividers will be used to create sections for grouping icons
* To upgrade from older versions, former concepts of dock, smart collections & pages will be matched to sections as follows:
    icons from dock
    -- divider --
    smart collection icons
    -- divider --
    icons from page 1
    -- divider --
    icons from page 2
* There will be two kind of configurations:
  * Global configuration to be applied always during FTU
  * Local configuration to be applied per MCC/MNC the fist time to insert a SIM card of an operator that is defined in the device
* Being defined depending on the kind of icons:
  * Application icons will have both global & local configurations
  * Smart collection icons will only have global configuration
* If SIM card is inserted after FTU:
  * No installed icon will be moved, both from global configuration or manually installed by a user
  * Icons from local customization will be added to homescreen in a new section at the end
* After finishing customization, storage of local icons for other operators will be cleaned to save space
* Replacing or removing SIM card later on will imply no change in homescreen customization
* After a factory reset, homescreen customization will follow same process as a brand new device

Attachments

(1 file)

We need a flexible build script for the vertical homescreen which will handle the default positions for icons, dividers, and smart collections when we have them. Currently we parse mozApps and BookmarksDatabase if we have no local indexedDB, and just save results in the order that we get them. We need to do something closer to the current homescreen where we can specify the position and page of each icon. I think in the end there will be the following item types:

- Application
- Bookmark
- Divider
- Smart Collection

We had talked about re-using the same build scripts from the current homescreen, but the concept of dividers does not translate over easily. Perhaps there is some room for some code and utilities to go into the shared/ folder though.

I'm unfortunately not too happy with the current code to populate the initial indexedDB, so we may want to rewrite it. It was a rush job for the user test. Here are some files of interest.

Application source, imports applications from mozApps and listens to install/uninstall events: https://github.com/mozilla-b2g/gaia/blob/e3bf21177e0a993d97c460317c2bb632fcdae3f9/dev_apps/home2/js/sources/application.js

Bookmark source, imports bookmarks from BookmarksDatabase and listens to events: https://github.com/mozilla-b2g/gaia/blob/e3bf21177e0a993d97c460317c2bb632fcdae3f9/dev_apps/home2/js/sources/bookmark.js

Item store, where we load/save data from: https://github.com/mozilla-b2g/gaia/blob/e3bf21177e0a993d97c460317c2bb632fcdae3f9/dev_apps/home2/js/stores/item.js

And this is where the ItemStore picks up items if the database is empty: https://github.com/mozilla-b2g/gaia/blob/e3bf21177e0a993d97c460317c2bb632fcdae3f9/dev_apps/home2/js/stores/item.js#L51

The detail property of each object is what we essentially use as a write/read protocol to spin up/save grid objects: https://github.com/mozilla-b2g/gaia/blob/e3bf21177e0a993d97c460317c2bb632fcdae3f9/dev_apps/home2/js/grid/icon.js#L18
I have just re-read the wireframes and they are not very detailed yet about grid customization and the equivalence with old homescreen. But, if I understood well, I think we can match some concepts from old homescreen:

  * Dividers are used to group applications, so in some way they are similar to old horizontally switching screens
  * My favorites would be at the very beginning, so apps until first divider could be like old dock

With this equivalence it would be possible to switch between old and new homescreens, keeping most of the grid configuration

What do you think?
Flags: needinfo?(fdjabri)
It would be possible to use the same initial data to import into the vertical homescreen, but we're not going to be able to have code that maintains grid state across the application. So while a user might be able to switch between the two and have some similarity between groups and pages, this would not last if they started installing apps or moving icons around.

I don't have a preference as to whether or not we try to use the same data as the existing homescreen, or create a new format for it. I think UX had some concerns that pages might not map exactly to sections though.
feature-b2g: --- → 2.0
Rewritten as a draft user story, so we can start implementation while details are discussed
User Story: (updated)
Summary: [Home2] Build customization scripts → [User Story] [Home2] Customization of vertical homescreen
Assignee: nobody → cjc
Target Milestone: 2.0 S1 (9may) → 2.0 S2 (23may)
Rewritten user story to take into account we will only have vertical homescreen (no way to go back to former horizontal homescreen), and also adding details about customization procedure (doing the best to match behavior of former horizontal homescreen)
User Story: (updated)
Flags: in-moztrap?(jlorenzo)
QA Contact: rafael.marquez
Flags: in-moztrap?(jlorenzo) → in-moztrap?(rafael.marquez)
Assigning to Rafael from TEF to own customization of vertical homescreen testing.
Priority: -- → P1
Target Milestone: 2.0 S2 (23may) → 2.0 S3 (6june)
Attachment #8429581 - Attachment description: WIP - v1 → Add initial configuration processing to vertical homescreen
Passing this on to Jacqueline if any UX input is needed.
Flags: needinfo?(fdjabri) → needinfo?(jsavory)
Depends on: 1016928
Comment on attachment 8429581 [details] [review]
Add initial configuration processing to vertical homescreen

Hey Carmen, this is looking really good! I left a few nitpicks on github, nothing that would block the review though.

I have not yet tested on a device - can you provide me a copy of init.json that you used? Or should I wait for bug 1016928 to be done? In any case, I don't think we should have a final R+ until we have the system in place to generate init.json, or alternatively we could check in a hard-coded one with this patch if you prefer to land earlier.
Attachment #8429581 - Flags: review?(kgrandon)
No UX feedback required at this moment, as it was discussed offline
Flags: needinfo?(jsavory)
Attachment #8429581 - Flags: review?(kgrandon)
Comment on attachment 8429581 [details] [review]
Add initial configuration processing to vertical homescreen

I've done a bunch of testing and I haven't found anything obviously broken. my only complaint is that I think we should have a different store class for SvApps Vs Items, with the logic split appropriately between two different files. In this case we would need a third db.js file to handle upgrading, etc. If you are feeling adventurous you can do this now, or I can handle in a follow-up.

Please feel free to rebase and land. There are some conflicts, but they should not be too bad to resolve. Thanks for your hard work on this!
Attachment #8429581 - Flags: review?(kgrandon) → review+
https://github.com/mozilla-b2g/gaia/commit/e33061348a5134923252a8bddc835000e4fcfa9c
r=kgrandon
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Mass modify - set status-b2g-v2.0 fixed for fixed bugs under vertical homescreen dependency tree.
Updated acceptance criteria to match final implementation
User Story: (updated)
Flags: in-moztrap?(rafael.marquez)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: