-
Notifications
You must be signed in to change notification settings - Fork 103
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
✨ Export/Import settings to and from a json
file support for the UI
#629
Merged
spencerjibz
merged 10 commits into
rolling
from
FEAT/427_export-import-settings-to-and-from-a-json-file-support-for-the-ui
Jan 18, 2025
Merged
✨ Export/Import settings to and from a json
file support for the UI
#629
spencerjibz
merged 10 commits into
rolling
from
FEAT/427_export-import-settings-to-and-from-a-json-file-support-for-the-ui
Jan 18, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@jfvillablanca @spencerjibz |
…ute to handle post requests (#427) - Add a new route `/download` which handles the export functionality of the user preferences as a `json` file. - Update the `/settings` route to handle post requests for handling the import functionality of the user preferences. Also, taking care of the sanitization of the user provided `json` values.
…port parsing of `json` data (#427)
Sorry, I was busy, on it now, I'm rebasing to merge and also adding some improvements |
2383b59
to
14d8bf9
Compare
spencerjibz
approved these changes
Jan 18, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR provides the functionality to import and export user preferences from the search engine.
Why is this change important?
This change is essential as it provides the functionality for the users to easily export saved user preferences from the UI to their machines for backup. So that when the user change browsers or machines, then the user can easily import their backuped preferences for the UI. Additionally this change can also allow the user to write a
json
file with custom values which can be used to import their preferred custom preferences for the UI.Screenshots
How to test this PR locally?
It can be tested by installing and running
Websurfx
as mentioned in thedocs
and on thereadme
and by launching the browser and thoroughly testing. By saving some preferences on the UI via the settings page and exporting it as ajson
file and then clearing cookies for the search engine UI and then re-importing thejson
file. Additionally further checks can be carried by editing the backup file and providing inavlid values and testing whether thejson
values get santized as intended.Author's checklist
json
data.v1.21.0
.Related issues
Closes #427