GoMap icon indicating copy to clipboard operation
GoMap copied to clipboard

Panoramax: Clicking "done" on upload screen cancels the upload

Open tordans opened this issue 10 months ago • 5 comments

Related to https://github.com/bryceco/GoMap/issues/845 and non-ideal internet connection.

I think I was waiting on

Image

… for a while when I wanted to continue mapping. It is unclear at this point, if the upload is finished and I am waiting for the preview to show up. The UI spinner is on the preview, so maybe it is waiting for the preview?

As far as I remember the "done" has no exit alert "are you sure, upload in progress" so once I clicked it everything was canceled as far as I know.

  • It would be great to have an info "(still) uploading…" maybe with %?
  • It would be great to have a warning "cancel sure?" on the "done" to clarify or rename done to "cancel"

tordans avatar Apr 21 '25 13:04 tordans

Can I ask how long you were waiting?

bryceco avatar Jun 12 '25 04:06 bryceco

Can I ask how long you were waiting?

Don’t know anymore. I find it hard to tell how long would be appropriate because I don’t know the file size or current upload speed. Can do more testing once I can log in again :) #856

tordans avatar Jun 12 '25 05:06 tordans

Can this be done with concurrency in the background?

GA-Kevin-Codes avatar Jun 15 '25 00:06 GA-Kevin-Codes

It is being done in the background, which is the reason the UI is responsive allowing the user to close the window. The question is about providing some check to prevent the user from dismissing the window while the operation is ongoing.

@tordans The code is just doing a POST operation, which doesn't provide any feedback about upload percentage etc. We could probably add code to support it but for the small things we upload the issue is generally just establishing any connection at all.

bryceco avatar Jun 15 '25 04:06 bryceco

I rewrote the panoramax code to be readable, and then tried testing the behavior. Currently it won't complain if you dismiss the panoramax view while the upload is in-progress, and it will update the value in All Tags correctly whenever the upload finishes. If you dismiss All Tags before it finishes then the value is lost.

My question is what behavior would you prefer?

  • Allow the user to cancel the upload: there will likely be an orphaned photo on the server that isn't referenced by any OSM object. * Prevent the user from dismissing the screen until upload finishes: annoying for slow uploads.
  • Keep the current behavior: Behavior is unpredictable depending on upload speed and user actions.
  • Update the object whenever the upload finishes, even if it is far in the future: Also unpredictable and may cause crashes or data loss if tags are changing in the background.

bryceco avatar Aug 13 '25 01:08 bryceco