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

Draft: Export and import app settings to/from note #526

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

amberin
Copy link
Member

@amberin amberin commented Feb 17, 2025

This is my suggestion for how to solve #128, but it's just an early draft to get feedback on the general thinking.

I chose to also include saved searches, even though there is already another export/import feature for those. Because, well, why wouldn't you want them included?

I'm thinking a few tests would be good to ensure that

  • unknown/invalid settings are silently ignored without issue during import
  • known settings (test a selected few) are properly imported
  • nothing is exported or imported if the chosen note has a non-unique "ID" property value

The UI code was mostly copied from the "refile" dialog.

Only notes without children are eligible as export/import targets.

This is what it currently looks like:

image

image

image

@amberin amberin changed the title Draft: Export and import app settings to note Draft: Export and import app settings to/from note Feb 17, 2025
@alensiljak alensiljak marked this pull request as ready for review February 17, 2025 13:26
alensiljak
alensiljak previously approved these changes Feb 17, 2025
Throw an error when this happens, instead of silently pretending that
there was only one match.

(When using property ID's to store app settings, the previous behavior
would be dangerous. We would risk overwriting the wrong note with user
settings data.)
…chosen note

The UI code has mostly been copied from ui.refile. If I were better at
Android, I would refactor to reduce the amount of duplicated code. But
this is easier, and I doubt it will create total chaos.
@amberin amberin marked this pull request as draft February 18, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants