Skip to content

docs(scrollbar): improve API discovery#251

Merged
joshka merged 1 commit into
mainfrom
joshka/scrollbar-docs
Jun 11, 2026
Merged

docs(scrollbar): improve API discovery#251
joshka merged 1 commit into
mainfrom
joshka/scrollbar-docs

Conversation

@joshka

@joshka joshka commented Jun 11, 2026

Copy link
Copy Markdown
Member

Summary

  • Improve tui-scrollbar crate docs for API discovery, styling behavior, glyph selection, and interaction flow.
  • Add a small scrollbar_styled example that shows distinct track, thumb, and arrow styles for vertical and horizontal scrollbars.
  • Configure docs.rs example scraping and add a regression test for custom thumb styling on full and partial thumb cells.

Details

This is a non-functional docs/examples/tests change. It reorganizes the crate-level docs so important defaults and caveats are visible earlier, replaces the loose ScrollBar “Key methods” list with a grouped method map, and adds canonical examples for the main builder methods.

The styling docs now spell out how fg and bg apply to terminal glyph cells. In particular, they call out that the default minimal track renders spaces, so empty track cells show background color, while visible glyph sets can use foreground color for the track line. The docs also note the partial-thumb caveat: when using visible tracks such as GlyphSet::box_drawing, thumb background can show at partial glyph edges, so matching it to the track background is usually less surprising.

The glyph docs keep repeated Symbols for Legacy Computing context where readers may land directly, rather than relying on linear reading through the crate docs.

Related context:

Validation

  • cargo test -p tui-scrollbar --all-features
  • cargo test -p tui-scrollbar --doc --all-features
  • cargo check -p tui-scrollbar --examples --all-features
  • cargo clippy -p tui-scrollbar --all-targets --all-features
  • RUSTDOCFLAGS='-D warnings' cargo doc -p tui-scrollbar --no-deps --all-features
  • just fmt-check
  • cargo rdme --check --manifest-path tui-scrollbar/Cargo.toml
  • markdownlint-cli2 tui-scrollbar/README.md

Add focused ScrollBar documentation and examples so callers can find styling, glyph, and interaction methods from the main widget page. Keep crate-level docs aligned with the generated README and docs.rs example scraping.
@joshka joshka enabled auto-merge (squash) June 11, 2026 19:18
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.65%. Comparing base (2cd4955) to head (b63695d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #251      +/-   ##
==========================================
+ Coverage   87.57%   87.65%   +0.07%     
==========================================
  Files          22       22              
  Lines        4210     4237      +27     
==========================================
+ Hits         3687     3714      +27     
  Misses        523      523              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@joshka joshka disabled auto-merge June 11, 2026 19:19
@joshka

joshka commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

@tremby happy to take a review on language here if anything is unclear. I'd recommend rendering locally to view the docs there directly rather than just diff checking

cargo doc -p tui-scrollbar --open 

@tremby tremby left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I read through all of it, looks good to me. Seems clear. Thanks.

(Caveat: I can't comment on accuracy, and I didn't run the example code.)

@joshka

joshka commented Jun 11, 2026

Copy link
Copy Markdown
Member Author

I read through all of it, looks good to me. Seems clear. Thanks.

That's my bar on this sort of thing. Thanks for looking.

@joshka joshka merged commit 9776002 into main Jun 11, 2026
25 checks passed
@joshka joshka deleted the joshka/scrollbar-docs branch June 11, 2026 23:51
joshka pushed a commit that referenced this pull request Jun 11, 2026
## 🤖 New release

* `tui-scrollbar`: 0.2.5 -> 0.2.6 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.2.6] - 2026-06-11

### 📚 Documentation

- *(scrollbar)* Improve API discovery
([#251](#251))
  > ## Summary
  >
  > - Improve `tui-scrollbar` crate docs for API discovery, styling
  > behavior, glyph selection, and interaction flow.
  > - Add a small `scrollbar_styled` example that shows distinct track,
  > thumb, and arrow styles for vertical and horizontal scrollbars.
  > - Configure docs.rs example scraping and add a regression test for
  > custom thumb styling on full and partial thumb cells.
  >
  > ## Details
  >
> This is a non-functional docs/examples/tests change. It reorganizes
the
> crate-level docs so important defaults and caveats are visible
earlier,
> replaces the loose `ScrollBar` “Key methods” list with a grouped
method
  > map, and adds canonical examples for the main builder methods.
  >
> The styling docs now spell out how `fg` and `bg` apply to terminal
glyph
  > cells. In particular, they call out that the default minimal track
  > renders spaces, so empty track cells show background color, while
> visible glyph sets can use foreground color for the track line. The
docs
> also note the partial-thumb caveat: when using visible tracks such as
  > `GlyphSet::box_drawing`, thumb background can show at partial glyph
  > edges, so matching it to the track background is usually less
  > surprising.
  >
  > The glyph docs keep repeated `Symbols for Legacy Computing` context
> where readers may land directly, rather than relying on linear reading
  > through the crate docs.
  >
  > Related context:
  >
  > - Issue #193: #193
  > - PR #201: #201
  >
  > ## Validation
  >
  > - `cargo test -p tui-scrollbar --all-features`
  > - `cargo test -p tui-scrollbar --doc --all-features`
  > - `cargo check -p tui-scrollbar --examples --all-features`
  > - `cargo clippy -p tui-scrollbar --all-targets --all-features`
  > - `RUSTDOCFLAGS='-D warnings' cargo doc -p tui-scrollbar --no-deps
  > --all-features`
  > - `just fmt-check`
  > - `cargo rdme --check --manifest-path tui-scrollbar/Cargo.toml`
  > - `markdownlint-cli2 tui-scrollbar/README.md`
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
joshka pushed a commit that referenced this pull request Jun 12, 2026
## 🤖 New release

* `tui-widgets`: 0.7.4 -> 0.7.5 (✓ API compatible changes)

<details><summary><i><b>Changelog</b></i></summary><p>

<blockquote>

## [0.7.5] - 2026-06-11

### 📚 Documentation

- *(scrollbar)* Improve API discovery
([#251](#251))
  > ## Summary
  >
  > - Improve `tui-scrollbar` crate docs for API discovery, styling
  > behavior, glyph selection, and interaction flow.
  > - Add a small `scrollbar_styled` example that shows distinct track,
  > thumb, and arrow styles for vertical and horizontal scrollbars.
  > - Configure docs.rs example scraping and add a regression test for
  > custom thumb styling on full and partial thumb cells.
  >
  > ## Details
  >
> This is a non-functional docs/examples/tests change. It reorganizes
the
> crate-level docs so important defaults and caveats are visible
earlier,
> replaces the loose `ScrollBar` “Key methods” list with a grouped
method
  > map, and adds canonical examples for the main builder methods.
  >
> The styling docs now spell out how `fg` and `bg` apply to terminal
glyph
  > cells. In particular, they call out that the default minimal track
  > renders spaces, so empty track cells show background color, while
> visible glyph sets can use foreground color for the track line. The
docs
> also note the partial-thumb caveat: when using visible tracks such as
  > `GlyphSet::box_drawing`, thumb background can show at partial glyph
  > edges, so matching it to the track background is usually less
  > surprising.
  >
  > The glyph docs keep repeated `Symbols for Legacy Computing` context
> where readers may land directly, rather than relying on linear reading
  > through the crate docs.
  >
  > Related context:
  >
  > - Issue #193: #193
  > - PR #201: #201
  >
  > ## Validation
  >
  > - `cargo test -p tui-scrollbar --all-features`
  > - `cargo test -p tui-scrollbar --doc --all-features`
  > - `cargo check -p tui-scrollbar --examples --all-features`
  > - `cargo clippy -p tui-scrollbar --all-targets --all-features`
  > - `RUSTDOCFLAGS='-D warnings' cargo doc -p tui-scrollbar --no-deps
  > --all-features`
  > - `just fmt-check`
  > - `cargo rdme --check --manifest-path tui-scrollbar/Cargo.toml`
  > - `markdownlint-cli2 tui-scrollbar/README.md`

### ⚙️ Miscellaneous Tasks

- *(tui-scrollbar)* Release v0.2.6
([#258](#258))
  > ## 🤖 New release
  >
  > * `tui-scrollbar`: 0.2.5 -> 0.2.6 (✓ API compatible changes)
  >
  > <details><summary><i><b>Changelog</b></i></summary><p>
  >
  > <blockquote>
  >
  > ## [0.2.6] - 2026-06-11
  >
  > ### 📚 Documentation
  >
  > - *(scrollbar)* Improve API discovery
  > ([#251](#251))
  >   > ## Summary
  >   >
  >   > - Improve `tui-scrollbar` crate docs for API discovery, styling
  >   > behavior, glyph selection, and interaction flow.
> > - Add a small `scrollbar_styled` example that shows distinct track,
  >   > thumb, and arrow styles for vertical and horizontal scrollbars.
> > - Configure docs.rs example scraping and add a regression test for
  >   > custom thumb styling on full and partial thumb cells.
  >   >
  >   > ## Details
  >   >
> > This is a non-functional docs/examples/tests change. It reorganizes
  > the
  > > crate-level docs so important defaults and caveats are visible
  > earlier,
  > > replaces the loose `ScrollBar` “Key methods” list with a grouped
  > method
  >   > map, and adds canonical examples for the main builder methods.
  >   >
  > > The styling docs now spell out how `fg` and `bg` apply to terminal
  > glyph
> > cells. In particular, they call out that the default minimal track
> > renders spaces, so empty track cells show background color, while
> > visible glyph sets can use foreground color for the track line. The
  > docs
> > also note the partial-thumb caveat: when using visible tracks such
as
> > `GlyphSet::box_drawing`, thumb background can show at partial glyph
  >   > edges, so matching it to the track background is usually less
  >   > surprising.
  >   >
> > The glyph docs keep repeated `Symbols for Legacy Computing` context
> > where readers may land directly, rather than relying on linear
reading
  >   > through the crate docs.
  >   >
  >   > Related context:
  >   >
  >   > - Issue #193: #193
  >   > - PR #201: #201
  >   >
  >   > ## Validation
  >   >
  >   > - `cargo test -p tui-scrollbar --all-features`
  >   > - `cargo test -p tui-scrollbar --doc --all-features`
  >   > - `cargo check -p tui-scrollbar --examples --all-features`
  >   > - `cargo clippy -p tui-scrollbar --all-targets --all-features`
> > - `RUSTDOCFLAGS='-D warnings' cargo doc -p tui-scrollbar --no-deps
  >   > --all-features`
  >   > - `just fmt-check`
  >   > - `cargo rdme --check --manifest-path tui-scrollbar/Cargo.toml`
  >   > - `markdownlint-cli2 tui-scrollbar/README.md`
  > </blockquote>
  >
  >
  > </p></details>
  >
  > ---
  > This PR was generated with
  > [release-plz](https://github.com/release-plz/release-plz/).
</blockquote>


</p></details>

---
This PR was generated with
[release-plz](https://github.com/release-plz/release-plz/).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

3 participants