-
Notifications
You must be signed in to change notification settings - Fork 50
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(exchange): loading error screens #3158
Conversation
…oading-error-screens
…oading-error-screens
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.
A modal inspired by the one we already had has been created but exclusively for loading, since it is the new design that occupies the entire screen
} | ||
} | ||
|
||
const defaultState: LoadingOverlayState = Object.freeze({ |
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 object.freeze
?
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.
To force immutability
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.
Is there a convention when to use Object.freeze
and when not? Otherwise all constants could have object.freeze. In this case, it seems to me it's quite unnecessary
|
||
const handleStartLoading = React.useCallback( | ||
(text: LoadingOverlayState['text']) => { | ||
timerRef.current = setTimeout(() => startLoading(text), delays) |
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.
Should we add a check if the component is still mounted? Eg if user navigates back while it's loading
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.
If its loading, the button will be disabled so the user can't perform the loading action again
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 if they press the hardware button?
apps/wallet-mobile/src/components/LoadingOverlay/LoadingOverlayContext.tsx
Show resolved
Hide resolved
waiting for loading screens redesign |
closed in favour of #3563 |
Related to YOMO-1256
In the demo below the error and loading time have been forced
Simulator.Screen.Recording.-.iPhone.15.Pro.Max.-.2024-03-24.at.13.52.48.mp4