Skip to content

Conversation

@bmorris3
Copy link
Collaborator

@bmorris3 bmorris3 commented Nov 17, 2025

On initialization, Sidecar(ref=reference_widget) validates the reference widget's anchor, to ensure that a anchor='right' widget can't be used as a reference.

Before this PR, if a user explicitly set ref=None in the constructor, ref has no anchor attribute, and the validation raises an error.

This PR checks for initialization with ref is None, and skips validation if so.

Demo example:

from sidecar import Sidecar
from ipywidgets import widgets

with Sidecar(anchor='split-bottom', title='a', ref=None):
    display(widgets.Button())

The demo above doesn't work before this PR, and does work after this PR.

Copy link
Member

@martinRenou martinRenou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@martinRenou martinRenou added the bug Something isn't working label Nov 18, 2025
@martinRenou martinRenou merged commit b81c09c into jupyter-widgets:master Nov 18, 2025
6 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants