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

Update taffy requirement from 0.3.10 to 0.4.1 #12704

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Mar 25, 2024

Updates the requirements on taffy to permit the latest version.

Release notes

Sourced from taffy's releases.

v0.4.1

  • Fixed: CSS Grid track sizing not respecting growth limits in some circumstances (#624)
Changelog

Sourced from taffy's changelog.

0.4.1

  • Fixed: CSS Grid track sizing not respecting growth limits in some circumstances (#624)

0.4.0

Highlights

  • Support for CSS Block layout (display: block)
  • Support for the overflow property (+ scrollbar_width for overflow: scroll)
  • Improved measure function API
  • Completely refactored low-level API
  • Simplified module hierarchy (+ most types/functions are now exported from the crate root)
  • Expanded set of examples which better document integration with other layout systems (e.g. text layout)
  • Computed values for padding and border are now output into the Layout struct

Block layout

Support for CSS Block layout has been added. This can be used via the new Display::Block variant of the Display enum. Note that full flow layout: inline, inline-block and float layout have not been implemented. The use case supported is block container nodes which contain block-level children.

Overflow property

Support has been added for a new overflow style property with Visible, Clip, Hidden, and Scroll values (Auto is not currently implemented). Additionally a scrollbar_width property has been added to control the size of scrollbars for nodes with Overflow::Scroll set.

  • Overflow is settable indpendently in each axis.
  • Visible and Clip will produce layouts equivalent to the Taffy 0.3. Clip will affect the new content_size output by restricting it to the available space.
  • Hidden and Scroll affect layout by changing the automatic minimum size of Flexbox and Grid children
  • Scroll additionally reserves scrollbar_width pixels for a scrollbar in the opposite axis to which scrolling is enabled. Scroll with scrollbar_width set to zero is equivalent to Hidden.

Measure function changes

The "measure function" API for integrating Taffy with other measurement systems (such as text layout) has been changed to be more flexible and to interact better with borrow checking (you can now borrow external data in your measure function!).

  • There are no longer per-node measure functions.
  • There is now a single "global" measure function, and a per-node "context" of a user-defined type
  • The Taffy tree is now a generic TaffyTree<T> where T is the "context" type.
  • The measure function is now called for all leaf nodes (nodes without children). If you wish to maintain compatibility with the previous behaviour then your measure function should return Size::ZERO for leaf nodes whose context is None.

If you are not using measure functions, then the only change you will need to make is from:

let mut tree = Taffy::new();

to

let mut tree : TaffyTree<()> = TaffyTree::new();
</tr></table> 

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [taffy](https://github.com/DioxusLabs/taffy) to permit the latest version.
- [Release notes](https://github.com/DioxusLabs/taffy/releases)
- [Changelog](https://github.com/DioxusLabs/taffy/blob/main/RELEASES.md)
- [Commits](DioxusLabs/taffy@v0.3.10...v0.4.1)

---
updated-dependencies:
- dependency-name: taffy
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added the C-Dependencies A change to the crates that Bevy depends on label Mar 25, 2024
@SolarLiner SolarLiner added the S-Adopt-Me The original PR author has no intent to complete this work. Pick me up! label Mar 25, 2024
@nicoburns
Copy link
Contributor

Closing in favour of #10690

@nicoburns nicoburns closed this Mar 26, 2024
Copy link
Contributor Author

dependabot bot commented on behalf of github Mar 26, 2024

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version. You can also ignore all major, minor, or patch releases for a dependency by adding an ignore condition with the desired update_types to your config file.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

@dependabot dependabot bot deleted the dependabot/cargo/taffy-0.4.1 branch March 26, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-Dependencies A change to the crates that Bevy depends on S-Adopt-Me The original PR author has no intent to complete this work. Pick me up!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants