Skip to content

Fix: Workaround for detected changes in SettingsView upon rendering#455

Merged
kevinvandijk merged 2 commits intomainfrom
fix-unwanted-unsaved-changes
May 21, 2025
Merged

Fix: Workaround for detected changes in SettingsView upon rendering#455
kevinvandijk merged 2 commits intomainfrom
fix-unwanted-unsaved-changes

Conversation

@RSO
Copy link
Contributor

@RSO RSO commented May 21, 2025

I've been going down a rabbit hole, trying to figure out why some users were seeing unsaved changes upon rendering the SettingsView for the first time.

We've been dealing with this issue multiple times in the past, most recently in #354.

I'm of the opinion that at some point we should rework the SettingsView and especially how state is being managed inside of it. There's simply too many opportunity to run into these situations because individual components are in charge of defaults and fallbacks, which will always keep triggering unsaved changes upon first render. With this workaround I simply make sure that we get users out of the state that poisoned their settings state.

I've been going down a rabbit hole, trying to figure out why some users were seeing unsaved changes upon rendering the SettingsView for the first time.

We've been dealing with this issue multiple times in the past, most recently in #354.

I'm of the opinion that at some point we should rework the SettingsView and especially how state is being managed inside of it. There's simply too many opportunity to run into these situations because individual components are in charge of defaults and fallbacks, which will always keep triggering unsaved changes upon first render. With this workaround I simply make sure that we get users out of the state that poisoned their settings state.
@changeset-bot
Copy link

changeset-bot bot commented May 21, 2025

⚠️ No Changeset found

Latest commit: 3b46bba

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@RSO RSO requested a review from kevinvandijk May 21, 2025 10:03
@kevinvandijk kevinvandijk merged commit 6a54965 into main May 21, 2025
9 checks passed
@kevinvandijk kevinvandijk deleted the fix-unwanted-unsaved-changes branch May 21, 2025 12:00

if (renderTime < 100 && isChangeDetected) {
console.info("Overwriting unsaved changes in less than 100ms")
onConfirmDialogResult(true)
Copy link
Contributor

Choose a reason for hiding this comment

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

🤢

Yes, I see what you mean... Truly proud.

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.

3 participants