-
-
Notifications
You must be signed in to change notification settings - Fork 213
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
[B5] auto-logout popup #34589
[B5] auto-logout popup #34589
Conversation
|
||
{% if use_bootstrap5 %} |
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.
@biyeun FYI I think the migration tool should have picked this up (and tried to split this file), but I realize you split most of hqwebapp a while ago and the tool has been updated significantly since then.
|
||
const hideModal = function ($element) { | ||
if ($element.length) { | ||
bootstrap.Modal.getOrCreateInstance($element).hide(); |
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.
Seems odd to create the modal to just hide it. But I guess there is no getOrIgnore
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.
Yeah, I was just doing line-for-line replacements, but this does read funny. I added da5fe58 to keep track of the bootstrap modals, rather than getOrCreate-ing them every time they're needed.
@@ -159,7 +159,8 @@ hqDefine('hqwebapp/js/bootstrap5/inactivity', [ | |||
selectedAppId = urlParams.appId; | |||
} | |||
} catch (error) { | |||
return; | |||
// This will fail on the web apps home page, where the URL fragment is #apps | |||
selectedAppId = 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.
I am not sure I understand the comment. Will the null
cause the failure?
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.
yeah that's confusing - 6e436ff
This changes existing behavior based on feedback from QA. The new version modal now supersedes the warning modal. The new version modal is only shown after HQ is pinged to see if the user is still logged in, which means the warning modal will always already be showing. So the new logic is to hide the warning modal if we get a signal to show the new version modal.
Added a couple of commits for qabugs, requesting re-review. |
Safety Assurance
Safety story
The changes here are simple, but bugs in this functionality are highly visible, security-related, and highly annoying for users, so I'm going to send this through QA.
Automated test coverage
not really
QA Plan
https://dimagi.atlassian.net/browse/QA-6514
Rollback instructions
Labels & Review