-
Notifications
You must be signed in to change notification settings - Fork 8
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
DDFLSBP-621 - Make sure to only show blocked modal when logging in #1354
DDFLSBP-621 - Make sure to only show blocked modal when logging in #1354
Conversation
We have decided to implement this differently. That is why I am closing this. |
7cf7ea1
to
b9d07e3
Compare
Since the cms is handling those cases we do not need to take them into consideration
Otherwise we will get a missing text error when developing
f50c504
to
6ea9924
Compare
The initial implementation was unclear and buggy. So we reduced the amount of states and cleaned up the code.
Make sure that it is remembered across page loads
This has been used in a previous version of the apps but are not in use anymore.
Make sure that the persisted redux states are cleared before logging out.
6ea9924
to
89742de
Compare
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.
We have 1 question in regards to some deleted lines, but otherwise looks gucci.
Also - Cypress tests 🥲
BlockedTypes.automatonBlocked, | ||
BlockedTypes.extendedExclusion, | ||
BlockedTypes.stolen | ||
BlockedTypes.extendedSuspension |
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.
Why did you delete the previous lines?
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.
Because the cms is taking care of handling that type of blocked users
Since the behaviour has changed we need to update the tests accordingly.
32c8811
to
0fdcae9
Compare
Link to issue
https://reload.atlassian.net/browse/DDFLSBP-621
Description
To avoid spamming the user with a popup modal informing the user that they have unpaid fees and are therefore "blocked" on all pages, we add a check to see if the user has just logged in or not.
This way we only show the modal once, and the user can then navigate freely afterwards.
If was suggested that the modal should also be shown whenever the user is trying to reserve a book, but as the button for reserving is "disabled" when a user is blocked, this is already taken care of.
Update 18 Aug
We decided to rewrite the blocked modal functionality because the code was unclear and difficult to maintain.
Furthermore we added that the persisted redux store is cleared upon logout, to make sure that data is not surviving between sessions. In that way other user will not be able to see previous users state. By clearing the persisted data upon logout we also make sure that the same user will be presented with the blocked modal again when logging out and in again.