Skip to content

Rewrite Text migration guide for 0.15 #1814

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

Merged
merged 3 commits into from
Nov 18, 2024

Conversation

alice-i-cecile
Copy link
Member

Fixes #1782.

This PR leans heavily on the migration guide provide by @MiniaczQ in bevyengine/bevy#15887 <3


__Accessing text spans by index__
- `ab_glyph` has been replaced with `cosmic-text`. These changes are mostly internal and the majority of users will not interact with either text backend directly.
- each text section is now stored as a distinct entity within the standard hierarchy, rather than as a `Vec<TextSection>` on the `Text` component. Children of `Text`/`Text2d` entities with `Text` `Text2d` components will act as additional text sections.
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps not a migration issue, but somewhere I think it useful to mention that since text sections are entities, you can now insert components on them, which is useful for things like:

  • Dynamically-computed text
  • Picking behavior
  • Animated text styles.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, this belongs in the release notes, not the migration guide.

Copy link
Contributor

@rparrett rparrett left a comment

Choose a reason for hiding this comment

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

Much improved. Couple notes:

There are so many changes to text that I think we could use a few quick before/afters:

  • Spawning some text
  • Spawning some text with multiple sections

The guide for 15368 also needs adjustment after 15857. It's content would also be better communicated with a diff, I think.

I wonder if we should be linking off to the required components blog post section for context in related migration guides.

@alice-i-cecile alice-i-cecile added this pull request to the merge queue Nov 18, 2024
Merged via the queue into bevyengine:main with commit 47660a9 Nov 18, 2024
10 checks passed
@alice-i-cecile alice-i-cecile deleted the textual-write branch November 18, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Migration Guide for 0.15 mentions UiTextWriter but it is not found when used.
5 participants