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

[plug-in] webview compliance #5010

Merged
merged 1 commit into from
Apr 29, 2019
Merged

[plug-in] webview compliance #5010

merged 1 commit into from
Apr 29, 2019

Conversation

benoitf
Copy link
Contributor

@benoitf benoitf commented Apr 26, 2019

Fix #4267 by avoiding to define postMessage function through a timeout (now function is defined earlier)

Also:

  • keep scrolling of webview when returning back to the webview
  • handling keep state when moving webviews
  • fix initial webview column
  • handle theia-resource and vscode-resource in postMessage content
  • handle localRoots
  • handle retainContextWhenHidden
  • do not let enter messages until the webview is not ready to receive them
  • ...
root INFO [hosted-plugin: 60603]   Webview tests
root INFO [hosted-plugin: 60603]     ✓ webviews should be able to send and receive messages (318ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should not have scripts enabled by default (1001ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should update html (93ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should preserve vscode API state when they are root root INFO [hosted-plugin: 60603]     ✓ webviews with retainContextWhenHidden should preserve their context when they are hidden (313ms)
root INFO [hosted-plugin: 60603]     ✓ webviews with retainContextWhenHidden should preserve their page position when hidden (783ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should only be able to load resources from workspace by default (180ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should allow overriding allowed resource paths using localResourceRoots (218ms)
root INFO [hosted-plugin: 60603]     ✓ webviews should have real view column after they are created, #56097 (185ms)
root INFO [hosted-plugin: 60603]    X webviews should preserve their context when they are moved between view columns
root INFO [hosted-plugin: 60603]   9 passing (9s)
root INFO [hosted-plugin: 60603]   1 failing


root INFO [hosted-plugin: 60603]   1) Webview tests webviews should preserve their context when they are moved between view columns:
     Error: Failed to show text document [object Object]
      at Object.<anonymous> (packages/plugin-ext/src/plugin/plugin-context.ts:261:27)
      at step (packages/plugin-ext/lib/plugin/plugin-context.js:47:23)
      at Object.next (packages/plugin-ext/lib/plugin/plugin-context.js:28:53)
      at fulfilled (packages/plugin-ext/lib/plugin/plugin-context.js:19:58)

There is an error on the textDocument (not related to webview itself)

Change-Id: Ie35c911c0c62ebf8260c2449299e7fe91433255b
Signed-off-by: Florent Benoit fbenoit@redhat.com

…t (now function is defined earlier)

Also:
- keep scrolling of webview when returning back to the webview
- handling keep state when moving webviews
- fix initial webview column
- handle theia-resource and vscode-resource in postMessage content
- handle localRoots
- handle retainContextWhenHidden
- do not let enter messages until the webview is not ready to receive them
- ...

Change-Id: Ie35c911c0c62ebf8260c2449299e7fe91433255b
Signed-off-by: Florent Benoit <fbenoit@redhat.com>
@benoitf benoitf added bug bugs found in the application plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility labels Apr 26, 2019
@benoitf benoitf self-assigned this Apr 26, 2019
@benoitf benoitf changed the title [plug-in] webviesw compliance [plug-in] webview compliance Apr 26, 2019
Copy link
Member

@akosyakov akosyakov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can verify improvements with VS Code api tests:
Screen Shot 2019-04-29 at 07 58 10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug bugs found in the application plug-in system issues related to the plug-in system vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[plugin][webview][intermittant] window.postMessageExt is not a function
3 participants