-
Notifications
You must be signed in to change notification settings - Fork 15
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
Lazy-docs #919
base: main
Are you sure you want to change the base?
Lazy-docs #919
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #919 +/- ##
==========================================
+ Coverage 68.26% 68.28% +0.01%
==========================================
Files 110 110
Lines 6211 6211
==========================================
+ Hits 4240 4241 +1
+ Misses 1971 1970 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Thanks for the docs, it's very helpful to get the whole picture of the design, and for reviewing the PR.
I added some quick comments. I am going to review the lazy-loading PR, and may add more comments later.
It is also used by the advanced panel to register the sub-sections of the advanced settings (e.g. magnetization, hubbard, etc.). | ||
|
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 you explain a bit more?
# Controller methods | ||
# EXAMPLE | ||
def _on_trait_change(self, change): | ||
# Update widgets based on model changes | ||
... |
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 think you also need to show how the widgets in the UI trigger the model update.
@tl.observe(tl.All) | ||
def _on_any_change(self, change): | ||
if change and change["name"] != "confirmed": | ||
self._unconfirm() |
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 you also explain _on_any_change
? What is any
?
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.
tl.All
watches ALL traits. So ANY trait change triggers this, hence _on_any_change
🙂 Will make it more verbose in the docs 👍
578a997
to
a65beed
Compare
1a4741c
to
55fe31a
Compare
55fe31a
to
3689c7c
Compare
d8bde58
to
b8d3997
Compare
This PR provides documentation to accompany the changes made in the lazy-loading PR (#802)