`InlineBox`, inline content tracking issue
- Dominant language
- Rust
- Stars
- 48.2k
- Forks
- 4.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 171
Description
#### Initial PR in review
`InlineBox` and `InlineImage` #25710
This implements a `bevy_text` API using an `InlineBox` component that can be used to reserve space in text layouts for inline content. Also includes a limited inline image widget, `InlineImage`.
#### `InlineBox` improvements
- [ ] Picking support for inline boxes.
- [ ] `InlineBoxKind::CustomOutOfFlow` support. Like `OutOfFlow`, `CustomOutOfFlow` boxes don't take space in the layout, but also their positions are not determined by Parley either, which yields back control to the caller to determine where the box should be placed.
- [ ] Vertical alignment support. At the moment inline boxes always sits on the baseline. Parley has `vertical-align` support in review: https://github.com/linebender/parley/pull/766.
- [ ] Transform support for `InlineBox`. Could be tricky, might need some sort of new `InlineTransform` component.
- [ ] Anchor positioning. `OutOfFlow` boxes can be used to target a specific position in the text to attach a tooltip or popover.
#### `InlineImage` improvements
- [ ] Image flipping support.
- [ ] Texture atlas support.
- [ ] Custom sizing modes.
- [ ] Improve the `inline_image` example. Probably better done last, once there's something to show off.
- [ ] Text2d support.
#### Other `InlineBox` widgets
More complex widgets should probably be implemented as inline UI nodes. But each inline UI node would require creating a new layout context, which could be too heavy and expensive for more trivial widgets.
- [ ] Checkboxes
- [ ] Buttons
- [ ] Spacers. Just creates empty space. `InlineBox` can be used by itself for this, but it isn't ideal as it doesn't support responsive values.
- [ ] Filled Rectangles. Maybe with borders and rounded corners.
- [ ] Custom animated emotes. `bevy_text` already supports unicode emojis.
#### `bevy_ui` features
- [ ] Inline UI nodes. Basic idea: query for `Entity, (With, With)` and make each entity a new layout root with an implicit viewport the size of the `InlineBox`. This will have to wait until #25653 lands though.
#### Advanced (probably best left to third party crates)
- [ ] Inline math.
Contributor guide
Research direction
The issue names no files or tests; start by reviewing initial PR #25710 and the InlineBox/InlineImage checklist. Treat #25710 and dependency #25653 as context, then define one checklist item and its acceptance criteria before work begins.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100