-
Notifications
You must be signed in to change notification settings - Fork 129
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
Use httpgd NPM package #823
Conversation
Thanks for the PR! I started working on the "Export plot as..." functionality but got stuck at the point where I actually need to get the content of the exported plot (here). I've seen that you do this kind of "manually" here. Should I also do something like that, or is this supposed to be part of the httpgd-js api? |
The latest push depends on the httpgd version from nx10/httpgd-js#1. To test this, I temporarily removed the httpgd dependency and use yarn link to import a local version of the package. |
The last commit hopefully fixes this. I think the bug became visible, because we removed the refresh timeout (the underlying bug was masked by this timeout). To avoid too frequent rerendering of the html while a new plot is drawn, I'd still recommend adding the timeout functionality again.
In the .ejs files the property
Can you please give an example for this? |
I just pushed a commit that streams the plot directly into the exported file. This should be more memory efficient and might be a bit faster. There seems to be a problem with eslint not recognizing the
Nevermind, I think I was testing with an old version of vscode-R when I noticed this. Text looks good now. Good job on the other two fixes as well. Edit:
I agree. |
Anything else that needs to be implemented/fixed, @nx10 @renkun-ken ? |
I think the restructuring went very well, thank you for your work. At some point if somebody volunteered to add an article for the httpgd documentation would be great: https://nx10.github.io/httpgd/articles/b01_vscode.html |
Thanks for the nice work! As I test the httpgd plot viewer commands, it looks like "Toggle Preview Plot Layout" will randomly make the previews disappear rather than rearrange the layout. Not sure if you could reproduce it? |
That command cycles through three different layouts: horizontal scrolling, multi-row and hidden (i.e. the previews disappear) |
OK. The hidden one seems not quite useful for me, as it is almost the same with full window mode. |
I think this option was requested at some point, and it might be useful e.g. if your webview pane is rather tall and narrow, but you still don't want to see all your previous plots. |
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
What problem did you solve?
This is a first WIP attempt at replacing the client side API and connection code with the new httpgd NPM package to unify and simplify development.
This is also discussed in nx10/httpgd#79
This PR is a very early prototype, basic functionality is implemented, but there are still a lot of bugs. This is intended as a starting point for further development with @ManuelHentschel
Changes:
Bugs:
There seems to be a problem when more than one plot is drawn (duplicated invisible plots in history)Plot view very small when openedText border is colored instead of the text itself when using theming