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

Improve TextSpan docs #17415

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

rparrett
Copy link
Contributor

@rparrett rparrett commented Jan 17, 2025

Objective

Our TextSpan docs include a code example that does not actually "work." The code silently does not render anything, and the Text*Writer helpers fail.

This seems to be by design, because we can't use Text or Text2d from bevy_ui or bevy_sprite within docs in bevy_text. (Correct me if I am wrong)

I have seen multiple users confused by these docs.

Also fixes #16794

Solution

Remove the code example from TextSpan, and instead encourage users to seek docs on Text or Text2d.

Add examples with nested TextSpans in those areas.

@rparrett rparrett added the S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged label Jan 17, 2025
@rparrett rparrett added C-Docs An addition or correction to our documentation A-Text Rendering and layout for characters S-Needs-Review Needs reviewer attention (from anyone!) to move forward and removed S-Waiting-on-Author The author needs to make changes or address concerns before this can be merged labels Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Text Rendering and layout for characters C-Docs An addition or correction to our documentation S-Needs-Review Needs reviewer attention (from anyone!) to move forward
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TextUiReader requires a parent Text to function, despite TextSpan docs
2 participants