-
Notifications
You must be signed in to change notification settings - Fork 43
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
Feature/Restructuring OnResetTimeout #164
Conversation
fe9e0bc
to
a142fc3
Compare
a142fc3
to
a1532d9
Compare
app/model/sdl/Abstract/Model.js
Outdated
SDL.SDLController.vrInteractionResponse( | ||
SDL.SDLModel.data.resultCode['TIMED_OUT'] | ||
); | ||
// SDL.ResetTimeoutPopUp.resetTimeoutRPCs.removeObject('VR.PerformInteraction'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please remove commented code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSolonenko Fixed in commit a8caa0a
self.deactivate('TIMED_OUT'); | ||
}, this.timeout | ||
SDL.InteractionChoicesView.deactivate('TIMED_OUT'); | ||
// SDL.SDLAbstractView.deactivate(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please remove commented code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSolonenko Fixed in commit a8caa0a
margin: 10px; | ||
background-color: black; | ||
} | ||
#ResetTimeoutPopUp .contextView .list { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please add white space.
position: relative; | ||
text-shadow: 1px 1px 2px black, 0 0 6px rgba(255, 0, 0, 0.51), 0 13px 10px black; | ||
} | ||
#ResetTimeoutPopUp .contextView .list .component { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please add white space.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BSolonenko Fixed in commit a8caa0a
app/model/sdl/Abstract/Model.js
Outdated
setTimeout(function() { | ||
if (SDL.SDLModel.data.vrActiveRequests.vrPerformInteraction) { // If VR PerformInteraction session is still active | ||
SDL.SDLModel.onPrompt(message.params.timeoutPrompt); | ||
SDL.ResetTimeoutPopUp.timeoutSeconds['VR.PerformInteraction'] = | ||
(message.params.timeout -(message.params.timeout - 2000))/1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov why do you need -2000? Please move these magic numbers to a named constants
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
|
||
}, | ||
|
||
setTimerTTS: function(time){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov add description
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
}, self.ttsTimeout | ||
); | ||
}, | ||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov add space between functions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
app/view/sdl/ResetTimeoutPopUp.js
Outdated
disableScrollbar: true, | ||
value: true, | ||
|
||
/** Items */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov remove this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
contentBinding: 'parentView.timeoutString' | ||
}), | ||
|
||
player: SDL.AudioPlayer.create(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov why do you need player in this prompt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
app/view/sdl/ResetTimeoutPopUp.js
Outdated
/** | ||
* resetTimeoutMoreThenOne function for reset timeout if RPC more then one | ||
*/ | ||
resetTimeoutMoreThenOne: function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov resetMoreThanOneTimeout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
app/view/sdl/ResetTimeoutPopUp.js
Outdated
if(null !== element){ | ||
if(element.checked) { | ||
reset(); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please rework this condition to get something like:
if (...) {
reset()
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
app/view/sdl/ResetTimeoutPopUp.js
Outdated
var method = self.resetTimeoutRPCs[0]; | ||
element = document.getElementById(method + 'checkBoxSend'); | ||
|
||
if(null !== element) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov please rework this condition for something like:
if (...) {
DeactivatePopUp(method);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
app/view/sdl/shared/sliderView.js
Outdated
@@ -82,34 +82,39 @@ SDL.SliderView = SDL.SDLAbstractView.create( | |||
SDL.SDLModel.data.resultCode.SUCCESS, this.get('sliderRequestId'), | |||
this.get('adjustControl.sliderValue.value') | |||
); | |||
} else { | |||
} else if(timeout === null) {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov use negative condition like else if (timeout !== null) {
and remove redundant else if
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
SDL.ResetTimeoutPopUp.set('timeoutSeconds', | ||
{'UI.Alert': request.params.duration/1000, | ||
'TTS.Speak': request.params.duration/1000}); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ValeriiMalkov remove extra space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft Fixed in commit a8caa0a
a8caa0a
to
aa209e1
Compare
aa209e1
to
0e141d3
Compare
2f5002d
to
6993304
Compare
6993304
to
f488770
Compare
The ability to send OnResetTimeout for RPS with different interfaces has been added.
Fix OnResetTimeout logic for next RPC: - Alert - Slider - ScrollableMessage - Speak - PerformInteraction Also answer to review
f488770
to
f2b7d7e
Compare
Implements #2422
This PR is ready for review.
Summary
Implementation of ResetTimeout
CLA