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 layout_flexbox function from prelude #415

Merged
merged 2 commits into from
Apr 10, 2023

Conversation

Weibye
Copy link
Collaborator

@Weibye Weibye commented Apr 8, 2023

Objective

The prelude contained a single method that has been kept around for backwards compatibility. It is simply a wrapper around FlexboxAlgorithm::perform_layout(). The idiomatic way to use taffy now and going forward is to use the perform_layout() on the trait so I don't think we need to keep this around for much longer.

The migration path is also very simple, but it is a breaking change.

Feedback wanted

Are there any reasons why we would not want this? Or want to delay this? I know #326 might change how end users interact with taffy, and so we might want to bundle these changes together?

@Weibye Weibye changed the title Cleanup prelude Cleanup prelude to make taffy more idiomatic Apr 8, 2023
@alice-i-cecile alice-i-cecile added breaking-change A change that breaks our public interface usability Make the library more comfortable to use labels Apr 8, 2023
Copy link
Collaborator

@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.

I like these changes. @nicoburns, what are your plans for the next breaking release? I think we should probably hold off on this PR until we have a better reason for a breaking release.

@nicoburns
Copy link
Collaborator

I like these changes. @nicoburns, what are your plans for the next breaking release? I think we should probably hold off on this PR until we have a better reason for a breaking release.

My plan is roughly to include the following:

I'm pretty happy to accept breaking changes into main at this point (but agree that we should hold off on actually releasing them). We have the 0.3.x branch that we can use to backport non-breaking bugfixes if need be (@alice-i-cecile - did you ever make those config changes to disable "merge committing" PRs but enable pushing directly to 0.x.y branches for maintainers?)


Finally, I would note that I'm not sure that the current FlexboxAlgorithm-like interfaces make sense either, as I've found it awkward to make all of the layout algorithms conform to a single LayoutAlgorithm trait. So I would expect there to be further changes to the "low-level" public API prior to a 0.4 release. I think that being the case actually makes now a good time to remove this method though, as we'll be making breaking changes in this area anyway.

Copy link
Collaborator

@nicoburns nicoburns left a comment

Choose a reason for hiding this comment

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

Rustfmt and markdown lints need to be fixed.

RELEASES.md Outdated Show resolved Hide resolved
@Weibye Weibye force-pushed the chore/cleanup-prelude branch from fa39693 to c5d69a6 Compare April 10, 2023 06:19
@Weibye Weibye requested a review from nicoburns April 10, 2023 06:34
@nicoburns nicoburns changed the title Cleanup prelude to make taffy more idiomatic Remove layout_flexbox function from prelude Apr 10, 2023
@nicoburns nicoburns enabled auto-merge (squash) April 10, 2023 11:51
@nicoburns nicoburns merged commit c3b8fc5 into DioxusLabs:main Apr 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change A change that breaks our public interface usability Make the library more comfortable to use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants