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

Configuration is stored upon each page visit #1752

Closed
christianlupus opened this issue Jul 9, 2023 · 0 comments · Fixed by #1892
Closed

Configuration is stored upon each page visit #1752

christianlupus opened this issue Jul 9, 2023 · 0 comments · Fixed by #1892
Assignees
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code

Comments

@christianlupus
Copy link
Collaborator

Currently, the config is loaded from the server upon loading any page (this is intended). Unfortunately, the code as provided in the setup routine detects a change in the internal structures and stores the same configuration to the backend again. That means that there are redundant calls and in the worst case, the configuration is messed up (with concurrent requests).

I think that there are multiple ways to enhance this structure:

  1. The data should be provided by an initial state (provided by the server core) for the sake of reduced work. This avoids the additional request here to load any configuration.
  2. The setup here is the wrong routine as it is intended to construct the Vue object. Instead, the data handling (fetching the config initially) should be done outside the component and the component should use the mounted method instead.
  3. Accessing the global state might be better done with computed properties.
  4. The update of configuration entries on the server might be more intelligent to only send a request if really needed.

@seyfeb the code basically comes from you. Am I misunderstanding anything here (especially point 2)?

@christianlupus christianlupus added enhancement New feature or request javascript Pull requests that update Javascript code Frontend Issue or PR related to the frontend code labels Jul 9, 2023
@christianlupus christianlupus added this to the Release 0.10.3 milestone Jul 9, 2023
@christianlupus christianlupus self-assigned this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Frontend Issue or PR related to the frontend code javascript Pull requests that update Javascript code
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant