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

[B5] auto-logout popup #34589

Merged
merged 17 commits into from May 27, 2024
Merged

[B5] auto-logout popup #34589

merged 17 commits into from May 27, 2024

Conversation

orangejenny
Copy link
Contributor

@orangejenny orangejenny commented May 9, 2024

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

  • This PR can be reverted after deploy with no further considerations

Labels & Review

  • Risk label is set correctly
  • The set of people pinged as reviewers is appropriate for the level of risk of the change

@orangejenny orangejenny added awaiting QA QA in progress. Do not merge product/all-users-all-environments Change impacts all users on all environments labels May 9, 2024
@orangejenny orangejenny requested review from a team May 9, 2024 14:52
@orangejenny orangejenny requested a review from biyeun as a code owner May 9, 2024 14:52
@orangejenny orangejenny requested review from MartinRiese, minhaminha and nospame and removed request for a team May 9, 2024 14:52

{% if use_bootstrap5 %}
Copy link
Contributor Author

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();
Copy link
Contributor

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.

Copy link
Contributor Author

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;
Copy link
Contributor

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?

Copy link
Contributor Author

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.
@orangejenny
Copy link
Contributor Author

Added a couple of commits for qabugs, requesting re-review.

@orangejenny orangejenny added QA Passed and removed awaiting QA QA in progress. Do not merge labels May 27, 2024
@orangejenny orangejenny merged commit 756f897 into master May 27, 2024
11 of 12 checks passed
@orangejenny orangejenny deleted the jls/b5-auto-logout branch May 27, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
product/all-users-all-environments Change impacts all users on all environments QA Passed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants