-
-
Notifications
You must be signed in to change notification settings - Fork 19
Added API to remove and insert children #10
Conversation
b8bbbc5
to
a4c6f71
Compare
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.
This looks fine, and the reasoning around the need to process children makes sense.
What is missing is tests to validate the behavior. add()
is undertested at present (which is at least part of the reason that this problem appeared in the first place); but if we're adding APIs that push that aspect of layout extensively, we should add tests to validate everything works the way it should.
8e7fe0a
to
b2cdac9
Compare
Agreed. I have added simple checks to |
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.
Looks good; I'm not sure I follow about what specific tests you think could be added around modifying children after insertion; I'm pretty sure those should be covered by existing style mutation checks.
I was planning to still add a test for dimensions to be updated when a new child is inserted before existing ones. This was not working properly before this PR and wasn't caught be tests because there was no I'll have to look into how the style tests actually work and may open another PR for this. |
This PR adds an API to insert and remove children to / from a node.
Edit: The changes suggested here form the bases for PR #814 in toga.