Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/doesnt wait timeout on button reset timeout pressed during subtlealert #632

Conversation

ValeriiMalkov
Copy link
Contributor

Implements/Fixes #631

This PR is ready for review.

Testing Plan

Manual testing

Summary

Added check that the click event was triggered over ResetTimeoutPopUp and over ResetTimeoutButton to the SubleAlertPopUp in click method.

CLA

ValeriiMalkov and others added 2 commits October 8, 2021 12:53
…n_button_reset_timeout_pressed_during_subtlealert

Fixed regression issue: HMI does not wait timeout on button Reset timeout pressed during SubtleAlert processing
@ValeriiMalkov
Copy link
Contributor Author

Hi @theresalech ! This is a regression issue and ready for Livio team review.

@iCollin
Copy link
Collaborator

iCollin commented Oct 8, 2021

I think doing something like this might be better than a string compare on multiple class names for the reset timeout popup:

diff --git a/app/view/sdl/SubtleAlertPopUp.js b/app/view/sdl/SubtleAlertPopUp.js
index a0a0314..e47ff69 100644
--- a/app/view/sdl/SubtleAlertPopUp.js
+++ b/app/view/sdl/SubtleAlertPopUp.js
@@ -70,7 +70,8 @@ SDL.SubtleAlertPopUp = Em.ContainerView.create(
                 this.deactivate();
                 SDL.SDLController.onActivateSDLApp({ appID: SDL.SubtleAlertPopUp.appID });
                 SDL.SDLController.onSubtleAlertPressed(SDL.SubtleAlertPopUp.appID);
-            } else{
+            } else if (!document.getElementById('right_view').contains(event.target)
+            && !document.getElementById('ResetTimeoutPopUp').contains(event.target)) {
                 SDL.SubtleAlertPopUp.deactivate();
             }
         },

Also we should exempt the right_view too so that buttons can be pressed while an alert is active.

@ValeriiMalkov
Copy link
Contributor Author

I think doing something like this might be better than a string compare on multiple class names for the reset timeout popup:

diff --git a/app/view/sdl/SubtleAlertPopUp.js b/app/view/sdl/SubtleAlertPopUp.js
index a0a0314..e47ff69 100644
--- a/app/view/sdl/SubtleAlertPopUp.js
+++ b/app/view/sdl/SubtleAlertPopUp.js
@@ -70,7 +70,8 @@ SDL.SubtleAlertPopUp = Em.ContainerView.create(
                 this.deactivate();
                 SDL.SDLController.onActivateSDLApp({ appID: SDL.SubtleAlertPopUp.appID });
                 SDL.SDLController.onSubtleAlertPressed(SDL.SubtleAlertPopUp.appID);
-            } else{
+            } else if (!document.getElementById('right_view').contains(event.target)
+            && !document.getElementById('ResetTimeoutPopUp').contains(event.target)) {
                 SDL.SubtleAlertPopUp.deactivate();
             }
         },

Also we should exempt the right_view too so that buttons can be pressed while an alert is active.

@iCollin Implemented in commit c2477c3

@iCollin iCollin merged commit 4d7c0b5 into smartdevicelink:release/5.6.0 Oct 12, 2021
@LitvinenkoIra LitvinenkoIra deleted the fix/doesnt_wait_timeout_on_button_reset_timeout_pressed_during_subtlealert branch October 12, 2021 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants