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

Don't refresh the page when there are unsaved changes! #10761

Open
Revadike opened this issue Oct 19, 2024 · 3 comments
Open

Don't refresh the page when there are unsaved changes! #10761

Revadike opened this issue Oct 19, 2024 · 3 comments
Labels

Comments

@Revadike
Copy link
Contributor

DIM Version

Version 8.42.0.3621 (beta), built on 15/10/2024, 23:51:21

Browser Details

Firefox 131.0.2 (64-bit)

OS Details

Windows 11

Describe the bug

I was making a build and I accidentally clicked on another tab that had DIM open, and it refreshed both tabs, discarding my whole build...
I'd like to request 2 changes, one that also helps with my other issue:

  1. Allow in-between saving, without closing the whole build popup. Same thing for save as new.
  2. Add a before leave event handler to prevent refreshes when you have unsaved changes.

Logs

No response

@Revadike Revadike added the Bug label Oct 19, 2024
@bhollis
Copy link
Contributor

bhollis commented Oct 25, 2024

We already won't reload-to-update if there's any sheet up:
https://github.com/DestinyItemManager/DIM/blob/master/src/app/dim-ui/AutoRefresh.tsx#L199-L200

However, if one tab upgrades, they all must reload or the upgrade gets stuck.

To fix this we'd need coordination between tabs, which is basically #9733 - something I'd like to do but it's low on the priority list.

I'd suggest using prod DIM instead of beta, since prod generally only updates once a week.

@Revadike
Copy link
Contributor Author

Fair enough, but I think preventing lost changes is more important than upgrading. All you need is a tab refresh anyway, right? Just make it reload after pushing the save button.

@bhollis
Copy link
Contributor

bhollis commented Oct 25, 2024

"Just" is doing a lot of heavy lifting there, but if you'd like to volunteer a PR...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants