Integrate httpgd#620
Conversation
Cannot reproduce the delay on macOS. It is probably caused by the plot is a quite comprehensive with too many elements. |
|
With the latest commit, the resizing seems a bit problematic that if you repeat running the same plot (e.g. |
Thanks for noting! |
renkun-ken
left a comment
There was a problem hiding this comment.
LGTM. Thanks for the great work!
|
@ManuelHentschel Would you like to update |
|
Thanks for the thorough testing and constructive feedback @renkun-ken! |
|
Great work @ManuelHentschel! |
|
Thanks for the feedback! A quick way to achieve 1. and 2. is to e.g. comment out the line https://github.com/Ikuyadeu/vscode-R/blob/master/html/httpgd/styleOverwrites.css#L9 and change https://github.com/Ikuyadeu/vscode-R/blob/master/html/httpgd/style.css#L53 to I'll also add proper commands/options for this. Regarding 3., in nx10/httpgd#69 a modular renderering approach is being implemented that will allow exporting to a number of different formats. When this is merged in httpgd, we'll also add corresponding options in vscode-R. |
|
The dynamic styling is basically just a proof of concept at this point. I plan on adding a second SVG renderer to httpgd that allows for mich easier styling at the expense of slightly increased file sizes (nx10/httpgd#65). This will be included in the next update with the modular rendering. (It might take a couple weeks/months as I am currently busy writing my masters thesis.) |
|
Honestly, it works great and—with the tweaks I just made—for me it looks great! |
|
Thanks! @ManuelHentschel did most of the work on the vscode-r integration and the theming is completely his idea. |
* Liveshare Functionality Implements session watcher features for LiveShare guests * Update package-lock.json * Review changes (1) - isLiveShare now relies on liveSession instead of a new vsls.getApi() call -- Many functions are now synchronous as a result - Various tooltip changes to clarify 'forward guest commands' - Clean up helper bool functions * Move files to liveshare folder As per #641, liveshare files are moved to a /liveshare/ folder, and the "r" prefix has been removed from their name * Review changes (2) - Liveshare API handling -- Abort on timeout -- Retry button - Guest & host workspace always in sync - Guests no longer create files, instead relying on webview + virtual docs - Fix bug with webviews returning object instead of string * Resolve upstream changes (#2) * Share httpgd session with guest - Httpgd sessions are shared with guests through vsls shareBrowser functionality - Resolve some conflicts from upstream merge * Fix merge error + refresh tree - Remove duplicate function declaration - Refresh liveshare tree on retry api * Review changes (3) - Use liveShare.defaults as per #620 - Change overuse of brackets * Better integrate httpgd - The shared httpgd is now opened/reopened even if closed - Shared httpgd is now shared even if started before liveshare - Minor bug fixes * *Better* integrate httpgd - Instead of doing a workaround browser solution, use the native httpgd webview * Minor changes - Change timeout default: 3000 => 10000 - Remove leftover information message - Fix accidental merge overwrite * Fix guest httpgd eagerness - notifyGuestPlotManager is now called less often, preventing it from taking focus unexpectedly * Minor changes - .UUID -> uuid - Shorten commandNode label * Review changes (4) - request() to liveShareRequest() - onRequest() to liveShareOnRequest() - use index design pattern - remove global shareurl - remove badge from README * Lint + misc change - Appease the linter gods







Update: To check the PR, you need to have
httpgdinstalled and setoptions(vsc.use_httpgd = TRUE)in your .Rprofile.What problem did you solve?
This PR contains a very basic integration of
httpgdto display plots.It is intended to be a WIP PR and a continuation of (#614).
I added the implementation of a
httpgdserver connection backend drafted by @ManuelHentschel and removed the plot styling to make it compatible with allhttpgdversions (current CRAN and GitHub master).@ManuelHentschel will now implement a custom plot viewer that integrates with and uses vscode controls.
The development is also discussed in nx10/httpgd#63.
(This Post will be updated with screenshots and setup instructions as the development continues. Currently these are identical to #614 with the exception that all
httpgdversions can be used.)Edit: The viewer now uses the new api and includes some buttons in the titlebar to control it. In particular, it's possible to toggle between the original svg and the vscode-themed svg using the "Toggle Style" button.