fix: respect the visibility property on shapes - #499
Merged
deeplook merged 1 commit intoJul 31, 2026
Conversation
Shapes carrying visibility="hidden" (or "collapse"), either directly or inherited from an ancestor, were still rendered. renderNode only checked the display property. The visibility value is now resolved with findAttr, which walks the style attribute and ancestors, so inheritance and a visible override on a child both work. Adds a regression test covering the presentation attribute, the style form, inheritance from a group and a visible child override. Closes deeplook#359
Owner
|
Thanks for the fix and the thorough regression test — merging. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #359
renderNodeonly consulteddisplay, so a shape withvisibility="hidden"was still rendered. The value is now resolved withfindAttr, which reads thestyleattribute and walks ancestors, so inheritance from a group and avisibility="visible"override on a child both behave correctly;collapseis treated as hidden too.Regression test added in
tests/test_basic.pynext to thedisplay:nonetest — it fails without the one-line change and passes with it.This change was prepared with AI assistance; the regression test was run locally and fails without the fix.