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

feat: support editor/title context menus for web views #6030

Merged
merged 1 commit into from
Aug 29, 2019

Conversation

502647092
Copy link
Contributor

Signed-off-by: MiaoWoo admin@yumc.pw

What it does

Fixed: #5515

How to test

  • ext install humao.rest-client
  • create http file google.http
GET http://google.com
  • Send Request
  • Webview have menus
    image

Review checklist

Reminder for reviewers

@502647092 502647092 requested a review from a team as a code owner August 24, 2019 03:14
Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

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

Please take a look at failing CI.
Executing the tests for the @theia/plugin-ext is failing (ex: npx run test @theia/plugin-ext)

import { Navigatable } from '@theia/core/lib/browser/navigatable';

type CodeEditorWidget = EditorWidget | WebviewWidget;
export namespace CodeEditorWidget {
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure this is the appropriate place for this type and namespace.
I don't expect menus-contribution-handler to have this information.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I copy the code from #5527 @akosyakov

Copy link
Member

Choose a reason for hiding this comment

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

@vince-fugnitto Where would you suggest to put it? It is require for now only for menu contributions to provide mapping between vscode core editor meaning to Theia.

@502647092
Copy link
Contributor Author

Please take a look at failing CI.
Executing the tests for the @theia/plugin-ext is failing (ex: npx run test @theia/plugin-ext)

I test it in master branch
it's also error

@vince-fugnitto
Copy link
Member

I test it in master branch
it's also error

I checked on the latest master ffcb3fa and there were no issues.

Screen Shot 2019-08-25 at 9 32 27 AM

@502647092
Copy link
Contributor Author

I test it in master branch
it's also error

I checked on the latest master ffcb3fa and there were no issues.

Screen Shot 2019-08-25 at 9 32 27 AM

image
emm but in my workspace have error

@502647092
Copy link
Contributor Author

@akosyakov
Do you know what caused the test to fail?

@vince-fugnitto
Copy link
Member

@akosyakov
Do you know what caused the test to fail?

When checking out master did you, git clean -fdx and yarn and then run the test?

@502647092
Copy link
Contributor Author

@vince-fugnitto
test failed because import webview -> MiniBrowserContent -> PDFObject

    //jshint unused:true

    //PDFObject is designed for client-side (browsers), not server-side (node)
    //Will choke on undefined navigator and window vars when run on server
    //Return boolean false and exit function when running server-side

    if(typeof window === "undefined" || typeof navigator === "undefined"){ return false; }

    var pdfobjectversion = "2.0.201604172",
        supportsPDFs,

        //declare functions
        createAXO,
        isIE,
        supportsPdfMimeType = (typeof navigator.mimeTypes['application/pdf'] !== "undefined"),

navigator.mimeTypes is undefined
but I don't know why will cause it failed
maybe is lose some deps before test

@502647092
Copy link
Contributor Author

@vince-fugnitto
I create a new file to save const value
now test pass

@akosyakov akosyakov added vscode issues related to VSCode compatibility webviews issues related to webviews labels Aug 26, 2019
@akosyakov
Copy link
Member

After switching theme actions are not there anymore. They also don't seem to do anything when clicked, but it is probably another issue?

@502647092
Copy link
Contributor Author

502647092 commented Aug 26, 2019

@akosyakov
There are some problems
Click once after menu will invalid
But I think it should be another problem.

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.

approve since actions are there

there are 2 known issues still:

Let's address them separately.

Signed-off-by: MiaoWoo <admin@yumc.pw>
@akosyakov akosyakov merged commit a2cdb33 into eclipse-theia:master Aug 29, 2019
@502647092 502647092 deleted the GH-5515 branch August 29, 2019 06:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
vscode issues related to VSCode compatibility webviews issues related to webviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[vscode] support editor/title context menus for web views
3 participants