-
Notifications
You must be signed in to change notification settings - Fork 308
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
Namespace Medplum-managed local storage keys #3803
Comments
Just noticed that this impacts the work done to enable dark mode By default, Mantine leverages the |
Currently, calling
MedplumClient#clear
is quite destructive and blows away all local storage entries regardless of if they're Medplum-managed.medplum/packages/core/src/client.ts
Lines 805 to 814 in 1ac4758
This is a side-effect of logging out:
medplum/packages/core/src/client.ts
Lines 1116 to 1120 in 1ac4758
I'd like to propose introducing a prefix to all local storage keys that are created by Medplum to enable
#clear
to be more surgical and only remove Medplum created/managed local storage entries. Additionally, this would reduce the likelihood of key clashing with other systems/extensions that leverage local storage.i.e.
@medplum:${key}
@medplum:logins
@medplum:activeLogin
This would be a breaking change if it became the default behavior and FWIW, the
MedplumClient
does already expose storage as an optional input so clients could specify their own local storage wrapper that applies key prefixes and a more surgical removal.The text was updated successfully, but these errors were encountered: