8000 Change Style config to general/Style/ by noborus · Pull Request #743 · noborus/ov · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

Merged
merged 4 commits into from
Mar 28, 2025
Merged

Change Style config to general/Style/ #743

merged 4 commits into from
Mar 28, 2025

Conversation

noborus
Copy link
Owner
@noborus noborus commented Mar 27, 2025

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.

noborus added 2 commits March 27, 2025 14:59
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.
@noborus noborus requested a review from Copilot March 27, 2025 10:27
Copy link
Contributor
@Copilot Copilot AI left a 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)

@noborus noborus merged commit c47ef9c into master Mar 28, 2025
8 checks passed
@noborus noborus deleted the general-style branch April 9, 2025 18:34
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 10, 2025
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: [#&#8203;760](noborus/ov#760) Do not apply old style settings when Style is blank by [@&#8203;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 [@&#8203;noborus](https://github.com/noborus) in noborus/ov#731. Resolves issue [#&#8203;684](noborus/ov#684) Thanks to [@&#8203;morenathan](https://github.com/morenathan)
-   Add `-m` as a short option for `--view-mode` by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#734. Resolves issue [#&#8203;733](noborus/ov#733) Thanks to [@&#8203;Jaykul](https://github.com/Jaykul)
-   Add `--list-view-modes` option by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#736
-   make minStartX configurable with default value 0 by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#742 This fix is ​​related to issue [#&#8203;739](noborus/ov#739). Thanks to [@&#8203;hupfdule](https://github.com/hupfdule)
-   Change Style config to general/Style/ by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#743
-   Added clipboard via osc52 by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#748 This resolves issue [#&#8203;747](noborus/ov#747) Thanks to [@&#8203;cstrahan](https://github.com/cstrahan)
-   Changed cbind url because it has moved to codeberg.org/tslocum/cbind by [@&#8203;noborus](https://github.com/noborus) in noborus/ov#758 This fix is ​​related to pull request [#&#8203;757](noborus/ov#757). Thanks to [@&#8203;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-->
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.

1 participant
0