Skip to content

feat!: rename Alignment to HorizontalAlignment and add VerticalAlignment#1735

Merged
orhun merged 1 commit intomainfrom
jm/vertical-alignment
Apr 6, 2025
Merged

feat!: rename Alignment to HorizontalAlignment and add VerticalAlignment#1735
orhun merged 1 commit intomainfrom
jm/vertical-alignment

Conversation

@joshka
Copy link
Copy Markdown
Member

@joshka joshka commented Mar 24, 2025

We don't anticipate removing or deprecating the type alias in the near
future, but it is recommended to update your imports to use the new
name.

Added a VerticalAlignment enum to make the API more consistent. We don't
have a specific use case for it yet, but it's better to add it now and
be able to use it in the future.

BREAKING-CHANGE: The Alignment enum has been renamed to
HorizontalAlignment to better reflect its purpose. A type alias has
been added to maintain backwards compatibility, however there are some
cases where type aliases are not enough to maintain backwards
compatibility. E.g. when using glob imports to import all the enum
variants. This should not affect most users, but it is recommended to
update your imports to use the new name.

- use ratatui::layout::Alignment;
+ use ratatui::layout::HorizontalAlignment;

- use Alignment::*;
+ use HorizontalAlignment::*;

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Breaking Change This change will cause application code to break and must be noted in the breaking changes docs etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants