-
-
Couldn't load subscription status.
- Fork 40
Change Style config to general/Style/ #743
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
Conversation
Change Style config from Style* prefix to general/Style/. This allows styles to be specified in Mode/Style as well. The old Style* format is still supported but deprecated. Updated `ov-less.yaml` and `ov.yaml` for improved style consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR changes the configuration for style settings from a flat Style* prefix to a nested general/Style structure. Key changes include:
- Migrating style references in test and drawing functions from the legacy top-level fields to the new nested structure.
- Refactoring configuration files and functions to support the new general/Style layout while maintaining backward compatibility with the deprecated format.
- Updating YAML configuration files (ov.yaml and ov-less.yaml) to reflect the new nested style configuration.
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| oviewer/prepare_draw_test.go | Updated tests to use the new nested style references (e.g. root.Doc.Style.*). |
| oviewer/prepare_draw.go | Adjusted drawing functions to retrieve styles from the nested style struct. |
| oviewer/oviewer.go | Introduced the new Style struct and default style initialization via NewStyle(). |
| oviewer/draw_test.go | Modified tests to check style values using the updated nested structure. |
| oviewer/draw.go | Updated rendering functions to use the new nested style settings (with variable m). |
| oviewer/config.go | Refactored config definitions to nest style settings and support deprecation. |
| ov.yaml, ov-less.yaml | Changed YAML keys to nest style settings under “Style”. |
Comments suppressed due to low confidence (1)
oviewer/draw.go:111
- The variable 'm' is used without a clear local declaration. If 'm' is intended as an alias for 'root.Doc', please explicitly declare and initialize it to improve code readability and prevent potential runtime errors.
root.applyStyleToLine(y, m.Style.Header)
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [noborus/ov](https://github.com/noborus/ov) | minor | `v0.39.0` -> `v0.40.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>noborus/ov (noborus/ov)</summary> ### [`v0.40.1`](https://github.com/noborus/ov/releases/tag/v0.40.1) [Compare Source](noborus/ov@v0.40.0...v0.40.1) #### What's Changed - fix: [#​760](noborus/ov#760) Do not apply old style settings when Style is blank by [@​noborus](https://github.com/noborus) in noborus/ov#761 **Full Changelog**: noborus/ov@v0.40.0...v0.40.1 ### [`v0.40.0`](https://github.com/noborus/ov/releases/tag/v0.40.0) [Compare Source](noborus/ov@v0.39.0...v0.40.0) Please use [v0.40.1](https://github.com/noborus/ov/releases/tag/v0.40.1) as there is a bug. #### What's Changed - Add styled terminal output with toggleable raw text option by [@​noborus](https://github.com/noborus) in noborus/ov#731. Resolves issue [#​684](noborus/ov#684) Thanks to [@​morenathan](https://github.com/morenathan) - Add `-m` as a short option for `--view-mode` by [@​noborus](https://github.com/noborus) in noborus/ov#734. Resolves issue [#​733](noborus/ov#733) Thanks to [@​Jaykul](https://github.com/Jaykul) - Add `--list-view-modes` option by [@​noborus](https://github.com/noborus) in noborus/ov#736 - make minStartX configurable with default value 0 by [@​noborus](https://github.com/noborus) in noborus/ov#742 This fix is related to issue [#​739](noborus/ov#739). Thanks to [@​hupfdule](https://github.com/hupfdule) - Change Style config to general/Style/ by [@​noborus](https://github.com/noborus) in noborus/ov#743 - Added clipboard via osc52 by [@​noborus](https://github.com/noborus) in noborus/ov#748 This resolves issue [#​747](noborus/ov#747) Thanks to [@​cstrahan](https://github.com/cstrahan) - Changed cbind url because it has moved to codeberg.org/tslocum/cbind by [@​noborus](https://github.com/noborus) in noborus/ov#758 This fix is related to pull request [#​757](noborus/ov#757). Thanks to [@​wreedb](https://github.com/wreedb) **Full Changelog**: noborus/ov@v0.39.0...v0.40.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xMS4yIiwidXBkYXRlZEluVmVyIjoiNDAuMTEuMiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Change Style config from Style* prefix to general/Style/.
This allows styles to be specified in Mode/Style as well.
The old Style* format is still supported but deprecated.
Updated
ov-less.yamlandov.yamlfor improved style consistency.