KittyCAD / modeling-app

The KittyCAD modeling app.
https://kittycad.io/modeling-app/download
MIT License
411 stars 35 forks source link

"Exported Successfully" when cancelling export #3542

Closed jgomez720 closed 1 month ago

jgomez720 commented 2 months ago

Description

Super tiny thing, but we toast "exported successfully" when the user selects "cancel"

Version

v0.24.12

Recording

https://github.com/user-attachments/assets/621143ef-622c-4e22-8c09-f4ac7ad2ae37

jessfraz commented 2 months ago

i would consider this a bug

jessfraz commented 2 months ago

because it is not correct behavior

jgomez720 commented 2 months ago

ah, alrighty

jessfraz commented 2 months ago

i literally had no idea there was a different menu to hit export from? why so many ways to export, is that code path tested? maybe we lessen the different ways to do things? idk why we need three ways to export something

jgomez720 commented 2 months ago

wait how are you exporting? I only know the top left

jgomez720 commented 2 months ago

oh I found the other button

Irev-Dev commented 2 months ago

Edit sorry could have sworn I saw another issue with the exact same thing, but now I can find it.


Going to close this since it duplicates.

franknoirot commented 1 month ago

It's the same code path however you get to export:

  1. From the project menu
  2. From the sidebar

The success toast is firing because there was no failure during the export, and that is a "success" as far as these lines are concerned. I need to see how to receive a signal from the OS export UI that it was either a cancellation or a submission, because right now we only get back a "done" or "error".

franknoirot commented 1 month ago

Hell yeah there's a canceled property on the returned object https://www.electronjs.org/docs/latest/api/dialog#dialogshowsavedialogwindow-options

franknoirot commented 1 month ago

Ah dang I wanted to add an E2E test and I just remembered we can't interact with the OS dialog 💀. I'll add it to #3588