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

[Tech debt] Local prefs - migration from metadata prefs #3551

Open
MatissJanis opened this issue Oct 3, 2024 · 0 comments
Open

[Tech debt] Local prefs - migration from metadata prefs #3551

MatissJanis opened this issue Oct 3, 2024 · 0 comments
Assignees
Labels
tech debt Technical debt we should pay down
Milestone

Comments

@MatissJanis
Copy link
Member

Creating an issue so I don't forget about this.

// Migrate from old pref storage location (metadata.json) to local storage
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const [metadataPref] = useMetadataPref(prefName as any);
useEffect(() => {
if (value !== undefined || metadataPref === undefined) {
return;
}
setValue(metadataPref);
}, [value, metadataPref, setValue]);

The above code snippet migrates metadata.json prefs to local storage. This works fine (for now). But we will want to remove this logic for v24.11.0 release.

The problem is: metadata.json is never cleaned up. For example: if you had previously set-up a specific budget month - this starting budget month will always be used as the "default". No matter if you open the budget today, tomorrow or a year from now (assuming it's a fresh session with no local storage).

For version v24.11.0 the migration snippet should be removed. We can assume that most people would have auto-magically migrated by then.

@MatissJanis MatissJanis added the tech debt Technical debt we should pay down label Oct 3, 2024
@MatissJanis MatissJanis added this to the v24.11.0 milestone Oct 3, 2024
@MatissJanis MatissJanis self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt Technical debt we should pay down
Projects
None yet
Development

No branches or pull requests

1 participant