-
Notifications
You must be signed in to change notification settings - Fork 107
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: [IOPID-2169] Fix toast messages behavior in the PrivacyMainScreen
#6526
Conversation
…ad data/remove account operations errors
PrivacyMainScreen
PrivacyMainScreen
Affected stories
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6526 +/- ##
==========================================
+ Coverage 48.42% 49.15% +0.72%
==========================================
Files 1488 1550 +62
Lines 31617 31972 +355
Branches 7669 7233 -436
==========================================
+ Hits 15311 15716 +405
+ Misses 16238 16217 -21
+ Partials 68 39 -29
... and 1720 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
@mariateresaventura copy review needed! 🙏🏻 |
Done! |
…rectly call navigate
if (pot.isError(userDataProcessing.DOWNLOAD)) { | ||
// eslint-disable-next-line functional/immutable-data | ||
canShowTooltipRef.current = true; | ||
setRequestProcess(true); | ||
dispatch( | ||
loadUserDataProcessing.request( | ||
UserDataProcessingChoiceEnum.DOWNLOAD | ||
) | ||
); | ||
} else { | ||
handleUserDataRequestAlert(UserDataProcessingChoiceEnum.DOWNLOAD); | ||
} |
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.
What about wrapping this login inside a function having as parameter the UserDataProcessingChoiceEnum
. What do you think?
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.
Thank you for the hint!
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.
Addressed here
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.
LGTM
Short description
This PR fixes the double toast message displayed when navigating to the
PrivacyMainScreen
and retrieving information regarding the potential state of profile data download and/or account deletion is not possible. A single, less detailed toast message has been chosen instead of the previous two, which will be shown in case of an error in retrieving one or both pieces of information.List of changes proposed in this pull request
checkUpdate
now takes a list ofchoices
and manages the logic for displaying the toast message and both alerts internally.Demo
before-privacy-toast-message.mp4
after-privacy-toast-message.mp4
How to test
There are several ways to test this scenario. Personally, I tested it locally on the simulator by turning off the dev server or using a proxy tool (e.g., Proxyman) to manipulate the responses of the relevant requests before opening the screen. Simply put, on a physical device (or on a simulator in a production environment), you can replicate it by disabling the connection just before opening the screen. The choice is yours.