[PR #694] [CLOSED] Bump tui from 0.13.0 to 0.14.0 #980

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

📋 Pull Request Information

Original PR: https://github.com/Rigellute/spotify-tui/pull/694
Author: @dependabot-preview[bot]
Created: 1/4/2021
Status: Closed

Base: masterHead: dependabot/cargo/tui-0.14.0


📝 Commits (1)

  • 1a9b476 Bump tui from 0.13.0 to 0.14.0

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 Cargo.lock (+2 -2)
📝 Cargo.toml (+1 -1)

📄 Description

⚠️ Dependabot is rebasing this PR ⚠️

If you make any changes to it yourself then they will take precedence over the rebase.


Bumps tui from 0.13.0 to 0.14.0.

Release notes

Sourced from tui's releases.

v0.14.0

Breaking changes

New API for the Table widget

The Table widget got a lot of improvements that should make it easier to work with:

  • It should not longer panic when rendered on small areas.
  • Rows are now a collection of Cells, themselves wrapping a Text. This means you can style the entire Table, an entire Row, an entire Cell and rely on the styling capabilities of Text to get full control over the look of your Table.
  • Rows can have multiple lines.
  • The header is now optional and is just another Row always visible at the top.
  • Rows can have a bottom margin.
  • The header alignment is no longer off when an item is selected.

Taking the example of the code in examples/demo/ui.rs, this is what you may have to change:

     let failure_style = Style::default()
         .fg(Color::Red)
         .add_modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT);
-    let header = ["Server", "Location", "Status"];
     let rows = app.servers.iter().map(|s| {
         let style = if s.status == "Up" {
             up_style
         } else {
             failure_style
         };
-        Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style)
+        Row::new(vec![s.name, s.location, s.status]).style(style)
     });
-    let table = Table::new(header.iter(), rows)
+    let table = Table::new(rows)
+        .header(
+            Row::new(vec!["Server", "Location", "Status"])
+                .style(Style::default().fg(Color::Yellow))
+                .bottom_margin(1),
+        )
         .block(Block::default().title("Servers").borders(Borders::ALL))
-        .header_style(Style::default().fg(Color::Yellow))
         .widths(&[
             Constraint::Length(15),
             Constraint::Length(15),

Here, we had to:

  • Change the way we construct Row which is no longer an enum but a struct. It accepts anything that can be converted to an iterator of things that can be converted to a Cell
  • The header is no longer a required parameter so we use Table::header to set it. Table::header_style has been removed since the style can be directly set using
Changelog

Sourced from tui's changelog.

v0.14.0 - 2021-01-01

Breaking changes

New API for the Table widget

The Table widget got a lot of improvements that should make it easier to work with:

  • It should not longer panic when rendered on small areas.
  • Rows are now a collection of Cells, themselves wrapping a Text. This means you can style the entire Table, an entire Row, an entire Cell and rely on the styling capabilities of Text to get full control over the look of your Table.
  • Rows can have multiple lines.
  • The header is now optional and is just another Row always visible at the top.
  • Rows can have a bottom margin.
  • The header alignment is no longer off when an item is selected.

Taking the example of the code in examples/demo/ui.rs, this is what you may have to change:

     let failure_style = Style::default()
         .fg(Color::Red)
         .add_modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT);
-    let header = ["Server", "Location", "Status"];
     let rows = app.servers.iter().map(|s| {
         let style = if s.status == "Up" {
             up_style
         } else {
             failure_style
         };
-        Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style)
+        Row::new(vec![s.name, s.location, s.status]).style(style)
     });
-    let table = Table::new(header.iter(), rows)
+    let table = Table::new(rows)
+        .header(
+            Row::new(vec!["Server", "Location", "Status"])
+                .style(Style::default().fg(Color::Yellow))
+                .bottom_margin(1),
+        )
         .block(Block::default().title("Servers").borders(Borders::ALL))
-        .header_style(Style::default().fg(Color::Yellow))
         .widths(&[
             Constraint::Length(15),
             Constraint::Length(15),

Here, we had to:

  • Change the way we construct Row which is no longer an enum but a struct. It accepts anything that can be converted to an iterator of things that can be converted to a Cell
  • The header is no longer a required parameter so we use Table::header to set it.
Commits
  • f09863f Release v0.14.0
  • eb1e3be fix(widgets/block): make Block::inner return more accurate results on small a...
  • 4ec902b chore: make run-examples available on all platforms (#429)
  • 7424339 fix(widgets/table): draw table header and border even if rows are empty (#426)
  • e7f263e chore(ci): fix cargo-make cache on windows runner
  • 0991145 chore(ci): simplify ci workflow (#428)
  • 01d2a85 chore(ci): reduce the number of triggered jobs
  • 45431a2 chore: add first contributing guidelines
  • 0b78fb9 chore: use cargo-make in the CI as well
  • 9cdff27 chore: replace make with cargo-make
  • 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/694 **Author:** [@dependabot-preview[bot]](https://github.com/apps/dependabot-preview) **Created:** 1/4/2021 **Status:** ❌ Closed **Base:** `master` ← **Head:** `dependabot/cargo/tui-0.14.0` --- ### 📝 Commits (1) - [`1a9b476`](https://github.com/Rigellute/spotify-tui/commit/1a9b476ebe404032ffb57c344cf0a491c8c4cd3f) Bump tui from 0.13.0 to 0.14.0 ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+2 -2) 📝 `Cargo.toml` (+1 -1) </details> ### 📄 Description [//]: # (dependabot-start) ⚠️ **Dependabot is rebasing this PR** ⚠️ If you make any changes to it yourself then they will take precedence over the rebase. --- [//]: # (dependabot-end) Bumps [tui](https://github.com/fdehau/tui-rs) from 0.13.0 to 0.14.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/fdehau/tui-rs/releases">tui's releases</a>.</em></p> <blockquote> <h2>v0.14.0</h2> <h3>Breaking changes</h3> <h4>New API for the Table widget</h4> <p>The <code>Table</code> widget got a lot of improvements that should make it easier to work with:</p> <ul> <li>It should not longer panic when rendered on small areas.</li> <li><code>Row</code>s are now a collection of <code>Cell</code>s, themselves wrapping a <code>Text</code>. This means you can style the entire <code>Table</code>, an entire <code>Row</code>, an entire <code>Cell</code> and rely on the styling capabilities of <code>Text</code> to get full control over the look of your <code>Table</code>.</li> <li><code>Row</code>s can have multiple lines.</li> <li>The header is now optional and is just another <code>Row</code> always visible at the top.</li> <li><code>Row</code>s can have a bottom margin.</li> <li>The header alignment is no longer off when an item is selected.</li> </ul> <p>Taking the example of the code in <code>examples/demo/ui.rs</code>, this is what you may have to change:</p> <pre lang="diff"><code> let failure_style = Style::default() .fg(Color::Red) .add_modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT); - let header = [&quot;Server&quot;, &quot;Location&quot;, &quot;Status&quot;]; let rows = app.servers.iter().map(|s| { let style = if s.status == &quot;Up&quot; { up_style } else { failure_style }; - Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style) + Row::new(vec![s.name, s.location, s.status]).style(style) }); - let table = Table::new(header.iter(), rows) + let table = Table::new(rows) + .header( + Row::new(vec![&quot;Server&quot;, &quot;Location&quot;, &quot;Status&quot;]) + .style(Style::default().fg(Color::Yellow)) + .bottom_margin(1), + ) .block(Block::default().title(&quot;Servers&quot;).borders(Borders::ALL)) - .header_style(Style::default().fg(Color::Yellow)) .widths(&amp;[ Constraint::Length(15), Constraint::Length(15), </code></pre> <p>Here, we had to:</p> <ul> <li>Change the way we construct <a href="https://docs.rs/tui/*/tui/widgets/struct.Row.html"><code>Row</code></a> which is no longer an <code>enum</code> but a <code>struct</code>. It accepts anything that can be converted to an iterator of things that can be converted to a <a href="https://docs.rs/tui/*/tui/widgets/struct.Cell.html"><code>Cell</code></a></li> <li>The header is no longer a required parameter so we use <a href="https://docs.rs/tui/*/tui/widgets/struct.Table.html#method.header"><code>Table::header</code></a> to set it. <code>Table::header_style</code> has been removed since the style can be directly set using</li> </ul> <!-- raw HTML omitted --> </blockquote> </details> <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.14.0 - 2021-01-01</h2> <h3>Breaking changes</h3> <h4>New API for the Table widget</h4> <p>The <code>Table</code> widget got a lot of improvements that should make it easier to work with:</p> <ul> <li>It should not longer panic when rendered on small areas.</li> <li><code>Row</code>s are now a collection of <code>Cell</code>s, themselves wrapping a <code>Text</code>. This means you can style the entire <code>Table</code>, an entire <code>Row</code>, an entire <code>Cell</code> and rely on the styling capabilities of <code>Text</code> to get full control over the look of your <code>Table</code>.</li> <li><code>Row</code>s can have multiple lines.</li> <li>The header is now optional and is just another <code>Row</code> always visible at the top.</li> <li><code>Row</code>s can have a bottom margin.</li> <li>The header alignment is no longer off when an item is selected.</li> </ul> <p>Taking the example of the code in <code>examples/demo/ui.rs</code>, this is what you may have to change:</p> <pre lang="diff"><code> let failure_style = Style::default() .fg(Color::Red) .add_modifier(Modifier::RAPID_BLINK | Modifier::CROSSED_OUT); - let header = [&quot;Server&quot;, &quot;Location&quot;, &quot;Status&quot;]; let rows = app.servers.iter().map(|s| { let style = if s.status == &quot;Up&quot; { up_style } else { failure_style }; - Row::StyledData(vec![s.name, s.location, s.status].into_iter(), style) + Row::new(vec![s.name, s.location, s.status]).style(style) }); - let table = Table::new(header.iter(), rows) + let table = Table::new(rows) + .header( + Row::new(vec![&quot;Server&quot;, &quot;Location&quot;, &quot;Status&quot;]) + .style(Style::default().fg(Color::Yellow)) + .bottom_margin(1), + ) .block(Block::default().title(&quot;Servers&quot;).borders(Borders::ALL)) - .header_style(Style::default().fg(Color::Yellow)) .widths(&amp;[ Constraint::Length(15), Constraint::Length(15), </code></pre> <p>Here, we had to:</p> <ul> <li>Change the way we construct <a href="https://docs.rs/tui/*/tui/widgets/struct.Row.html"><code>Row</code></a> which is no longer an <code>enum</code> but a <code>struct</code>. It accepts anything that can be converted to an iterator of things that can be converted to a <a href="https://docs.rs/tui/*/tui/widgets/struct.Cell.html"><code>Cell</code></a></li> <li>The header is no longer a required parameter so we use <a href="https://docs.rs/tui/*/tui/widgets/struct.Table.html#method.header"><code>Table::header</code></a> to set it.</li> </ul> <!-- raw HTML omitted --> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/fdehau/tui-rs/commit/f09863faa0e9bf36955d3d2773b15b887ae32153"><code>f09863f</code></a> Release v0.14.0</li> <li><a href="https://github.com/fdehau/tui-rs/commit/eb1e3be7228509e42cbcbaef610e6bd5c5f64ba6"><code>eb1e3be</code></a> fix(widgets/block): make Block::inner return more accurate results on small a...</li> <li><a href="https://github.com/fdehau/tui-rs/commit/4ec902b96f850891b495ee610568d86d5ad58b04"><code>4ec902b</code></a> chore: make run-examples available on all platforms (<a href="https://github-redirect.dependabot.com/fdehau/tui-rs/issues/429">#429</a>)</li> <li><a href="https://github.com/fdehau/tui-rs/commit/74243394d90ea1316b6bedac6c9e4f26971c76b6"><code>7424339</code></a> fix(widgets/table): draw table header and border even if rows are empty (<a href="https://github-redirect.dependabot.com/fdehau/tui-rs/issues/426">#426</a>)</li> <li><a href="https://github.com/fdehau/tui-rs/commit/e7f263efa74ebab9b44d162e62e98d60f0ad7c00"><code>e7f263e</code></a> chore(ci): fix cargo-make cache on windows runner</li> <li><a href="https://github.com/fdehau/tui-rs/commit/0991145c5822e340ca273a82670d2d13ca306e6e"><code>0991145</code></a> chore(ci): simplify ci workflow (<a href="https://github-redirect.dependabot.com/fdehau/tui-rs/issues/428">#428</a>)</li> <li><a href="https://github.com/fdehau/tui-rs/commit/01d2a8588a10c68645ae1d8be9aad8c4b22c9314"><code>01d2a85</code></a> chore(ci): reduce the number of triggered jobs</li> <li><a href="https://github.com/fdehau/tui-rs/commit/45431a264951219497a02c9c2a3f990ec912ff97"><code>45431a2</code></a> chore: add first contributing guidelines</li> <li><a href="https://github.com/fdehau/tui-rs/commit/0b78fb9201fcde2ea26ab9178269ac61335cf967"><code>0b78fb9</code></a> chore: use <code>cargo-make</code> in the CI as well</li> <li><a href="https://github.com/fdehau/tui-rs/commit/9cdff275cbeeb4bb4942f147602018cb49ba88c7"><code>9cdff27</code></a> chore: replace <code>make</code> with <code>cargo-make</code></li> <li>Additional commits viewable in <a href="https://github.com/fdehau/tui-rs/compare/v0.13.0...v0.14.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.13.0&new-version=0.14.0)](https://dependabot.com/compatibility-score/?dependency-name=tui&package-manager=cargo&previous-version=0.13.0&new-version=0.14.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:54:02 +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#980
No description provided.