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

Add custom error toast message width on mobile #601

Merged
merged 2 commits into from
Apr 19, 2024
Merged

Add custom error toast message width on mobile #601

merged 2 commits into from
Apr 19, 2024

Conversation

rjwignar
Copy link
Collaborator

Similar to #577, this fixes #569 by making toast error messages fit the viewport when mobile is detected.

However, instead of adding the container style within the useAlert, the container styling is applied to the error useCallback.

This appears to avoid the bugs caused by #577 and reported in #586, but I'd like more opinions.

If this does fix the issues previously encountered, do we also want to apply this change to the rest of the useCallbacks?

@rjwignar rjwignar requested a review from kliu57 April 18, 2024 06:07
@rjwignar rjwignar self-assigned this Apr 18, 2024
Copy link

cloudflare-pages bot commented Apr 18, 2024

Deploying chatcraft-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: a37b9f6
Status: ✅  Deploy successful!
Preview URL: https://43dd7fcd.console-overthinker-dev.pages.dev
Branch Preview URL: https://issue-569-2.console-overthinker-dev.pages.dev

View logs

Copy link
Collaborator

@kliu57 kliu57 left a comment

Choose a reason for hiding this comment

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

Looks good to be, not experiencing any of the issues from before.

@kliu57
Copy link
Collaborator

kliu57 commented Apr 18, 2024

@WangGithub0 @Rachit1313 Could one of you test this toast width on Safari? The test is just that the toast width when you enter an invalid key for your current provider will not exceed the length of the page. (The red toast alert)

@kliu57
Copy link
Collaborator

kliu57 commented Apr 18, 2024

@rjwignar @humphd Actually, I think for now we just need to apply this "toast width fix" to the "error type toast", since we are only getting the exceed screen width issue with very long messages. (And we don't have any long messages for success, info, or warning). Unless we want to apply it as a precaution for future cases.

@kliu57 kliu57 requested a review from WangGithub0 April 18, 2024 17:29
@WangGithub0
Copy link
Collaborator

@WangGithub0 @Rachit1313 Could one of you test this toast width on Safari? The test is just that the toast width when you enter an invalid key for your current provider will not exceed the length of the page. (The red toast alert)

I tested on Safari, looks good.

@rjwignar rjwignar merged commit bb189d1 into main Apr 19, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Impossible to work with errors on mobile
3 participants