Closed Bug 1163501 Opened 9 years ago Closed 9 years ago

[Stingray] Dashboard app folder and template

Categories

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

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: yifan, Assigned: yifan)

References

Details

(Whiteboard: [ft:conndevices])

Attachments

(2 files)

Initialize Dashboard app folder and template.
Attached patch 1163501.patchSplinter Review
Scaffolding following the style in smart-home. Would like to get your feedback on what needs to be changed and what's missing. Thanks!
Attachment #8604547 - Flags: feedback?(rexboy)
Attachment #8604547 - Flags: feedback?(im)
Comment on attachment 8604547 [details] [diff] [review]
1163501.patch

Review of attachment 8604547 [details] [diff] [review]:
-----------------------------------------------------------------

::: tv_apps/dashboard/js/dashboard.js
@@ +5,5 @@
> +  // demo only
> +  var main = document.getElementById('main-section');
> +  main.focus();
> +  document.body.addEventListener('keydown', function (e) {
> +    states[current].onkeydown(e);

Have you tried shared/js/smart-screen/key_navigation_adapter.js?

we may need to listen to onbeforekeydown instead since keydown event doesn't propagate to parent browser frame.
Attachment #8604547 - Flags: feedback?(rexboy)
Comment on attachment 8604547 [details] [diff] [review]
1163501.patch

Review of attachment 8604547 [details] [diff] [review]:
-----------------------------------------------------------------

::: tv_apps/dashboard/js/dashboard.js
@@ +13,5 @@
> +  var states = {
> +    center: {
> +      onkeydown: function (e) {
> +        switch (e.keyCode) {
> +          case 38:

Please use KeyEvent.DOM_VK_LEFT, KeyEvent.DOM_VK_RIGHT, KeyEvent.DOM_VK_UP, KeyEvent.DOM_VK_DOWN instead of the number.

@@ +14,5 @@
> +    center: {
> +      onkeydown: function (e) {
> +        switch (e.keyCode) {
> +          case 38:
> +            current = 'top';

Do we really need to update the variable current? We may check the class list of main section to know the current panel.
Attachment #8604547 - Flags: feedback?(im)
Please add unit tests and integration tests. Thanks.
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

* Use KeyNavigationAdapter for arrow key events.
* Add unit and integration tests.
Attachment #8605669 - Flags: review?(rexboy)
Attachment #8605669 - Flags: review?(im)
Assignee: nobody → yliao
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

Looks good to me. Please remove the APP_URL and app loading since they are useless.
Attachment #8605669 - Flags: review?(im) → review+
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

sorry. wrong test result.
Attachment #8605669 - Flags: review+ → review-
Depends on: 1165160
Looks good to me, but please confirm the key behavior with UX. (opposite direction key or same direction key to shrink widget)
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

Thanks! Confirmed with UX and fixed integration test. Please see if there's anything needed.
Attachment #8605669 - Flags: review?(rexboy)
Attachment #8605669 - Flags: review?(im)
Attachment #8605669 - Flags: review-
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

looks good to me.
Attachment #8605669 - Flags: review?(im) → review+
Comment on attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master

Looks good to me. thanks!
Attachment #8605669 - Flags: review?(rexboy) → review+
Keywords: checkin-needed
https://github.com/mozilla-b2g/gaia/pull/30060

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.
Trying again due to tree closures. Sorry about the spam here.
Keywords: checkin-needed
Status: NEW → RESOLVED
Closed: 9 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: