-
Notifications
You must be signed in to change notification settings - Fork 23
Send profvis output to editor #988
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
Changes from 3 commits
e98f232
0c4af7f
5aea33f
d28e119
9877008
d3189a6
db02e6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| # | ||
| # options.R | ||
| # | ||
| # Copyright (C) 2023-2024 Posit Software, PBC. All rights reserved. | ||
| # Copyright (C) 2023-2025 Posit Software, PBC. All rights reserved. | ||
| # | ||
| # | ||
|
|
||
|
|
@@ -36,3 +36,12 @@ options(plumber.docs.callback = function(url) { | |
| options(shiny.launch.browser = function(url) { | ||
| .ps.ui.showUrl(url) | ||
| }) | ||
|
|
||
| # Show Profvis output in the viewer | ||
| options(profvis.print = function(x) { | ||
| # Render the HTML content to a temporary file | ||
| tmp_file <- htmltools::html_print(x, viewer = NULL) | ||
|
||
|
|
||
| # Pass the file to the viewer | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is rather annoying that it doesn't resize. It means the window of text that you are reading is quite small to read. It does resize in RStudio, I wonder what is different there? Screen.Recording.2025-12-15.at.2.03.40.PM.mov
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the nudge, I think I figured it out ... the trick is to force it to render in standalone mode by rendering to tags first. (That's not how RStudio does it, but works here.) db02e6f |
||
| .ps.Call("ps_html_viewer", tmp_file, "R Profile", -1L, "editor") | ||
| }) | ||


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.
Probably worth a note that
hmtltoolsis an (indirect) dependency of profvisThere 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.
Agreed