Misleading namings in `bevy_text`
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
## Problem
The names of some of the components in `bevy_text` are confusing and inconsistent:
* `TextLayoutInfo`
Contains the final computed text layout. The `-Info` suffix is redundant and potentially confusing.
* `TextLayout`
Holds the settings for text justification and line breaking. Not the layout.
* `ComputedTextBlock`
This 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.
## Suggestions
Renamings:
* `TextLayoutInfo` -> `ComputedTextLayout`
* `ComputedTextBlock` -> `TextBuffer`
Remove the `TextLayout` component.
`JustifyText` and `LineBreak` become components `Require`d by `Text` and `Text2d`.
Contributor guide
Research direction
Start in the `bevy_text` module and trace references to `TextLayoutInfo`, `TextLayout`, `ComputedTextBlock`, `JustifyText`, and `LineBreak`. The work is complete when the proposed renamings and component removal are applied consistently, with `JustifyText` and `LineBreak` required by `Text` and `Text2d`.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100