[PR #530] [CLOSED] Bump tui from 0.9.5 to 0.10.0 #879

Closed
opened 2026-02-28 14:53:41 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/530
Author: @dependabot-preview[bot]
Created: 7/20/2020
Status: Closed

Base: masterHead: dependabot/cargo/tui-0.10.0


📝 Commits (1)

  • 41904b5 Bump tui from 0.9.5 to 0.10.0

📊 Changes

2 files changed (+4 additions, -15 deletions)

View changed files

📝 Cargo.lock (+3 -14)
📝 Cargo.toml (+1 -1)

📄 Description

Bumps tui from 0.9.5 to 0.10.0.

Changelog

Sourced from tui's changelog.

v0.10.0 - 2020-07-17

Breaking changes

Easier cursor management

A new method has been added to Frame called set_cursor. It lets you specify where the cursor should be placed after the draw call. Furthermore like any other widgets, if you do not set a cursor position during a draw call, the cursor is automatically hidden.

For example:

fn draw_input(f: &mut Frame, app: &App) {
  if app.editing {
    let input_width = app.input.width() as u16;
    // The cursor will be placed just after the last character of the input
    f.set_cursor((input_width + 1, 0));
  } else {
    // We are no longer editing, the cursor does not have to be shown, set_cursor is not called and
    // thus automatically hidden.
  }
}

In order to make this possible, the draw closure takes in input &mut Frame instead of mut Frame.

Advanced text styling

It has been reported several times that the text styling capabilities were somewhat limited in many places of the crate. To solve the issue, this release includes a new set of text primitives that are now used by a majority of widgets to provide flexible text styling.

Text is replaced by the following types:

  • Span: a string with a unique style.
  • Spans: a string with multiple styles.
  • Text: a multi-lines string with multiple styles.

However, you do not always need this complexity so the crate provides From implementations to let you use simple strings as a default and switch to the previous primitives when you need additional styling capabilities.

For example, the title of a Block can be set in the following ways:

// A title with no styling
Block::default().title("My title");
// A yellow title
Block::default().title(Span::styled("My title", Style::default().fg(Color::Yellow)));
// A title where "My" is bold and "title" is a simple string
</tr></table> ... (truncated)
Commits
  • 6504930 Release v0.10.0
  • 6b52c91 chore: update CHANGELOG
  • 0ffea49 refactor: implement cascading styles
  • 72ba4ff refactor(examples): remove unecessary terminal.hide_cursor calls
  • 88c4b19 feat(text): add new text primitives
  • 112d2a6 feat(widgets/paragraph): add option to preserve indentation when the text is ...
  • d999c1b feat(widgets/paragraph): Add horizontal scroll (#329)
  • 3aa8b9a Implement patch between two StyleDiff
  • fdbea9e fix(widgets/canvas): avoid panic on zero-width bounds
  • 6204edd fix(readme): typo in demo section
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
  • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
  • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
  • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
  • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language
  • @dependabot badge me will comment on this PR with code to add a "Dependabot enabled" badge to your readme

Additionally, you can set the following in your Dependabot dashboard:

  • Update frequency (including time of day and day of week)
  • Pull request limits (per update run and/or open at any time)
  • Out-of-range updates (receive only lockfile updates, if desired)
  • Security updates (receive only security updates, if desired)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Rigellute/spotify-tui/pull/530 **Author:** [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview) **Created:** 7/20/2020 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dependabot/cargo/tui-0.10.0` --- ### 📝 Commits (1) - [`41904b5`](https://github.com/Rigellute/spotify-tui/commit/41904b59d34d40301e707e27e443e3ee74ee3d31) Bump tui from 0.9.5 to 0.10.0 ### 📊 Changes **2 files changed** (+4 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+3 -14) 📝 `Cargo.toml` (+1 -1) </details> ### 📄 Description Bumps [tui](https://github.com/fdehau/tui-rs) from 0.9.5 to 0.10.0. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/fdehau/tui-rs/blob/master/CHANGELOG.md">tui's changelog</a>.</em></p> <blockquote> <h2>v0.10.0 - 2020-07-17</h2> <h3>Breaking changes</h3> <h4>Easier cursor management</h4> <p>A new method has been added to <code>Frame</code> called <code>set_cursor</code>. It lets you specify where the cursor should be placed after the draw call. Furthermore like any other widgets, if you do not set a cursor position during a draw call, the cursor is automatically hidden.</p> <p>For example:</p> <pre lang="rust"><code>fn draw_input(f: &amp;mut Frame, app: &amp;App) { if app.editing { let input_width = app.input.width() as u16; // The cursor will be placed just after the last character of the input f.set_cursor((input_width + 1, 0)); } else { // We are no longer editing, the cursor does not have to be shown, set_cursor is not called and // thus automatically hidden. } } </code></pre> <p>In order to make this possible, the draw closure takes in input <code>&amp;mut Frame</code> instead of <code>mut Frame</code>.</p> <h4>Advanced text styling</h4> <p>It has been reported several times that the text styling capabilities were somewhat limited in many places of the crate. To solve the issue, this release includes a new set of text primitives that are now used by a majority of widgets to provide flexible text styling.</p> <p><code>Text</code> is replaced by the following types:</p> <ul> <li><code>Span</code>: a string with a unique style.</li> <li><code>Spans</code>: a string with multiple styles.</li> <li><code>Text</code>: a multi-lines string with multiple styles.</li> </ul> <p>However, you do not always need this complexity so the crate provides <code>From</code> implementations to let you use simple strings as a default and switch to the previous primitives when you need additional styling capabilities.</p> <p>For example, the title of a <code>Block</code> can be set in the following ways:</p> <pre lang="rust"><code>// A title with no styling Block::default().title(&quot;My title&quot;); // A yellow title Block::default().title(Span::styled(&quot;My title&quot;, Style::default().fg(Color::Yellow))); // A title where &quot;My&quot; is bold and &quot;title&quot; is a simple string &lt;/tr&gt;&lt;/table&gt; ... (truncated) </code></pre> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/fdehau/tui-rs/commit/6504930888c9c5337e7e065c964f87b60d16a7d7"><code>6504930</code></a> Release v0.10.0</li> <li><a href="https://github.com/fdehau/tui-rs/commit/6b52c91257f9073e4fe913f15bee0716b45dfd0d"><code>6b52c91</code></a> chore: update CHANGELOG</li> <li><a href="https://github.com/fdehau/tui-rs/commit/0ffea495b1c64f4f443f81249d73e97964d1a0ab"><code>0ffea49</code></a> refactor: implement cascading styles</li> <li><a href="https://github.com/fdehau/tui-rs/commit/72ba4ff2d45d1e436dbfde31b2791aa15a9097b5"><code>72ba4ff</code></a> refactor(examples): remove unecessary <code>terminal.hide_cursor</code> calls</li> <li><a href="https://github.com/fdehau/tui-rs/commit/88c4b191fba7922a3ef3bf4205be2a685e80cb48"><code>88c4b19</code></a> feat(text): add new text primitives</li> <li><a href="https://github.com/fdehau/tui-rs/commit/112d2a65f67e0305c43573ca0ae5cafbf882835b"><code>112d2a6</code></a> feat(widgets/paragraph): add option to preserve indentation when the text is ...</li> <li><a href="https://github.com/fdehau/tui-rs/commit/d999c1b434e10c41580a3f539f2cadccd9933bd4"><code>d999c1b</code></a> feat(widgets/paragraph): Add horizontal scroll (<a href="https://github-redirect.dependabot.com/fdehau/tui-rs/issues/329">#329</a>)</li> <li><a href="https://github.com/fdehau/tui-rs/commit/3aa8b9a2598f211c5b5bf64be86517d8c3ec3419"><code>3aa8b9a</code></a> Implement <code>patch</code> between two <code>StyleDiff</code></li> <li><a href="https://github.com/fdehau/tui-rs/commit/fdbea9e2ee98747f01341c9bf66cd6defaf3bcf4"><code>fdbea9e</code></a> fix(widgets/canvas): avoid panic on zero-width bounds</li> <li><a href="https://github.com/fdehau/tui-rs/commit/6204eddadef418136b0b960989c838db7d869a8a"><code>6204edd</code></a> fix(readme): typo in demo section</li> <li>Additional commits viewable in <a href="https://github.com/fdehau/tui-rs/compare/v0.9.5...v0.10.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://api.dependabot.com/badges/compatibility_score?dependency-name=tui&package-manager=cargo&previous-version=0.9.5&new-version=0.10.0)](https://dependabot.com/compatibility-score/?dependency-name=tui&package-manager=cargo&previous-version=0.9.5&new-version=0.10.0) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language - `@dependabot badge me` will comment on this PR with code to add a "Dependabot enabled" badge to your readme Additionally, you can set the following in your Dependabot [dashboard](https://app.dependabot.com): - Update frequency (including time of day and day of week) - Pull request limits (per update run and/or open at any time) - Out-of-range updates (receive only lockfile updates, if desired) - Security updates (receive only security updates, if desired) </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-28 14:53:41 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/spotify-tui#879
No description provided.