bevy/crates/bevy_ui/src/widget
Rob Parrett adcc80c43d
Improve TextSpan docs (#17415)
# Objective

Our
[`TextSpan`](https://docs.rs/bevy/latest/bevy/prelude/struct.TextSpan.html)
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 `TextSpan`s in those areas.
2025-02-03 21:36:52 +00:00
..
button.rs Move required components doc to type doc (#16575) 2024-12-03 19:45:20 +00:00
image.rs Move TextureAtlas and friends into bevy_image (#17219) 2025-01-07 18:43:11 +00:00
label.rs Simpler lint fixes: makes ci lints work but disables a lint for now (#15376) 2024-09-24 11:42:59 +00:00
mod.rs Remove bevy_ui's "bevy_text" feature (#15951) 2024-10-16 16:43:57 +00:00
text.rs Improve TextSpan docs (#17415) 2025-02-03 21:36:52 +00:00