Closed Bug 1050164 Opened 10 years ago Closed 10 years ago

Investigate to implement standalone shrinking library

Categories

(Firefox OS Graveyard :: NFC, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: alive, Assigned: gduan)

References

Details

Attachments

(1 file, 1 obsolete file)

Now we are moving shrinking ui to app and it's better to have a shared library for app to use.

Proposed API of the library:
var ShrinkingUI = function(backgroundElement, foregroundElement) {
  // Do styling stuff...
};

new ShrinkingUI(document.body.parentNode, document.body); // in app
new ShrinkingUI(document.getElement('windows'), appWindow.element); // in system app

We need to investigate and give a try.
The possible migration is using this library in system app at first,
and find an app to try it later.
Please put this bug in your pocket. I expect it's toward 2.2
Flags: needinfo?(gduan)
Assignee: nobody → gduan
Flags: needinfo?(gduan)
Attached file PR to master (obsolete) —
Hi Alive,
could I have your feedback on this patch?

Currently, it can only support shrinkingUI.setElements(<tilting target>, <body>), since we have to append a "tip" in the same level of foregroundElement without tilting effect.
Attachment #8486220 - Flags: feedback?(alive)
Comment on attachment 8486220 [details] [review]
PR to master

1. I hope we have a submodule in appWindowManager to invoke ShrinkingUI instead of in NfcManager.
2. IMO ShrinkingUI should provide some animation related function instead of using event dispatching, for example,

var s = new ShrinkingUI(elementA, elementB);
ShrinkingUI.start(); >> Means start animation
ShrinkingUI.stop();  >> Means stop the animation and back

Let's discuss this f2f today.
Attachment #8486220 - Flags: feedback?(alive) → feedback?(gweng)
Comment on attachment 8486220 [details] [review]
PR to master

Looks okay except the 'isOnRealDevice'. I think if the orientation doesn't work on simulator this definitely deserves a new platform Bug.

And I've seen some code in NFC manage changed. Do you bring them in because of rebasing?

Of course it need a new test, or modifying the existing test to become a patch.
Attachment #8486220 - Flags: feedback?(gweng)
Attached file PR to master
Hi Alive and Greg,
could I have your feedback for this patch?
Attachment #8486220 - Attachment is obsolete: true
Attachment #8512474 - Flags: feedback?(gweng)
Attachment #8512474 - Flags: feedback?(alive)
Comment on attachment 8512474 [details] [review]
PR to master

Looks fine but of course need module owner's opinions.
Attachment #8512474 - Flags: feedback?(gweng) → feedback+
Comment on attachment 8512474 [details] [review]
PR to master

See github comments
Attachment #8512474 - Flags: feedback?(alive) → feedback+
Comment on attachment 8512474 [details] [review]
PR to master

Hi Alive,
I've addressed your suggestions and add tests. could you check it? Thanks.
Attachment #8512474 - Flags: review?(alive)
Comment on attachment 8512474 [details] [review]
PR to master

Well done
Attachment #8512474 - Flags: review?(alive) → review+
Thanks! 
master: https://github.com/mozilla-b2g/gaia/commit/aea7c7550345e5d2e11f880802a1b3eb0700aaae
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: