-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Text Rework cleanup #15887
Text Rework cleanup #15887
Conversation
I'm also thinking whether this should reintroduce deprecated |
I really like most of these changes :) If we revert the TextUi change IMO it's uncontroversial. |
Yes please! |
You added a new example but didn't add metadata for it. Please update the root Cargo.toml file. |
a58c01c
to
695a9f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine. I'd prefer if TextUiReader/Writer
was just called TextReader/Writer
but then we'd need to rename the underlying type. It's not worth fussing over for now.
Objective
Cleanup naming and docs, add missing migration guide after #15591
All text root nodes now use
Text
(UI) /Text2d
.All text readers/writers use
Text<Type>Reader
/Text<Type>Writer
convention.Migration Guide
Doubles as #15591 migration guide.
Text bundles (
TextBundle
andText2dBundle
) were removed in favor ofText
andText2d
.Shared configuration fields were replaced with
TextLayout
,TextFont
andTextColor
components.Just
TextBundle
's additional field turned intoTextNodeFlags
component,while
Text2dBundle
's additional fields turned intoTextBounds
andAnchor
components.Text sections were removed in favor of hierarchy-based approach.
For root text entities with
Text
orText2d
components, child entities withTextSpan
will act as additional text sections.To still access text spans by index, use the new
TextUiReader
,Text2dReader
andTextUiWriter
,Text2dWriter
system parameters.