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

Settings cleanup #2879

Merged
merged 3 commits into from
Nov 29, 2023
Merged

Settings cleanup #2879

merged 3 commits into from
Nov 29, 2023

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Nov 29, 2023

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

If a preferred color scheme is selected, it's not set when you (re)start the application.

Issue Number: N/A

What is the new behavior?

I made the Settings object a more rich object and moved many of the settings there. This makes the interface we have to use easier (no optional None object).

Changed the message that settings cannot be loaded to warning, so it's shown before the logging module is configured.

The application color scheme is updated according to the setting in a reactive fashion.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

This makes it more explicit which settings can be set.
Also make sure that the color scheme is enforced on startup, according to user preferences.
It's not only dark, but also light mode.
@github-actions github-actions bot added the python Pull requests that update Python code label Nov 29, 2023
Update application color scheme based on the selected value.
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @amolenaar, really nice refactoring! I'm always learning from you 🥇

@danyeaw danyeaw added chore Maintenance related PR and removed python Pull requests that update Python code labels Nov 29, 2023
@danyeaw danyeaw merged commit 9791647 into main Nov 29, 2023
20 checks passed
@danyeaw danyeaw deleted the settings-cleanup branch November 29, 2023 15:54
@amolenaar
Copy link
Member Author

😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants