fix(show): render all coordinate systems for type-distributed elements#718
Merged
Conversation
#694) _resolve_coordinate_systems computed elements_to_be_rendered from the leaked loop variable cs (the last validated CS only). Since _get_elements_to_be_rendered keys on element type, a CS lacking a queued element type was wrongly pruned by _get_valid_cs when elements of that type lived in another CS. Union the elements across all coordinate systems instead. Regression test: an image in one CS and labels in another now render two panels (failed before: only the last CS survived).
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #718 +/- ##
==========================================
+ Coverage 77.13% 77.15% +0.02%
==========================================
Files 14 14
Lines 4457 4457
Branches 1023 1023
==========================================
+ Hits 3438 3439 +1
Misses 661 661
+ Partials 358 357 -1
🚀 New features to boost your workflow:
|
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.
Summary
Fixes #694.
_resolve_coordinate_systemscomputedelements_to_be_renderedfrom the leaked validation-loop variablecs— bound to the last coordinate system only. Because_get_elements_to_be_renderedkeys on element type (has_images/has_labels/…), a CS lacking a queued element type was wrongly pruned by_get_valid_cswhenever elements of that type lived in another CS. For multi-CS plots with type-distributed elements, a coordinate system that should have rendered was silently dropped.Fix
Union the elements across all coordinate systems before pruning (the comprehension scope also eliminates the leaked variable):
dict.fromkeysdedupes while preserving order.