Closed Bug 1055049 Opened 10 years ago Closed 9 years ago

[Music] modify the dom layout and the page transitions

Categories

(Firefox OS Graveyard :: Gaia::Music, defect)

x86_64
Linux
defect
Not set
normal

Tracking

(b2g-v2.2 unaffected, b2g-master fixed)

RESOLVED FIXED
NGA S1 (29May)
Tracking Status
b2g-v2.2 --- unaffected
b2g-master --- fixed

People

(Reporter: dkuo, Assigned: dkuo)

References

Details

(Whiteboard: [ft:media][NG Gaia Music] [NG Sprint 1 - 5/29])

Attachments

(1 file)

This is the second step for music app refactoring. After we modularized all the views, to be able to add more pages in the future, we have to re-layout the current ui structure and transitions so that music app can be extendable for the upcoming features and new designs.
Blocks: 2.2-music
Assignee: nobody → dkuo
Target Milestone: --- → 2.2 S1 (5dec)
Finalize approach by 11/26 --> Moving implementation target to sprint 2
Whiteboard: [ft:media] [2.2 target]
Target Milestone: 2.2 S1 (5dec) → 2.2 S2 (19dec)
Blocks: 1158246
Blocks: 1161434
Whiteboard: [ft:media] [2.2 target] → [ft:media] [2.2 target] [NG Gaia Music]
Summary: [Music] modify of the dom layout and the page transitions → [Music] modify the dom layout and the page transitions
Whiteboard: [ft:media] [2.2 target] [NG Gaia Music] → [ft:media][NG Gaia Music]
Target Milestone: 2.2 S2 (19dec) → ---
No longer blocks: 2.2-music
In v3 architecture proposal all page transitions should be handled centrally. Hopefully using Navigation Transitions API which :Cwiiis has written a first polyfill for [1].

[1] https://gitlab.com/Cwiiis/gaia-navigator/tree/master (soon moving to gaia-components github org)
Blocks: 1112590
Whiteboard: [ft:media][NG Gaia Music] → [ft:media][NG Gaia Music] [NG Sprint 1 - 5/29]
(In reply to Wilson Page [:wilsonpage] from comment #3)
> In v3 architecture proposal all page transitions should be handled
> centrally. Hopefully using Navigation Transitions API which :Cwiiis has
> written a first polyfill for [1].
> 
> [1] https://gitlab.com/Cwiiis/gaia-navigator/tree/master (soon moving to
> gaia-components github org)

Thanks for the information, Wilson. The goal of this bug is to centralize the navigation transitions in music because, currently we are using css rules on body to control them, which is not extendable and flexible if we want to add more pages/views in the future, or switch to the v3 architecture page transitions api that :Cwiiis is working on. So it's a preparation before using the page transitions api, also we can gain some performance improvement on the master branch.
Update:

I have done the first four views(tiles, list, sublist and player) page transitions, and working on the last view - search view. The search view is more complicated then the others so I need maybe 1-2 more days to get it work.
Comment on attachment 8604054 [details] [review]
[gaia] dominickuo:bug-1055049 > mozilla-b2g:master

Okay, I think I got all the views work in my WIP, though I am still fixing some transition issues and broken tests, also will probably add unit tests for mode_manager.js if I have enough time.

Let's have Jim to have a look on my WIP first, before I wrapped up the whole patch. basically I did:

1. Enhanced Mode Manager so that its capable of:
- Load view js files when they are needed.
- Manage the page/view transitions.
- Remove some workarounds because the dom layout is changed.

2. The page/view transitions are now controlled by |previous|, |current| and |next| classes, instead of applying the mode classes on body.

3. The major dom elements and logic for searching are moved to SearchView, the left search inputs(in TilesView and ListView) became the trigger points to activate the search view only.

(Note that sometime the page/view transitions does not work every time because, to speed up the startup time, we had put hidden attribute on every view before startup, but the first time we load a view, the hidden attribute must be removed or the transition will just display the last frame...I am trying to fix it)
Attachment #8604054 - Flags: feedback?(squibblyflabbetydoo)
Comment on attachment 8604054 [details] [review]
[gaia] dominickuo:bug-1055049 > mozilla-b2g:master

I have done more about this patch:

1. Fixed all the broken unit/integration tests.
2. Add unit tests for mode_manager.js.

I am still fixing the last couple transition issues but I think the patch is 95% done, so set review to Jim first.
Attachment #8604054 - Flags: feedback?(squibblyflabbetydoo) → review?(squibblyflabbetydoo)
Update:

1. Fixed the page/view transitions issue in comment 6, now all the transitions work normally.
2. Lazy load the communications and text normalizer files, I have to do this because the new approach to load the views seems slow down the startup, so need to gain some time to compensate the lost time. But I think I should file one bug to fix the possible performance regression after this landed.

The patch is done anyway :)

(I will list what bugs I have also fixed in next comment)
Blocks: 852539
Blocks: 880186
Blocks: 894800
Blocks: 975300
Blocks: 1039232
Blocks: 1050726
Blocks: 1103796
Blocks: 1160067
Blocks: 1147089
Target Milestone: --- → NGA S1 (29May)
Comment on attachment 8604054 [details] [review]
[gaia] dominickuo:bug-1055049 > mozilla-b2g:master

Wow, this is a huge improvement over how the music app used to work! I have a few minor comments over at GitHub, but this looks really good overall.
Attachment #8604054 - Flags: review?(squibblyflabbetydoo) → review+
Thanks for the review, Jim!
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/pull/30001

Autolander could not land the pull request due to not having collaborator rights. This is possibly due to a tree closure. Please check the tree status and request checkin again once the tree is open.
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
See Also: → 1170149
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: