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

feature(exchange): loading error screens #3158

Closed
wants to merge 29 commits into from

Conversation

banklesss
Copy link
Contributor

@banklesss banklesss commented Mar 24, 2024

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

Copy link
Contributor Author

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

@banklesss banklesss marked this pull request as draft March 24, 2024 11:47
@banklesss banklesss marked this pull request as ready for review March 24, 2024 12:44
@stackchain stackchain added this to the 4.27.0 milestone Mar 25, 2024
}
}

const defaultState: LoadingOverlayState = Object.freeze({
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why object.freeze?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To force immutability

Copy link
Collaborator

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)
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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?

@banklesss banklesss marked this pull request as draft May 27, 2024 09:19
@banklesss banklesss marked this pull request as draft May 27, 2024 09:19
@banklesss
Copy link
Contributor Author

waiting for loading screens redesign

@banklesss
Copy link
Contributor Author

closed in favour of #3563

@banklesss banklesss closed this Aug 27, 2024
@banklesss banklesss deleted the feature/exchange/loading-error-screens branch August 27, 2024 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants