Skip to content

fix(shapes,labels): re-add outline bool toggle#750

Merged
timtreis merged 4 commits into
mainfrom
fix/issue-748-outline-bool
Jul 10, 2026
Merged

fix(shapes,labels): re-add outline bool toggle#750
timtreis merged 4 commits into
mainfrom
fix/issue-748-outline-bool

Conversation

@timtreis

@timtreis timtreis commented Jul 10, 2026

Copy link
Copy Markdown
Member

Fixes #748.

Problem

outline was dropped from render_shapes/render_labels in favor of inferring
outline visibility from outline_alpha/outline_width/outline_color. It kept
working silently only because **kwargs swallowed it; once **kwargs was removed,
every outline=... call became a TypeError, breaking notebooks
(notebook_labels_shapes_interchangeability) and downstream code.

Fix

Re-introduce outline as a first-class tri-state convenience toggle:

  • None (default): infer visibility from the outline_* 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).

outline is authoritative over inference; the detail params only control how the
outline looks. Applied to both render_shapes and render_labels via a shared
resolver in _color.py.

Backward compatibility

Additive — new optional param defaults to None, so any call that doesn't pass
outline is unchanged. Restores previously-valid outline=True/False calls.

timtreis added 4 commits July 7, 2026 14:55
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.
@timtreis timtreis merged commit 076eeac into main Jul 10, 2026
4 of 8 checks passed
@timtreis timtreis deleted the fix/issue-748-outline-bool branch July 10, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

render_shapes() got an unexpected keyword argument 'outline'

1 participant