-
-
Notifications
You must be signed in to change notification settings - Fork 689
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
Add a clear
method that removes all children.
#1893
Conversation
Signed-off-by: Kyle Rich <yutakafrog@gmail.com>
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 implementation looks good; now we just need the rest of the owl :-)
Two pieces are missing:
- A change note - a file in the
changes
directory that provides the release note for this improvement. See the contribution guide for details on what is needed - A test. core/tests/widgets/test_base.py has a suite of tests validating that child removal works; we need an additional set of tests for this new API. We need to validate that clear works for (a) a widget that has children, (b) a widget that can have children, but doesn't; and (c) a leaf node that can't have children.
Signed-off-by: Kyle Rich <yutakafrog@gmail.com>
Signed-off-by: Kyle Rich <yutakafrog@gmail.com>
Yup, just working through the contribution guide, little bit at a time. :) |
The base widget documentation includes this block: Reference
---------
.. autoclass:: toga.widgets.base.Widget
:members:
:undoc-members:
:inherited-members: Am I to understand that this will automatically slurp up the docstring of my new method and I don't need to manually do anything for this new method to be documented? |
Signed-off-by: Kyle Rich <yutakafrog@gmail.com>
@freakboy3742 I think this is ready for re-review. よろしくお願いします! |
OK, so the Travertino Raising the error is preferable to silently doing a noop, 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.
Looks good to me! Thanks for the fix!
Hello! I don't mean to be inpatient, but if this feature will be done soon, I also don't want to spend time completing my project when this is exactly what I need! Is there a timeline for completion? I saw that there were a couple things left to do, but not sure how long that will take. |
@wafaa09 Umm... the PR has been merged. It's done. It hasn't been released in a stable release of Toga, but there's no more work to be done. If you want a pre-release version you can install the |
Awesome, thank you for letting me know! |
Fixes #1828
PR Checklist: