You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rparrett opened this issue
Oct 21, 2023
· 0 comments
· Fixed by #10303
Labels
A-UIGraphical user interfaces, styles, layouts, and widgetsC-DocsAn addition or correction to our documentationD-TrivialNice and easy! A great choice to get started with Bevy
Specifically, AlignContent::SpaceEvenly is quite confusing, but we should look over all variants and look for ways to make them less confusing and more consistent.
The language used in AlignContent is not consistent with the language used in JustifyContent, and the language used among variants in each is not consistent.
The corresponding fields of Style link off to the MDN docs which are worded very precisely, but are confusing in their own way. The enums or their variants don't have this link. We may want to at least link to MDN for the enums themselves (every variant seems excessive) as well.
/// The items are packed in their default position as if no alignment was applied
Default,
/// Items are packed toward the start of the axis.
Start,
/// Items are packed toward the end of the axis.
End,
/// Pushed towards the start, unless the flex direction is reversed; then pushed towards the end.
FlexStart,
/// Pushed towards the end, unless the flex direction is reversed; then pushed towards the start.
FlexEnd,
/// Centered along the main axis.
Center,
/// Remaining space is distributed between the items.
SpaceBetween,
/// Remaining space is distributed around the items.
SpaceAround,
/// Like [`JustifyContent::SpaceAround`] but with even spacing between items.
SpaceEvenly,
}
The text was updated successfully, but these errors were encountered:
rparrett
added
C-Docs
An addition or correction to our documentation
D-Trivial
Nice and easy! A great choice to get started with Bevy
A-UI
Graphical user interfaces, styles, layouts, and widgets
labels
Oct 21, 2023
# Objective
- Address inconsistent term usage in the docs for the alignment
properties for UI nodes. Fixes#10218
- `JustifyContent::Stretch` is missing despite being supported by Taffy,
being as the default value for Grids, so it should be added to Bevy as
well
## Solution
- Consistently provide links to the mdn site for the css equivalent
- Match (mostly) the documentation given on the pub struct and the
underlying enums
- Use the term `items` consistently to refer each child in the container
- Add `JustifyContent::Stretch` and map it to Taffy
## Migration Guide
- The `JustifyContents` enum has been expanded to include
`JustifyContents::Stretch`.
# Objective
- Address inconsistent term usage in the docs for the alignment
properties for UI nodes. Fixesbevyengine#10218
- `JustifyContent::Stretch` is missing despite being supported by Taffy,
being as the default value for Grids, so it should be added to Bevy as
well
## Solution
- Consistently provide links to the mdn site for the css equivalent
- Match (mostly) the documentation given on the pub struct and the
underlying enums
- Use the term `items` consistently to refer each child in the container
- Add `JustifyContent::Stretch` and map it to Taffy
## Migration Guide
- The `JustifyContents` enum has been expanded to include
`JustifyContents::Stretch`.
# Objective
- Address inconsistent term usage in the docs for the alignment
properties for UI nodes. Fixesbevyengine#10218
- `JustifyContent::Stretch` is missing despite being supported by Taffy,
being as the default value for Grids, so it should be added to Bevy as
well
## Solution
- Consistently provide links to the mdn site for the css equivalent
- Match (mostly) the documentation given on the pub struct and the
underlying enums
- Use the term `items` consistently to refer each child in the container
- Add `JustifyContent::Stretch` and map it to Taffy
## Migration Guide
- The `JustifyContents` enum has been expanded to include
`JustifyContents::Stretch`.
A-UIGraphical user interfaces, styles, layouts, and widgetsC-DocsAn addition or correction to our documentationD-TrivialNice and easy! A great choice to get started with Bevy
How can Bevy's documentation be improved?
Specifically,
AlignContent::SpaceEvenly
is quite confusing, but we should look over all variants and look for ways to make them less confusing and more consistent.The language used in
AlignContent
is not consistent with the language used inJustifyContent
, and the language used among variants in each is not consistent.The corresponding fields of
Style
link off to the MDN docs which are worded very precisely, but are confusing in their own way. The enums or their variants don't have this link. We may want to at least link to MDN for the enums themselves (every variant seems excessive) as well.For convenience:
bevy/crates/bevy_ui/src/ui_node.rs
Lines 565 to 594 in 61bad4e
bevy/crates/bevy_ui/src/ui_node.rs
Lines 606 to 628 in 61bad4e
The text was updated successfully, but these errors were encountered: