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

[Suggestion] Load or export user configuration file in a GUI environment #2393

Closed
lucydodo opened this issue Sep 7, 2020 · 20 comments · Fixed by #2394
Closed

[Suggestion] Load or export user configuration file in a GUI environment #2393

lucydodo opened this issue Sep 7, 2020 · 20 comments · Fixed by #2394
Assignees
Labels
enhancement Feature requests.

Comments

@lucydodo
Copy link
Member

lucydodo commented Sep 7, 2020

Describe the new feature

I recently made a change to user can use a user configuration file with code I committed. 0644bc0

However, it still only works on the command line. Working from the command line would be inconvenient for most users compared to GUI environments. In fact, there were some people who used this program for education in related issues.

So I propose to provide two menus as follows in GUI environment.

  • Import Configuration
  • Export Configuration
    Screen Shot 2020-09-08 at 2 08 56
    and I will also provide the option to permanently save the configuration(Windows registry or specified path by QSettings class) so that the user doesn't load the configuration file every time they run the DB4S. What do you think? 😄
    Screen Shot 2020-09-08 at 2 09 03
    *It's not included in the screenshot, but it would be nice to warn that if click 'Yes', existing settings may be deleted.

Additional info

Please answer these questions before submitting your feature request.

Is your feature request related to an issue? Please include the issue number.

#2317

Does this feature exist in another product or project? Please provide a link.

Many

Do you have a screenshot? Please add screenshots to help explain your idea.

Already attached above.

@lucydodo lucydodo added the enhancement Feature requests. label Sep 7, 2020
@lucydodo lucydodo self-assigned this Sep 7, 2020
@chrisjlocke
Copy link
Member

chrisjlocke commented Sep 7, 2020

Having it off the File menu is slightly confusing, considering to get to the configuration, you go to the Edit menu, and select 'Preferences'. Preferences ... configuration ... is this the same thing?
In the Preferences dialog, we have 'Restore Defaults'. How about adding 'Export Preferences' and 'Import Preferences' there, then moving the 'Restore defaults' button.

image

This might mean the command-line switch needs to be reworded to 'preferences file' and not 'config file'. Or maybe a config file holds preference information, so thats OK. Heck, I hate this, and swear in my applications when I've added a 'New...' button in one form then an 'Add...' in another.
I think as we have 'Import', then 'Export' then 'Import Configuration', it looks a little muddled ... duplication. There is already a lot of 'Opens' going on (and 'Open Project' at the bottom) muddying it even further.

Just a thought though ... so please don't take any notice of my ramblings! 😆

@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

@chrisjlocke I think your idea is nice. 😄 I think it would be nice to create a new tab in the preferences dialog and implement the function I was talking and move the existing 'Restore Defaults' button.

Preferences? Configuration? I'm also wondering which word will be more natural. Personally, I think it would be good to express it as an 'Preferences' than 'Configuration' (Because it is already express as an Preferences and PreferencesDialog)

I simply implemented the prototype. What do you think?
(Something seems to be wasting space 😞 , would it be better to implement it at the bottom like you?)
Screen Shot 2020-09-08 at 3 08 49

@chrisjlocke
Copy link
Member

Another thought (from my thought...) is to reduce the size of the 'manage' button (does it have to be the screen width) and add a 'configuration' section with 'export' and 'import' buttons.

image

Dooodled that while you were doing yours! 😆

@justinclift
Copy link
Member

justinclift commented Sep 7, 2020

Personally, I kind of like the concept of those two buttons in @chrisjlocke's first screenshot:

image

But probably named "Export Preferences" and "Import Preferences", as they're already in the "Preferences" dialog?

@chrisjlocke
Copy link
Member

image

@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

Cool, then we better add two buttons at the bottom.
One more thing, it is currently expressed as configuration on the command line. Wouldn't it be nice change this to a 'preferences'? (Including changing the option from -c and --config to -p and --preferences at the same time)

@justinclift
Copy link
Member

Yeah, probably best to try and keep things consistent. 😄

@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

Cool. Then it's time to tap on the keyboard!

@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

@justinclift I'm sorry to keep bothering you. Shall I change the name of the environment variable 'DB4S_CONFIG_FILE' too?

@chrisjlocke
Copy link
Member

I'm not a DB4S programmer, but it would help reading the code, especially for others.

lucydodo pushed a commit that referenced this issue Sep 7, 2020
Change to 'Preferences' expression instead of 'Configuration' expression for consistent.
See the issue #2393
@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

I agree. For the consistent, I changed the name of the environment variable and committed it. d9fd0e1
If @justinclift has any other disagreement, I will correct it immediately. Thank you.

@mgrojo
Copy link
Member

mgrojo commented Sep 7, 2020 via email

@lucydodo
Copy link
Member Author

lucydodo commented Sep 7, 2020

@mgrojo Thanks for the comments. I'd like to give my thoughts on which expression would be more appropriate, 'Configuration' and 'Preferences', but it's difficult to comment because English is not my native language.
(I would appreciate this if other people discuss this 👀 )

and about on the second agenda I think it is because I simply came up with the word 'Import' without thinking of the word 'Load'. (similar reaons as above) I think it's good to give multiple options to user, but on the one hand, I think it might be better to just store permanently ('real import' in your expression) as you say.

What do other people think? 😄

@justinclift
Copy link
Member

Sorry to introduce more doubt but in fact, the settings include more
information than only the preferences like many settings that are adjusted
directly by the user in the application, like window layout, state of some
toggle buttons and the like. Might be irrelevant, but I wonder if user will
be surprised by that if we call it preferences.

Yeah, that's a good point. If it does more than just preferences, we probably do need to use a different word. 🤔

@scottfurry
Copy link
Contributor

scottfurry commented Sep 7, 2020

@justinclift - word your reaching for is settings

There are a few schools of thought about where to put menu entry. By convention, and assume you have a choice unlike MacOS, choices are File, Help, and Edit. Since we're dealing with an application level construct, my choice would be for the File menu. Also, Menu Item separators coupled with ellipses at end of action name (i.e. "Edit Settings...") can be employed to ensure this stands out or otherwise doesn't causes confusion.

My €/$0.02

@justinclift
Copy link
Member

justinclift commented Sep 7, 2020

Settings sound reasonable. Am kind of thinking "Export Settings" and "Import Settings" buttons (as per above button screenshots), unless that'd be too confusing to have in the Preferences dialog?

@scottfurry
Copy link
Contributor

scottfurry commented Sep 7, 2020 via email

@lucydodo
Copy link
Member Author

lucydodo commented Sep 8, 2020

I also searched the English-English dictionary, but 'Settings' seems to be a more appropriate expression.
'Configuration' seems to be an expression used in hardware. eg) Here's the system configuration: CPU, RAM, SSD, VGA

In summary, is it correct to express it as 'Settings', and to make the buttons at the bottom of the PreferencesDialog?
and, should we need to change the name to 'Settings' in PreferencesDialog? eg) PreferencesDialog -> SettingsDialog

@chrisjlocke
Copy link
Member

Preferences would be something more user-centric. Eg, the toolbar style you want, the font size, etc. Settings would be more application-centric - window size, date last updated, etc. The configuration would be what the application needs to work, eg, variables that can be tweaked/set, URLs it points to, etc. There is a lot of grey area though - one configuration option could be a preference, etc, etc. Its all up to different developers and the OS they use. Eg, in Windows, everthing was Options. 'Tools' -> 'Options' has been a standard in Microsoft stuff for years. Linux has been 'Preferences' or 'Settings', etc.

I don't think changing the name of the dialog would be necessary...

@lucydodo
Copy link
Member Author

lucydodo commented Sep 8, 2020

@chrisjlocke I understand. I just mentioned it for consistent. 😉

mgrojo pushed a commit that referenced this issue Sep 19, 2020
…nt (#2394)

* Change 'Preferences' to 'Settings' for natural expression. See the issue #2393

* Add filter for INI file

* Add 'Export Settings' and 'Import Settings' buttons In Preferences dialog

* Add validation of whether it is a normal settings file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants