Closed Bug 973446 Opened 10 years ago Closed 10 years ago

[settings] refactor B2G improve and feedback panel with AMD pattern

Categories

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

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(feature-b2g:2.0)

RESOLVED FIXED
1.4 S5 (11apr)
feature-b2g 2.0

People

(Reporter: gasolin, Assigned: gduan)

References

Details

Attachments

(1 file)

Overview Description:

Refactor B2G improve & feedback panel with AMD pattern referring to
https://github.com/crh0716/gaia/tree/settings2_iterative

to make it modularize and more easier to maintain

Steps to Reproduce:
1) run make test-perf APP=settings
2) run make test-integration APP=settings


Expected Results:

pass all settings test and act the same as original implementation

Additional Information:
Assignee: nobody → gduan
Attached file PR to master
wip: unit test
Comment on attachment 8395559 [details] [review]
PR to master

Hi Arthur,
could I have your feedback for my refactored panel?
I will write unit test for the module if you think it's ok.
Attachment #8395559 - Flags: feedback?(arthur.chen)
Comment on attachment 8395559 [details] [review]
PR to master

waiting for travis.
Attachment #8395559 - Flags: feedback?(arthur.chen)
Comment on attachment 8395559 [details] [review]
PR to master

Hi Arthur and Fred,
I've updated most of your comments.
Could you help me to check my patch?
Thanks.
Attachment #8395559 - Flags: review?(arthur.chen)
Attachment #8395559 - Flags: feedback?(gasolin)
Status: NEW → ASSIGNED
Comment on attachment 8395559 [details] [review]
PR to master

looks good to me, though based on EJ's patch, a more system instantiate module code style might be better. 

https://github.com/mozilla-b2g/gaia/pull/17354/files#diff-f74aacf51ebc86e4aa88b0e60eb7676bR9
Attachment #8395559 - Flags: feedback?(gasolin) → feedback+
Blocks: 956210
Target Milestone: --- → 1.4 S5 (11apr)
Comment on attachment 8395559 [details] [review]
PR to master

George, thanks for the patch! There are two main problems of the patch:
1. The event handlers are either not added or removed in the right function, or are not removed correctly.
2. The UI should be refreshed in the `onBeforeShow` function instead of the `init` function as the init function is called only once.
Attachment #8395559 - Flags: review?(arthur.chen)
Comment on attachment 8395559 [details] [review]
PR to master

Thanks Arthur,
patch is updated, please kindly check again.
Attachment #8395559 - Flags: review?(arthur.chen)
Comment on attachment 8395559 [details] [review]
PR to master

Great job, George! r=me with the nits addressed, thanks!
Attachment #8395559 - Flags: review?(arthur.chen) → review+
Thanks, nits are fixed and travis is green.
master: https://github.com/mozilla-b2g/gaia/commit/adde0f65383fedc3a6edf3dc5176d51d2998fdfb
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
feature-b2g: --- → 2.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: