add an initial state for 'browser_setting' variable.#4731
Conversation
|
The code seems reasonable, even if I have a bit of a difficult time understanding its purpose. The only thing that would need to be resolved is the PHP lint failure, which can be fixed with a simple |
|
Thanks! I’ll fix it using composer run cs:fix. |
After the file browsersettings.json is uploaded, it’s necessary to create an initial state for the user’s browser preference settings. This enables the Collabora iframe to include the POST variable and serve preprocessed HTML with accessibility features enabled, for example. Signed-off-by: Henry Castro <hcastro@collabora.com>
| $this->initialState->provideInitialState('open_local_editor', $this->config->getAppValue(Application::APPNAME, 'open_local_editor', 'yes') === 'yes'); | ||
| $fileName = $this->config->getUserValue($this->userId, Application::APPNAME, 'browsersetting'); | ||
| if ($fileName) { | ||
| $browserSetting = $this->settingsService->getSettingsFile('userconfig/' . $this->userId, |
There was a problem hiding this comment.
This is rather bad performance wise. File system access is rather slow and the initial state is built on every page load, so wondering if we shall rather write this to a memory cache
There was a problem hiding this comment.
You’re correct. We’re testing some features, and the patch will likely be discarded. If not, I’ll improve it. Thanks!
|
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! (If you believe you should not receive this message, you can add yourself to the blocklist.) |
After the file browsersettings.json is uploaded, it’s necessary to create an initial state for the user’s browser preference settings. This enables the Collabora iframe to include the POST variable and serve preprocessed HTML with accessibility features enabled, for example.