Conversation
…block` or `layout`. Renamed them.
TextLayoutInfo -> ComputedTextLayout ComputedTextBlock -> TextBuffer Remove the TextLayout component. `JustifyText` and `LineBreak` are now components `Require`d by `Text` and `Text2d`.
|
Your PR caused a change in the graphical output of an example or rendering test. This might be intentional, but it could also mean that something broke! If it's expected, please add the M-Deliberate-Rendering-Change label. If this change seems unrelated to your PR, you can consider updating your PR to target the latest main branch, either by rebasing or merging main into it. |
|
Just noting that this seems to be going in the opposite direction of a sentiment expressed here: #15014 (comment) with regard to the new I think this might merit more discussion to reduce potential churn. The main issue I am seeing with |
Ah yeah this was heavily discussed there and also in #15591 and #15797, I wasn't aware of that. I think this needs review from the people involved in those discussions. |
|
I agree with Also, the fact |
Objective
The names of some of the components in bevy_text are confusing and inconsistent:
TextLayoutInfoContains the final computed text layout. The -Info suffix is redundant and potentially confusing.
TextLayoutHolds the settings for text justification and line breaking. Not the layout.
ComputedTextBlockThis holds the cosmic-text buffer. The name suggests that it contains the final result of a text relayout, but the buffer can be out-of-date until it is updated during the text schedule.
Solution
TextLayoutInfo->ComputedTextLayoutComputedTextBlock->TextBufferTextLayout.JustifyTextandLineBreakinto components.JustifyTextandLineBreakonTextandText2d.Fixes #19467