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

Simplify theme overrides #1652

Merged
merged 4 commits into from
Jun 25, 2023

Conversation

cruessler
Copy link
Contributor

@cruessler cruessler commented Apr 13, 2023

This Pull Request closes #1367.

It changes the following:

Theme overrides are now loaded the same way key overrides are loaded. The config file, theme.ron, does not have to contain a complete theme anymore. Instead, it is possible to specify only the values that are supposed to override their corresponding default values.

This PR is marked as draft because this change is breaking, and their is no automatic migration for existing configs. If that’s ok, I would extend the Breaking Changes entry, otherwise I would add code to migrate existing themes.

Update 2023-06-25: I added code for migrating existing themes to the new format.

I followed the checklist:

  • I added unittests
  • I ran make check without errors
  • I tested the overall application
  • I added an appropriate item to the changelog

@extrawurst
Copy link
Owner

Add a breaking changes entry, we did the same with key config overrides

@cruessler
Copy link
Contributor Author

Add a breaking changes entry, we did the same with key config overrides

Done! The PR is now ready for testing, I think.

@cruessler cruessler marked this pull request as ready for review April 14, 2023 07:42
@extrawurst
Copy link
Owner

finally had time to review. looks good, just a few questions

Theme overrides are now loaded the same way key overrides are loaded.
The config file, `theme.ron`, does not have to contain a complete theme
anymore. Instead, it is possible to specify only the values that are
supposed to override their corresponding default values.
@extrawurst
Copy link
Owner

  • the log message should contain the filename where to find the theme
  • the changelog changes are now in the already released version 0.23

but I will make these fixes after the merge

@extrawurst extrawurst merged commit 3c9c266 into extrawurst:master Jun 25, 2023
IndianBoy42 pushed a commit to IndianBoy42/gitui that referenced this pull request Jun 4, 2024
* Simplify theme overrides

Theme overrides are now loaded the same way key overrides are loaded.
The config file, `theme.ron`, does not have to contain a complete theme
anymore. Instead, it is possible to specify only the values that are
supposed to override their corresponding default values.

* Document breaking change in changelog
* Test that override differs from default
* Convert existing theme to patch
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.

optional theme overwrites
2 participants