-
Notifications
You must be signed in to change notification settings - Fork 3
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
Image List visible column control #86
Conversation
src/nrtk_explorer/app/trame_utils.py
Outdated
return a != b | ||
|
||
|
||
def change_checker(state, key, callback, trigger_check=diff): |
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.
is a lambda possible here?
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.
Yes, changed to lambda.
return "transformed" not in old and "transformed" in new | ||
|
||
change_checker( | ||
self.state, "visible_columns", self.on_apply_transform, tranformed_became_visible |
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 trame updates visible_columns if the value is the same?
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.
Another thing is that I would defer from adding newer abstractions that attempts to avoid code repetition when the potential "repeating" code is not repeating yet. Meaning that if this is the only state variable that needs to check that the value has changing before updating it, we might as well handle this in its callback method.
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.
No.
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.
Another thing is that I would defer from adding newer abstractions that attempts to avoid code repetition when the potential "repeating" code is not repeating yet. Meaning that if this is the only state variable that needs to check that the value has changing before updating it, we might as well handle this in its callback method.
🧑🎓
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.
Other than the comments it looks great. Good work here :)
Does not compute transformed images if column is hidden.