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

Variable viewer: Can you retain the webview context when hidden? #10240

Closed
Tyriar opened this issue Jun 1, 2022 · 11 comments · Fixed by #10476
Closed

Variable viewer: Can you retain the webview context when hidden? #10240

Tyriar opened this issue Jun 1, 2022 · 11 comments · Fixed by #10476
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 Something affecting the productivity of the team variable-explorer

Comments

@Tyriar
Copy link
Member

Tyriar commented Jun 1, 2022

Testing #10170

I know this is an option for custom editors, if it's available to webview panels that would save reloading the whole webview when re-focused (at the cost of keeping the context in memory):
Recording 2022-06-01 at 07 44 13

@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Jun 1, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Jun 1, 2022

I believe we refresh on purpose. Storing context only works if the user hasn't executed anything between hiding and showing again.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 1, 2022

You could keep the context and trigger a refresh when the webview is shown instead of recreating it completely?

@rchiodo
Copy link
Contributor

rchiodo commented Jun 1, 2022

Not sure what the difference would be? Less flashing?

@Tyriar
Copy link
Member Author

Tyriar commented Jun 1, 2022

Yeah, it should load about as fast as the built-in panels then and feel more smooth/integrated.

@sadasant
Copy link
Contributor

sadasant commented Jun 1, 2022

I like the idea of less flashing! We'll circle back after triage.

@rebornix
Copy link
Member

rebornix commented Jun 1, 2022

For refreshing, I also expect it does diffing and update incrementally instead of refreshing the whole page.

@Tyriar
Copy link
Member Author

Tyriar commented Jun 1, 2022

@rebornix related to that: #10221

@rchiodo
Copy link
Contributor

rchiodo commented Jun 1, 2022

For refreshing, I also expect it does diffing and update incrementally instead of refreshing the whole page.

The react data grid we use should already be doing this. There is only flashing when we hide the window.

@greazer greazer added the papercut 🩸 Something affecting the productivity of the team label Jun 2, 2022
@greazer greazer added bug Issue identified by VS Code Team member as probable bug and removed triage-needed Issue needs to be triaged labels Jun 2, 2022
@rchiodo
Copy link
Contributor

rchiodo commented Jun 16, 2022

This was done on purpose to prevent execution from happening while the window is hidden.

webviewOptions: { retainContextWhenHidden: false }

We could try detecting if the view is visible or not in the refresh though, and then set it to a pending refresh for when it becomes visible again.

@rchiodo
Copy link
Contributor

rchiodo commented Jun 17, 2022

Whoops wrong issue closed.

@rchiodo rchiodo reopened this Jun 17, 2022
@github-actions github-actions bot added the triage-needed Issue needs to be triaged label Jun 17, 2022
@rchiodo rchiodo removed the triage-needed Issue needs to be triaged label Jun 23, 2022
@IanMatthewHuff IanMatthewHuff removed their assignment Nov 10, 2022
@roblourens
Copy link
Member

microsoft/vscode#165445

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug papercut 🩸 Something affecting the productivity of the team variable-explorer
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants