Skip to content

Conversation

ickshonpe
Copy link
Contributor

@ickshonpe ickshonpe commented Jan 25, 2023

Objective

An example that demonstrates how the AlignItems and JustifyContent properties can be composed to layout text.

text_layout_example

@alice-i-cecile alice-i-cecile added C-Examples An addition or correction to our examples A-UI Graphical user interfaces, styles, layouts, and widgets C-Testing A change that impacts how we test Bevy or how users test their apps labels Jan 26, 2023
Copy link
Member

@alice-i-cecile alice-i-cecile left a comment

Choose a reason for hiding this comment

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

Super useful, both for learning and for checking that our code works. I love it.

@alice-i-cecile
Copy link
Member

Nits:

  1. We should use different colors: red/green is notoriously hard for color blind folks.
  2. We should list in the module-level docs what the colors mean.
  3. We should consider adding a legend to the rendered image iteslf.

Copy link
Contributor

@Carter0 Carter0 left a comment

Choose a reason for hiding this comment

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

This would have saved me about 2 days of work lol.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Jan 27, 2023
    * Switched to more a colorblind friendly color scheme
    * Swapped rows and columns and changed the orders of the variant values
    * Added a key
    * Added a window title
    * Updated example descriptions in readme and cargo.toml
@alice-i-cecile
Copy link
Member

@ickshonpe I'll merge this once CI is passing. Like it suggests, run

cargo run -p build-example-pages -- update

@alice-i-cecile
Copy link
Member

Ah, and now it's complaining about the freshly stabilized formatting lint 😅

@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Jan 27, 2023
## Objective

An example that demonstrates how the `AlignItems` and `JustifyContent` properties can be composed to layout text.

<img width="654" alt="text_layout_example" src="https://user-images.githubusercontent.com/27962798/215116345-daa8ef60-634b-40c6-9b6d-356de3af620c.png">
@bors bors bot changed the title UI text layout example [Merged by Bors] - UI text layout example Jan 27, 2023
@bors bors bot closed this Jan 27, 2023
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
## Objective

An example that demonstrates how the `AlignItems` and `JustifyContent` properties can be composed to layout text.

<img width="654" alt="text_layout_example" src="https://user-images.githubusercontent.com/27962798/215116345-daa8ef60-634b-40c6-9b6d-356de3af620c.png">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-UI Graphical user interfaces, styles, layouts, and widgets C-Examples An addition or correction to our examples C-Testing A change that impacts how we test Bevy or how users test their apps S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants