Skip to content
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

Handle value uses publish execution result #24

Merged
merged 8 commits into from
Dec 4, 2023

Conversation

romainfrancois
Copy link
Contributor

instead of display() which has to be called explicitly

if (isTRUE(last_visible)) {
obj <- .Last.value

mimetypes <- if (getOption('jupyter.rich_display')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

perhaps this should only be text/plain. I need to look how things are done e.g in 🐍

@romainfrancois romainfrancois force-pushed the handle_value_publish_execution_result branch from e3f015e to ed7c1be Compare December 4, 2023 08:39
@romainfrancois
Copy link
Contributor Author

This can be followed up, but the idea of the pull request is that only the last expression is being auto-printed, and goes through publish_execution_result() so that this is aligned with the test strategy we inherited from the 🍪.

  • This departs from IRkernel is doing
  • This has a workaround for ggplot because the plotting only gets triggered by the print()ing so we have to force print them
  • This also means that more fancy bundles have to be explicitly asked for, with display()

closes #33

@romainfrancois
Copy link
Contributor Author

This needs some follow up to handle html widgets, but I'll open a new PR

@romainfrancois romainfrancois merged commit 1ee82b0 into main Dec 4, 2023
2 checks passed
@romainfrancois romainfrancois deleted the handle_value_publish_execution_result branch December 4, 2023 10:39
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.

1 participant