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

Bug fix: make dismiss during export not fire success toast #3882

Merged
merged 8 commits into from
Sep 17, 2024

Conversation

franknoirot
Copy link
Collaborator

@franknoirot franknoirot commented Sep 13, 2024

Fixes #3542 by moving the toast firing logic out of the ModelingMachineProvider and into the export helper functions. We can do this thanks to react-hot-toast's helpfully React-agnostic API, and exportMake was already doing this to fire custom toast.error's. By doing this, we can simply dismiss the toast on cancellation during desktop export.

Demo

Screenshare.-.2024-09-13.4_22_19.PM-compressed.mp4

Copy link

qa-wolf bot commented Sep 13, 2024

QA Wolf here! As you write new code it's important that your test coverage is keeping up.
Click here to request test coverage for this PR!

Copy link

vercel bot commented Sep 13, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
modeling-app ✅ Ready (Inspect) Visit Preview Sep 17, 2024 6:42pm

@franknoirot
Copy link
Collaborator Author

Need a bit of tweaking to make playwright tests behave nicely

Copy link
Collaborator

@Irev-Dev Irev-Dev left a comment

Choose a reason for hiding this comment

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

Nice!

@Irev-Dev
Copy link
Collaborator

Need a bit of tweaking to make playwright tests behave nicely

I guess that makes sense, the toast sits there for slightly longer now right?

@lf94
Copy link
Contributor

lf94 commented Sep 16, 2024

Makes me think if this should even be time-based, or any of our modals. What if the user misses it while they are away? A modal should be an occasional occurrence, right? Having the user dismiss could have benefits.

@franknoirot
Copy link
Collaborator Author

Makes me think if this should even be time-based, or any of our modals. What if the user misses it while they are away? A modal should be an occasional occurrence, right? Having the user dismiss could have benefits.

It's a good thought. I think having some toasts require dismissal is a good idea, but I do believe some are just like yeah you successfully did the thing, such as changing a setting, that I don't think we'd want to require a click to dismiss.

If we made the toasts smaller/more subtle, I think we could have the timer on them a fair bit longer, and show a loading bar for how much longer it'll appear. I think Sanity does this well, I could get a video of it at some point.

@franknoirot
Copy link
Collaborator Author

Good lord finally, my CI struggle has been real

@franknoirot franknoirot merged commit 00fa40b into main Sep 17, 2024
25 checks passed
@franknoirot franknoirot deleted the franknoirot/3542/cancel-export-no-toast branch September 17, 2024 23:06
@Irev-Dev Irev-Dev mentioned this pull request Sep 21, 2024
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.

"Exported Successfully" when cancelling export
3 participants