From 23516bce76af91586b697db339da6b895c9e7151 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Wed, 21 Aug 2024 11:35:08 -0700 Subject: [PATCH] chore: rename ratatui-org to ratatui (#1334) All urls updated to point at https://github.com/ratatui To update your repository remotes, you can run the following commands: ```shell git remote set-url origin https://github.com/ratatui/ratatui ``` --- .github/CODEOWNERS | 9 +- BREAKING-CHANGES.md | 106 +- CHANGELOG.md | 2695 +++++++++++++++--------------- CONTRIBUTING.md | 10 +- Cargo.toml | 4 +- README.md | 46 +- RELEASE.md | 10 +- SECURITY.md | 2 +- benches/main/barchart.rs | 2 +- benches/main/block.rs | 2 +- benches/main/list.rs | 4 +- benches/main/paragraph.rs | 2 +- benches/main/sparkline.rs | 2 +- cliff.toml | 6 +- clippy.toml | 2 +- examples/README.md | 70 +- examples/async.rs | 8 +- examples/barchart-grouped.rs | 6 +- examples/barchart.rs | 6 +- examples/block.rs | 8 +- examples/calendar.rs | 6 +- examples/canvas.rs | 6 +- examples/chart.rs | 6 +- examples/colors.rs | 6 +- examples/colors_rgb.rs | 6 +- examples/constraint-explorer.rs | 6 +- examples/constraints.rs | 6 +- examples/custom_widget.rs | 6 +- examples/demo/main.rs | 6 +- examples/demo2/main.rs | 6 +- examples/demo2/tabs/weather.rs | 2 +- examples/docsrs.rs | 6 +- examples/flex.rs | 6 +- examples/gauge.rs | 6 +- examples/hello_world.rs | 6 +- examples/hyperlink.rs | 8 +- examples/inline.rs | 6 +- examples/layout.rs | 6 +- examples/line_gauge.rs | 6 +- examples/list.rs | 6 +- examples/minimal.rs | 10 +- examples/modifiers.rs | 6 +- examples/panic.rs | 6 +- examples/paragraph.rs | 6 +- examples/popup.rs | 6 +- examples/ratatui-logo.rs | 6 +- examples/scrollbar.rs | 6 +- examples/sparkline.rs | 6 +- examples/table.rs | 6 +- examples/tabs.rs | 6 +- examples/tracing.rs | 6 +- examples/user_input.rs | 6 +- examples/vhs/generate.bash | 2 +- src/backend.rs | 4 +- src/backend/crossterm.rs | 6 +- src/backend/termion.rs | 4 +- src/backend/termwiz.rs | 2 +- src/buffer/buffer.rs | 2 +- src/buffer/cell.rs | 2 +- src/layout/layout.rs | 4 +- src/lib.rs | 44 +- src/style/color.rs | 2 +- src/text/line.rs | 12 +- src/text/span.rs | 4 +- src/widgets.rs | 6 +- src/widgets/block.rs | 6 +- src/widgets/chart.rs | 2 +- src/widgets/list/list.rs | 2 +- src/widgets/list/rendering.rs | 2 +- src/widgets/list/state.rs | 2 +- src/widgets/paragraph.rs | 8 +- src/widgets/scrollbar.rs | 2 +- src/widgets/table/table.rs | 4 +- src/widgets/table/table_state.rs | 2 +- typos.toml | 2 +- 75 files changed, 1663 insertions(+), 1657 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index adff7d25..2118c578 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,8 +1,11 @@ -# See https://help.github.com/articles/about-codeowners/ +# See + # for more info about CODEOWNERS file # It uses the same pattern rule for gitignore file -# https://git-scm.com/docs/gitignore#_pattern_format + +# # Maintainers -* @ratatui-org/maintainers + +* @ratatui/maintainers diff --git a/BREAKING-CHANGES.md b/BREAKING-CHANGES.md index f771710f..012a5592 100644 --- a/BREAKING-CHANGES.md +++ b/BREAKING-CHANGES.md @@ -4,7 +4,7 @@ This document contains a list of breaking changes in each version and some notes between versions. It is compiled manually from the commit history and changelog. We also tag PRs on GitHub with a [breaking change] label. -[breaking change]: (https://github.com/ratatui-org/ratatui/issues?q=label%3A%22breaking+change%22) +[breaking change]: (https://github.com/ratatui/ratatui/issues?q=label%3A%22breaking+change%22) ## Summary @@ -69,14 +69,14 @@ This is a quick summary of the sections below: ### `Backend::size` returns `Size` instead of `Rect` ([#1254]) -[#1254]: https://github.com/ratatui-org/ratatui/pull/1254 +[#1254]: https://github.com/ratatui/ratatui/pull/1254 The `Backend::size` method returns a `Size` instead of a `Rect`. There is no need for the position here as it was always 0,0. ### `Backend` trait migrates to `get/set_cursor_position` ([#1284]) -[#1284]: https://github.com/ratatui-org/ratatui/pull/1284 +[#1284]: https://github.com/ratatui/ratatui/pull/1284 If you just use the types implementing the `Backend` trait, you will see deprecation hints but nothing is a breaking change for you. @@ -87,7 +87,7 @@ and a default implementation for them exists. ### Ratatui now requires Crossterm 0.28.0 ([#1278]) -[#1278]: https://github.com/ratatui-org/ratatui/pull/1278 +[#1278]: https://github.com/ratatui/ratatui/pull/1278 Crossterm is updated to version 0.28.0, which is a semver incompatible version with the previous version (0.27.0). Ratatui re-exports the version of crossterm that it is compatible with under @@ -95,8 +95,8 @@ version (0.27.0). Ratatui re-exports the version of crossterm that it is compati ### `Axis::labels()` now accepts `IntoIterator>` ([#1273] and [#1283]) -[#1273]: https://github.com/ratatui-org/ratatui/pull/1173 -[#1283]: https://github.com/ratatui-org/ratatui/pull/1283 +[#1273]: https://github.com/ratatui/ratatui/pull/1173 +[#1283]: https://github.com/ratatui/ratatui/pull/1283 Previously Axis::labels accepted `Vec`. Any code that uses conversion methods that infer the type will need to be rewritten as the compiler cannot infer the correct type. @@ -108,7 +108,7 @@ type will need to be rewritten as the compiler cannot infer the correct type. ### `Layout::init_cache` no longer returns bool and takes a `NonZeroUsize` instead of `usize` ([#1245]) -[#1245]: https://github.com/ratatui-org/ratatui/pull/1245 +[#1245]: https://github.com/ratatui/ratatui/pull/1245 ```diff - let is_initialized = Layout::init_cache(100); @@ -117,7 +117,7 @@ type will need to be rewritten as the compiler cannot infer the correct type. ### `ratatui::terminal` module is now private ([#1160]) -[#1160]: https://github.com/ratatui-org/ratatui/pull/1160 +[#1160]: https://github.com/ratatui/ratatui/pull/1160 The `terminal` module is now private and can not be used directly. The types under this module are exported from the root of the crate. This reduces clashes with other modules in the backends that @@ -130,21 +130,21 @@ are also named terminal, and confusion about module exports for newer Rust users ### `ToText` no longer has a lifetime ([#1234]) -[#1234]: https://github.com/ratatui-org/ratatui/pull/1234 +[#1234]: https://github.com/ratatui/ratatui/pull/1234 This change simplifies the trait and makes it easier to implement. ### `Frame::size` is deprecated and renamed to `Frame::area` -[#1293]: https://github.com/ratatui-org/ratatui/pull/1293 +[#1293]: https://github.com/ratatui/ratatui/pull/1293 `Frame::size` is renamed to `Frame::area` as it's the more correct name. -## [v0.27.0](https://github.com/ratatui-org/ratatui/releases/tag/v0.27.0) +## [v0.27.0](https://github.com/ratatui/ratatui/releases/tag/v0.27.0) ### List no clamps the selected index to list ([#1159]) -[#1149]: https://github.com/ratatui-org/ratatui/pull/1149 +[#1149]: https://github.com/ratatui/ratatui/pull/1149 The `List` widget now clamps the selected index to the bounds of the list when navigating with `first`, `last`, `previous`, and `next`, as well as when setting the index directly with `select`. @@ -205,11 +205,11 @@ A change is only necessary if you were matching on all variants of the `MouseEve wildcard. In this case, you need to either handle the two new variants, `MouseLeft` and `MouseRight`, or add a wildcard. -[#1106]: https://github.com/ratatui-org/ratatui/pull/1106 +[#1106]: https://github.com/ratatui/ratatui/pull/1106 ### `Rect::inner` takes `Margin` directly instead of reference ([#1008]) -[#1008]: https://github.com/ratatui-org/ratatui/pull/1008 +[#1008]: https://github.com/ratatui/ratatui/pull/1008 `Margin` needs to be passed without reference now. @@ -223,7 +223,7 @@ wildcard. In this case, you need to either handle the two new variants, `MouseLe ### `Buffer::filled` takes `Cell` directly instead of reference ([#1148]) -[#1148]: https://github.com/ratatui-org/ratatui/pull/1148 +[#1148]: https://github.com/ratatui/ratatui/pull/1148 `Buffer::filled` moves the `Cell` instead of taking a reference. @@ -234,14 +234,14 @@ wildcard. In this case, you need to either handle the two new variants, `MouseLe ### `Stylize::bg()` now accepts `Into` ([#1103]) -[#1103]: https://github.com/ratatui-org/ratatui/pull/1103 +[#1103]: https://github.com/ratatui/ratatui/pull/1103 Previously, `Stylize::bg()` accepted `Color` but now accepts `Into`. This allows more flexible types from calling scopes, though it can break some type inference in the calling scope. ### Remove deprecated `List::start_corner` and `layout::Corner` ([#759]) -[#759]: https://github.com/ratatui-org/ratatui/pull/759 +[#759]: https://github.com/ratatui/ratatui/pull/759 `List::start_corner` was deprecated in v0.25. Use `List::direction` and `ListDirection` instead. @@ -264,7 +264,7 @@ flexible types from calling scopes, though it can break some type inference in t ### `LineGauge::gauge_style` is deprecated ([#565]) -[#565]: https://github.com/ratatui-org/ratatui/pull/1148 +[#565]: https://github.com/ratatui/ratatui/pull/1148 `LineGauge::gauge_style` is deprecated and replaced with `LineGauge::filled_style` and `LineGauge::unfilled_style`: @@ -275,11 +275,11 @@ let gauge = LineGauge::default() + .unfilled_style(Style::default().fg(Color::White)); ``` -## [v0.26.0](https://github.com/ratatui-org/ratatui/releases/tag/v0.26.0) +## [v0.26.0](https://github.com/ratatui/ratatui/releases/tag/v0.26.0) ### `Flex::Start` is the new default flex mode for `Layout` ([#881]) -[#881]: https://github.com/ratatui-org/ratatui/pull/881 +[#881]: https://github.com/ratatui/ratatui/pull/881 Previously, constraints would stretch to fill all available space, violating constraints if necessary. @@ -300,7 +300,7 @@ existing layouts with `Flex::Start`. However, to get old behavior, use `Flex::Le ### `Table::new()` now accepts `IntoIterator>>` ([#774]) -[#774]: https://github.com/ratatui-org/ratatui/pull/774 +[#774]: https://github.com/ratatui/ratatui/pull/774 Previously, `Table::new()` accepted `IntoIterator>`. The argument change to `IntoIterator>>`, This allows more flexible types from calling scopes, though it @@ -317,7 +317,7 @@ This can be resolved either by providing an explicit type (e.g. `Vec::::new ### `Tabs::new()` now accepts `IntoIterator>>` ([#776]) -[#776]: https://github.com/ratatui-org/ratatui/pull/776 +[#776]: https://github.com/ratatui/ratatui/pull/776 Previously, `Tabs::new()` accepted `Vec` where `T: Into>`. This allows more flexible types from calling scopes, though it can break some type inference in the calling scope. @@ -333,7 +333,7 @@ by removing the call to `.collect()`. ### Table::default() now sets segment_size to None and column_spacing to ([#751]) -[#751]: https://github.com/ratatui-org/ratatui/pull/751 +[#751]: https://github.com/ratatui/ratatui/pull/751 The default() implementation of Table now sets the column_spacing field to 1 and the segment_size field to `SegmentSize::None`. This will affect the rendering of a small amount of apps. @@ -343,7 +343,7 @@ To use the previous default values, call `table.segment_size(Default::default()) ### `patch_style` & `reset_style` now consumes and returns `Self` ([#754]) -[#754]: https://github.com/ratatui-org/ratatui/pull/754 +[#754]: https://github.com/ratatui/ratatui/pull/754 Previously, `patch_style` and `reset_style` in `Text`, `Line` and `Span` were using a mutable reference to `Self`. To be more consistent with the rest of `ratatui`, which is using fluent @@ -369,7 +369,7 @@ The following example shows how to migrate for `Line`, but the same applies for ### `Block` style methods cannot be used in a const context ([#720]) -[#720]: https://github.com/ratatui-org/ratatui/pull/720 +[#720]: https://github.com/ratatui/ratatui/pull/720 Previously the `style()`, `border_style()` and `title_style()` methods could be used to create a `Block` in a constant context. These now accept `Into