Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename TextAlignment #8666

Closed
wants to merge 2 commits into from

Conversation

ickshonpe
Copy link
Contributor

Objective

Fixes #8659

Solution

Rename TextAlignment to MultiLineAlignment.

Other names considered:

  • TextMultiLineAlignment: too long?

  • MultiLineArrangement: Less ambiguous, but "arrangement" not common terminology.


Changelog

  • Renamed TextAlignment to MultiLineAlignment and rewrote its doc comments.

Migration Guide

TextAlignment has been renamed to MultiLineAlignment.

* Renamed `TextAlignment` to `MultiLineAlignment` and rewrote its doc comments.
@alice-i-cecile alice-i-cecile added C-Docs An addition or correction to our documentation A-UI Graphical user interfaces, styles, layouts, and widgets C-Usability A targeted quality-of-life change that makes Bevy easier to use M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide labels May 24, 2023
@UkoeHB
Copy link
Contributor

UkoeHB commented May 24, 2023

What about LongTextAlignment or TextBlockAlignment?

@JMS55
Copy link
Contributor

JMS55 commented May 26, 2023

I'm in favor of TextMultiLineAlignment. Verbose is fine. The original issue was due to a too-terse name to begin with.

Copy link
Contributor

@nicopap nicopap left a comment

Choose a reason for hiding this comment

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

I'd prefer if we dropped the uppercase on Line (MultilineAlignment over MultiLineAlignment) (according to wiktionary "multiline" is a real word. Even if I don't trust wiktionary on this, I still think Multiline is better)

But I'm fine if it gets merged with the inelegant casing. I've been bitten so many time by CSS's weird naming of alignment properties, no reason to reproduce this nonsense in bevy.

@rparrett
Copy link
Contributor

Rust naming guidelines would seem to agree with nicopap.

@rparrett
Copy link
Contributor

I believe this was done in #10854 instead.

@rparrett rparrett closed this Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Docs An addition or correction to our documentation C-Usability A targeted quality-of-life change that makes Bevy easier to use M-Needs-Migration-Guide A breaking change to Bevy's public API that needs to be noted in a migration guide
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextAlignment has no effect on text alignment, only controls justification for multi-line texts
6 participants