[Stingray] Dashboard app folder and template

RESOLVED FIXED

Status

Firefox OS
Gaia::TV
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: yifan, Assigned: yifan)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [ft:conndevices])

Attachments

(2 attachments)

(Assignee)

Description

3 years ago
Initialize Dashboard app folder and template.
(Assignee)

Comment 1

3 years ago
Created attachment 8604547 [details] [diff] [review]
1163501.patch

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.
Created attachment 8605669 [details] [review]
[gaia] begeeben:1163501_dashboard_app_folder > mozilla-b2g:master
(Assignee)

Comment 6

3 years ago
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)

Updated

3 years ago
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-
(Assignee)

Updated

3 years ago
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)
(Assignee)

Comment 10

3 years ago
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+
(Assignee)

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
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

Updated

3 years ago
Keywords: checkin-needed

Updated

3 years ago
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.