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

Remove taffy upgrade from release notes #1208

Merged
merged 3 commits into from
Jun 2, 2024

Conversation

alice-i-cecile
Copy link
Member

@nicoburns, I'd appreciate your review here for correctness and context :)

[`taffy`](https://crates.io/crates/taffy), the UI layout crate that we rely on, has had a major update.
In addition to various bug fixes, this brings two new pieces of functionality to users of `bevy_ui`:

1. `Display::Block`: use the [CSS block layout model](https://www.w3schools.com/css/css_display_visibility.asp) to layout UI nodes. Elements will start on a new line, and take up the whole width. Great for in-line images!

Choose a reason for hiding this comment

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

This is not great for inline images! We need "inline" layout for that. This just does vertical block layout. IMO the primary use case would be matching the layout of an existing UI ported from web. Otherwise you're better off using Flexbox.

Choose a reason for hiding this comment

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

For inline we'll need something like linebender/parley#67 (or similar support in cosmic text)

In addition to various bug fixes, this brings two new pieces of functionality to users of `bevy_ui`:

1. `Display::Block`: use the [CSS block layout model](https://www.w3schools.com/css/css_display_visibility.asp) to layout UI nodes. Elements will start on a new line, and take up the whole width. Great for in-line images!
2. `Overflow::Hidden`: if elements overflow their container, they will be completely hidden, rather than shown or clipped.

Choose a reason for hiding this comment

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

There isn't really any difference between "hidden" and "clipped" in this sentence. In Taffy difference between overflow: hidden and overflow: clip is primarily that overflow: hidden turns off the automatic minimum size of a flexbox or grid child. Again, the main benefit here is that overflow: hidden will match overflow: hidden on the web (overflow: clip is arguably often what you want but isn't widely used on the web because it's much newer than "hidden").

@@ -1 +1,5 @@
TODO
[`taffy`](https://crates.io/crates/taffy), the UI layout crate that we rely on, has had a major update.

Choose a reason for hiding this comment

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

Doesn't affect content in this PR (except the filename), but it's worth noting that the upgrade is now to 0.5 rather than 0.4

@alice-i-cecile alice-i-cecile changed the title Initial taffy notes Remove taffy upgrade from release notes Jun 2, 2024
@alice-i-cecile
Copy link
Member Author

Yeah, I would agree. Changes in 0.4 were mostly under the hood (improvements to the low-level api traits). And 0.5 was just bugfix release that required a breaking change.

Removing entirely, per discussion with @nicoburns on Discord

@alice-i-cecile alice-i-cecile added S-Ready-For-Final-Review Ready for a maintainer to consider for merging and removed S-Needs-Review labels Jun 2, 2024
@alice-i-cecile alice-i-cecile added this pull request to the merge queue Jun 2, 2024
Merged via the queue into bevyengine:main with commit d6b8131 Jun 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Release-Notes C-Content S-Ready-For-Final-Review Ready for a maintainer to consider for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants