-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to protocol 2.1.0 (echo_update) #251
Conversation
AntoinePrv
commented
Jan 27, 2023
- Add comments around the update protocol
- Unconditionally send echo_update on front_end change
- Update protocol version
@SylvainCorlay @martinRenou @maartenbreddels @jasongrout this is a PR to add the |
af91126
to
cc06068
Compare
|
||
xtl::xoptional<bool> xcommon::global_echo_update() | ||
{ | ||
static const auto out = get_tristate_env("JUPYTER_WIDGETS_ECHO"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to check "on", "true", "yes", "1"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that was only for ipywidgets 7, where we had to opt in for backwards compatibility . I think in ipywidgets 8 there is no op in or out anymore. But not 100% sure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wrong, it's still in, and the bar for accepting values was set quite high: https://github.com/jupyter-widgets/ipywidgets/blob/main/python/ipywidgets/ipywidgets/widgets/widget.py#L29 :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
bool is_true_string(const char* str) | ||
{ | ||
const std::string s = tolower(trim(str)); | ||
static const auto trues = {"true", "on", "yes", "1"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm curious, why aren't we mirroring the logic in Jupyter Widgets and Jupyter Core of testing for the absence of negative values instead of the presence of positive values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed there is no reason. I did not have all that context at the time of writing, we can change that.