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.
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
feat: Added AlignComponent layout component #2350
feat: Added AlignComponent layout component #2350
Changes from all commits
53f4356
3aa006f
890d05a
9714ceb
94c2d2d
73c15b1
fa19f88
1805cb2
d2e2e23
560dd4c
a624018
4037bcb
2e92194
d838f52
d7aa2c1
6fe90f7
b62481c
f4a6963
34a1fd5
62e45c7
da5ac3b
4e964af
002383d
10aa5e9
775de23
b4b8b7c
1690d0c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this check optimize anything? The foreach should also just do a check if it is empty right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasChildren
avoids instantiating aComponentSet
object in case it is null.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we do that check inside the
.children
getter instead?that way we avoid duplicating this all over & everyone gets the performance boost (even end users)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(can be a separate PR of course)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
.children
property returns aComponentSet
right now, which means it must create a component set in case it is currently missing. We could change it to return aComponentSet?
instead, but that would be a major breaking change I'm afraid -- so perhaps we could add that to our 2.0 todo list.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha I think 3 people commented about this on this PR, maybe it would be better as nullable indeed, let's discuss that for V2 at least. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a note about this in #1938