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 #336

Closed
ouuan opened this issue May 11, 2020 · 10 comments · Fixed by #389
Closed

Export/Import settings #336

ouuan opened this issue May 11, 2020 · 10 comments · Fixed by #389
Assignees
Labels
enhancement New feature or request high_priority High Priority Issues are marked with this label. work in progress The work has been started and is in progress.
Milestone

Comments

@ouuan
Copy link
Member

ouuan commented May 11, 2020

Is your feature request related to a problem? Please describe.

Now it's hard for the user to find the settings file, thus hard to export/import the settings.

Describe the solution you'd like

Add "Export settings" and "Import settings" in the "Options" menu of the main window (AppWindow).

We can use cped as the extension of the exported file.

Describe alternatives you've considered

N/A

Additional context

N/A

@ouuan ouuan added enhancement New feature or request help wanted Harder than good first issues but not too hard for newcomers, and not assigned to any maintainer high_priority High Priority Issues are marked with this label. labels May 11, 2020
@ouuan ouuan added this to the v6.5 milestone May 11, 2020
@shakeabi
Copy link

Alongside this, we can have "export/import settings" feature. This can help portability of settings?

@ouuan
Copy link
Member Author

ouuan commented May 11, 2020

Alongside this, we can have "export/import settings" feature. This can help portability of settings?

Export is simply copying the settings file to somewhere else, import is simply pasting another settings file and restart CP Editor, so I'm wondering if that will be helpful.

BTW, now the settings are saved to the file when exiting, so it will be better if the user can manually save the settings to the file, and it can be automatically done when clicking "reveal the settings file in the file manager".

@shakeabi
Copy link

I'm just suggesting that the import/export feature more user friendly.

@coder3101
Copy link
Member

I'm just suggesting that the import/export feature more user friendly.

It is a good idea, because the editor settings file is hidden be default exporting it can mean copying it to a user chosen location. Like say C://Users/Ashar/backup/settings/cpeditor-settings.cped

cped file extension of exported settings, it is so that user cannot open it and change manually potential rendering it unusable.

Importing a settings will mean a overwrite of current settings, user need to choose the file with extension cped and settings will be applied.

This way user can also have a backup at any other location say GitHub or can also be shared.

Another reason for export and import is that, in different OS, the location of settings file is different if a user is willing to use our editor in 2-3 different OS, instead of manually remembering the location in every OS they can simply export/import.

This should be simple and easy to implement as well.

@ouuan
Copy link
Member Author

ouuan commented May 11, 2020

It is a good idea, because the editor settings file is hidden be default

I missed this point, then I agree that import/export is better.

exporting it can mean copying it to a user chosen location. Like say C://Users/Ashar/backup/settings/cpeditor-settings.cped

cped file extension of exported settings, it is so that user cannot open it and change manually potential rendering it unusable.

Importing a settings will mean a overwrite of current settings, user need to choose the file with extension cped and settings will be applied.

This way user can also have a backup at any other location say GitHub or can also be shared.

Why not ini? How is cped better?

Another reason for export and import is that, in different OS, the location of settings file is different if a user is willing to use our editor in 2-3 different OS, instead of manually remembering the location in every OS they can simply export/import.

Reveal the settings file in the file manager also solves this.


Which of these should we have?

  • Reveal the settings file in the file manager
  • Save the settings to the settings file
  • Export/Import settings

Should we validate the settings? I think it won't be an easy job. I think it's OK to ignore the case that the user manually changes some settings and makes it invalid.

@coder3101
Copy link
Member

coder3101 commented May 11, 2020

Should we validate the settings?

No, I agree we can ignore the manual modifications. User should not change settings file themselves, if they do, they are responsible for consequences.


Export/Import Settings will be best, it fixes all above mentioned issue and I haven't seen application that exposes or reveals settings in file manager.


Why not ini? How is cped better?

  • ini files can be opened as text file and are more easy to edit, just changing the extension to cped makes the exported file a new type unknown to most text editors (like notepad) so it cannot be edited as easily as ini.

  • cped will be exclusive to our editor, in a sense that it is associated with our editor, ini is generic and used in general for settings.

  • because cped is our extension, we can choose to design it's protocol, in a sense we can Include inside it more than just settings, we can put into it the template source code as well because path of template will be useless if we only copy ini

@ouuan
Copy link
Member Author

ouuan commented May 11, 2020

OK, so we just add import/export with cped as the extension.

@ouuan ouuan changed the title Add reveal settings file in the file manager Export/Import settings May 11, 2020
@coder3101
Copy link
Member

OK, so we just add import/export with cped as the extension.

Yes as if now, it will be great.
In future we may add template code and other relative settings resources like template code. Inside cped.

@ouuan
Copy link
Member Author

ouuan commented May 12, 2020

@allcontributors add @shakeabi as a contributor for ideas.

@allcontributors
Copy link
Contributor

@ouuan

I've put up a pull request to add @shakeabi! 🎉

@ouuan ouuan added the good first issue Good for newcomers label May 22, 2020
@ouuan ouuan removed good first issue Good for newcomers help wanted Harder than good first issues but not too hard for newcomers, and not assigned to any maintainer labels Jun 4, 2020
@ouuan ouuan self-assigned this Jun 4, 2020
@ouuan ouuan added the work in progress The work has been started and is in progress. label Jun 4, 2020
@ouuan ouuan closed this as completed in #389 Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request high_priority High Priority Issues are marked with this label. work in progress The work has been started and is in progress.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants