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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document color serialization breaking change #2244

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ but this also allows us now to define colors in the common hex format:

`selection_fg: Some(Rgb(0,255,0))` -> `selection_fg: Some("#00ff00")`

Checkout [THEME.md](./THEME.md) for more info.
Checkout [THEMES.md](./THEMES.md) for more info.

### Fixes
* update yanked dependency to `libc` to fix building with `--locked`.
Expand Down
17 changes: 15 additions & 2 deletions THEMES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,18 @@ The file uses the [Ron format](https://github.com/ron-rs/ron) and is located at

Alternatively, you can create a theme in the same directory mentioned above and use it with the `-t` flag followed by the name of the file in the directory. E.g. If you are on linux calling `gitui -t arc.ron`, this will load the theme in `$XDG_CONFIG_HOME/gitui/arc.ron` or `$HOME/.config/gitui/arc.ron`.

Example theme override:
Example theme override (>= 0.23, < 0.26.2):
Copy link
Owner

Choose a reason for hiding this comment

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

lets make it a bit more clear that this is the old approach like I did in the changelog: old -> new so that it does not get confused to be what should work anymore.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed this section, let me know what you think! I hope that I remembered the initial version of the config correctly.


```
(
selection_bg: Some(Blue),
selection_fg: Some(White),
)
```

Note that you need to wrap values in `Some` due to the way the overrides work (as of 0.23).

Example theme override (>= 0.26.2):

```
(
Expand All @@ -23,7 +34,9 @@ Example theme override:
)
```

Note that you need to wrap values in `Some` due to the way the overrides work (as of 0.23).
Note that you need to specify colors using strings due to a change in `ratatui` as opposed to bare enum variants (as of 0.26.2).

See <https://github.com/ratatui-org/ratatui/commit/0a164965ea2b163433871717cee4fd774a23ee5a> for context.

Notes:

Expand Down