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

✨ Export/Import settings to and from a json file support for the UI #629

Conversation

neon-mmd
Copy link
Owner

@neon-mmd neon-mmd commented Nov 2, 2024

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

temp

How to test this PR locally?

It can be tested by installing and running Websurfx as mentioned in the docs and on the readme and by launching the browser and thoroughly testing. By saving some preferences on the UI via the settings page and exporting it as a json file and then clearing cookies for the search engine UI and then re-importing the json file. Additionally further checks can be carried by editing the backup file and providing inavlid values and testing whether the json values get santized as intended.

Author's checklist

  • Provide export/import buttons on the settings page.
  • Theme the buttons on the page.
  • Add functionality/logic for the buttons.
  • Refactor the API to support parsing of json data.
  • Bump the app verson to v1.21.0.

Related issues

Closes #427

@neon-mmd
Copy link
Owner Author

@jfvillablanca @spencerjibz
It has been a month. If you are free could you please lend an eye on this PR? And possibly review this PR. 🙂

neon-mmd and others added 7 commits January 17, 2025 22:12
…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.
@spencerjibz
Copy link
Collaborator

@jfvillablanca @spencerjibz It has been a month. If you are free could you please lend an eye on this PR? And possibly review this PR. 🙂

Sorry, I was busy, on it now, I'm rebasing to merge and also adding some improvements

@spencerjibz spencerjibz force-pushed the FEAT/427_export-import-settings-to-and-from-a-json-file-support-for-the-ui branch from 2383b59 to 14d8bf9 Compare January 17, 2025 22:59
@spencerjibz spencerjibz merged commit dae9f31 into rolling Jan 18, 2025
8 checks passed
@spencerjibz spencerjibz deleted the FEAT/427_export-import-settings-to-and-from-a-json-file-support-for-the-ui branch January 18, 2025 02:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

✨ Export/Import settings to and from a json file support for the UI
3 participants