Skip to content

Conversation

maartenbreddels
Copy link
Member

Every TextRenderer shares the same Expr (by default). This means that if I create two text renderers, and change the expression on one, it also changes the expression in the other TextRenderer.e.g.

tr1 = TextRenderer()
tr2 = TextRenderer()
tr1.text_color.value = "'red'"
# now tr2.text_color.value is also red, bad UX I think

I think this should behave analogous to say a .layout widget, where they are not shared.

To be honest, this is not the original reason to create this PR. In solara, we cannot have widgets created at import time, since each user would share the same widget, which breaks ipydatagrid in solara.

I hope one of the two reasons is compelling enough :)

@maartenbreddels
Copy link
Member Author

Originally introduced in #35 by @martinRenou

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
Copy link
Member

The commit I made from the Github interface has not been signed off, sorry for that! You will probably need to edit that commit (maybe you can also squash all commits into a single signed off one)

@maartenbreddels
Copy link
Member Author

ok, squashed them, but needs you approval again :)

@maartenbreddels
Copy link
Member Author

Looks like this collides with this https://github.com/jupyter-widgets/ipywidgets/pull/3358/files
I think we should open a separate PR and fix main/master first. What do you think @martinRenou ?

@martinRenou
Copy link
Member

It's odd that we did not hit that before. PRs were green a couple of weeks ago. Thanks for the pointer! I agree we should probably fix master first.

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants