-
Notifications
You must be signed in to change notification settings - Fork 76
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
data-menu: handle associated data layer logic #3370
Conversation
# so also hide the child-layer | ||
layer.visible = False | ||
|
||
if visible and (parent_label := self.app._get_assoc_data_parent(layer_label)): |
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 am the walrus.
if visible and (parent_label := self.app._get_assoc_data_parent(layer_label)): | ||
# ensure the parent layer is also visible | ||
self.set_layer_visibility(parent_label, visible=True) |
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 mean that you can make a DQ layer visible for a data entry that is currently invisible, and doing so also toggles the parent layer visibility? I think you can't do that in the current data menu, but I don't oppose to choosing that behavior going forward.
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. The current data-menu disables the ability to set a child-of-a-non-visible-parent to visible. That's also an option here, but since we don't (yet) have the design to visually tie them and don't have a clear way to denote that in the UI, I figured this might be a reasonable alternative. What would you prefer?
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 it's good like this.
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!
If this comment works out, please use that approach in the test.
Description
This pull request implements logic to ensure a parent data layer is visible when enabling a child data-layer and to hide child layers when disabling the parent data-layer.
Change log entry
CHANGES.rst
? If you want to avoid merge conflicts,list the proposed change log here for review and add to
CHANGES.rst
before merge. If no, maintainershould add a
no-changelog-entry-needed
label.Checklist for package maintainer(s)
This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.
trivial
label.