Add gridbox children to children_ #1070
Open
KenReneris wants to merge 2 commits intoArthurSonzogni:mainfrom
Open
Add gridbox children to children_ #1070KenReneris wants to merge 2 commits intoArthurSonzogni:mainfrom
KenReneris wants to merge 2 commits intoArthurSonzogni:mainfrom
Conversation
added 2 commits
June 28, 2025 08:51
…ion when a flex node is in the grid
Owner
ArthurSonzogni
left a comment
There was a problem hiding this comment.
Thanks!
It looks like there is definitely a bug that this patch is fixing (adding elements as children). However I do not understand the parts about flexbox_helper.
| // Cells | ||
| if ((x % 2) == 1 && (y % 2) == 1) { | ||
| it = std::move(it) | flex_shrink; | ||
| // it = std::move(it) | flex_shrink; //it = std::move(it) | flex_shrink; |
Owner
There was a problem hiding this comment.
Could you please remove the comment line and explain why removing this? (This sounds wrong to me)
| }; | ||
|
|
||
| void Compute(std::vector<Element>* elements, int target_size); | ||
| void Compute(std::vector<Element>* elements, int target_size, bool hack=false); |
Owner
There was a problem hiding this comment.
Why do you need hack? What is this?
| for (const auto &element : line) { | ||
| children_.push_back( element ); | ||
| } | ||
| } |
Owner
There was a problem hiding this comment.
This sounds useful to support flexbox and selection. Thanks!
Is there any regression tests in gridbox_test.cpp we could add to show the impact of this patch?
3bdbccd to
11f7132
Compare
ArthurSonzogni
added a commit
that referenced
this pull request
Feb 15, 2026
This ensures that the gridbox implements correctly the non overriden functions from the base class. Thanks to @KenReneris for the report and the patch. Bug:#1070
Owner
|
I merged the first part of this patch! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix so layout will iterate when there's a flex element inside of a gridbox that grows it's box size on the y axis. (Allows need_iteration_ to work from Flexbox::SetBox() that's within the grid so that layout will re-run as the box grows)