-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
Do not destroy PIO Home when tab editor is changed #32
Comments
@mjbvz might know |
@mjbvz do you have any ideas? |
Yes, we destroy the html preview whenever the user switches away from it. This is by design. The proper approach is write the html preview so that it can save its state and then recreate itself from this state. I believe the state needs to be saved by the extension code itself. Setting cookies in the webview doesn't work and I don't think local storage will either, but I'd have to check this. For an example of this, take a look at the markdown extension: https://github.com/Microsoft/vscode/blob/master/extensions/markdown/media/main.js It doesn't really persist any state but it does set the initial view position using |
The problem here that our HTML Preview is a complex Web application which depends on the backend server. We need 1-2 secs to establish a connection. 2-nd problem, we don't render HTML content on-the-fly as Markdown does. Yes, in your case you can control these things. We have a pre-built Web application based on Rect components. That is a very expensive operation for us to "refresh" application. Finally, if we have active session between Web-previewed APP and our backend (for example, physical USB Serial Monitor), we can't keep this session when a user switches between tabs. In any case, thanks a lot for the info. |
Depends on microsoft/vscode#28263 |
@mjbvz thank you so much for this API! 😊 |
Temporary solution
Please open PIO Home in a separate layout (Split Editor and drag PIO Home tab to a new tab pane). See | | | icon in the top right corner.
Currently, VSCode totally destroys PIO Home when a user changes tab. Need to find a way how to restore previous IFRAME state.
There is no information here:
/cc @dbaeumer @Tyriar should I open a feature request? Related source code.
The text was updated successfully, but these errors were encountered: