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

WIP - frontend: PluginSettings: Refactor local storage and plugin data #2671

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vyncent-t
Copy link
Contributor

@vyncent-t vyncent-t commented Dec 12, 2024

This is the rework for the local storage plugin settings usage

  • This PR shrinks the saved JSON data from the plugins information and saves only the name and isEnabled in the local storage, this is what allows the plugin settings to be saved when closing and starting the app again

  • This PR also handles backwards compatibility that allows previous settings saved to be used in this new format

  • This PR also no longer takes old information stored in the JSON of the local storage and instead takes it from the backend when the main Plugin component is called

@vyncent-t vyncent-t self-assigned this Dec 12, 2024
@vyncent-t vyncent-t force-pushed the reduce-plugin-settings-storage branch from 005cabd to d2f8668 Compare December 12, 2024 01:01
@vyncent-t vyncent-t marked this pull request as ready for review December 12, 2024 01:03
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Dec 12, 2024
@vyncent-t
Copy link
Contributor Author

Last push adds backwards comp so that all settings wont be set to off or on

@vyncent-t
Copy link
Contributor Author

I have tried to keep the changes as small as possible to accomplish everything it needs to, I am not using the map object to save information anymore, although to hit these targets I still had to use most of what I had reworked previously

@joaquimrocha @sniok

for this PR the targets it needs to hit were:

  • not have the plugins version/data coming from a client-side stored version of it

The plugin data comes from the backend, reused the same method of reaching it from the previous rework

  • avoid having to store all that data when what we are interested in is checking whether the plugins are enabled on the user's side

The data is now trimmed down to just being the name and isEnabled, it is now being used the same way as the original settings where this local saved item is how new app start ups save plugin settings

  • need to be backwards compatible with the previous settings method

The local storage handling logic checks for the old format and changes it to the new format

@vyncent-t vyncent-t marked this pull request as draft December 12, 2024 01:13
@vyncent-t vyncent-t changed the title frontend: PluginSettings: Refactor local storage and plugin data WIP - frontend: PluginSettings: Refactor local storage and plugin data Dec 12, 2024
@vyncent-t vyncent-t marked this pull request as ready for review December 12, 2024 01:16
@vyncent-t vyncent-t changed the title WIP - frontend: PluginSettings: Refactor local storage and plugin data frontend: PluginSettings: Refactor local storage and plugin data Dec 12, 2024
@vyncent-t vyncent-t marked this pull request as draft December 12, 2024 15:03
@vyncent-t vyncent-t force-pushed the reduce-plugin-settings-storage branch from d2f8668 to 56e912f Compare December 12, 2024 18:37
@vyncent-t vyncent-t changed the title frontend: PluginSettings: Refactor local storage and plugin data WIP - frontend: PluginSettings: Refactor local storage and plugin data Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant