fix(shapes,labels): re-add outline bool toggle#750
Merged
Conversation
The `outline` parameter was removed in favor of inferring outline visibility from outline_alpha/outline_width/outline_color. It kept working silently only because **kwargs swallowed it; removing **kwargs turned every outline=... call into a TypeError, breaking notebooks and downstream code. Re-introduce `outline` as a first-class convenience toggle (tri-state): - None (default): infer visibility from the outline_* detail params (no change). - True: force outline on, defaulting any unset detail param. - False: force outline off, overriding detail params (warns on conflict). outline is authoritative over inference; detail params only control how the outline looks. Applied to both render_shapes and render_labels.
Add PlotTester golden-baseline tests covering the render output of the outline bool toggle: outline=True draws an outline, outline=False suppresses it. Baselines to be generated from CI artifacts.
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.
Fixes #748.
Problem
outlinewas dropped fromrender_shapes/render_labelsin favor of inferringoutline visibility from
outline_alpha/outline_width/outline_color. It keptworking silently only because
**kwargsswallowed it; once**kwargswas removed,every
outline=...call became aTypeError, breaking notebooks(
notebook_labels_shapes_interchangeability) and downstream code.Fix
Re-introduce
outlineas a first-class tri-state convenience toggle:None(default): infer visibility from theoutline_*detail params — no behavior change.True: force outline on, defaulting any unset detail param (alpha 1.0, width 1.5, black).False: force outline off, overriding detail params (warns on conflict).outlineis authoritative over inference; the detail params only control how theoutline looks. Applied to both
render_shapesandrender_labelsvia a sharedresolver in
_color.py.Backward compatibility
Additive — new optional param defaults to
None, so any call that doesn't passoutlineis unchanged. Restores previously-validoutline=True/Falsecalls.