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

Add Qt help view #40

Merged
merged 5 commits into from
Nov 28, 2020
Merged

Add Qt help view #40

merged 5 commits into from
Nov 28, 2020

Conversation

tonka3000
Copy link
Owner

@tonka3000 tonka3000 commented Nov 19, 2020

Add Qt help webview. The Impl. just use the word under the cursor (no selection!) and just use the Qt docs website https://doc.qt.io/qt-5 . The word will be attached in lowercase. QWidget would look like https://doc.qt.io/qt-5/qwidget.html

Closes #39

@Shatur
Copy link

Shatur commented Nov 19, 2020

Thanks! Works for me. Is it possible to add search on the page (via Ctrl+f) and the ability for manual search using https://doc.qt.io/qt-5/search-results.html?q=requestText?

@Shatur
Copy link

Shatur commented Nov 19, 2020

I also noticed that you use GitHub Actions. Could you add something like the following to the CI? This will allow to just download the extension after CI without manual build.

@tonka3000
Copy link
Owner Author

  • CTRL + F seems not to work in VSCode webview AFAICT
  • Manual search should be possible via another command
  • Upload CI artifacts should also be possible

I will try to find some spare time in the next few days to check this points.

@Shatur
Copy link

Shatur commented Nov 19, 2020

CTRL + F seems not to work in VSCode webview AFAICT

Not sure if this is related, but a similar problem has been resolved in vscode-godot-tools.

Manual search should be possible via another command
Upload CI artifacts should also be possible

Yeah, it would be nice. Thanks!

@tonka3000
Copy link
Owner Author

"Find" works (take some time to process) when you click on the area above the view and then press CTRL + F. When you click in the view it will not work. VSCode seems not to support the find widget with iframes correctly, see microsoft/vscode#96307

@Shatur
Copy link

Shatur commented Nov 20, 2020

Thanks for the info!

@tonka3000
Copy link
Owner Author

Hey @Shatur95 ,

I've added a search command for the Qt help, but there is a problem. The search results are links with target="_blank" which is not supported by VSCode webviews with iframe, so you can not click them. When you press the middle mouse button it will open the link in the external browser and that is the only way how you can click them. Maybe the simplest idea to fix that is to open the search directly in the external browser.

I've added artifacts to the build CI jobs, so you can easily try it out.

@Shatur
Copy link

Shatur commented Nov 20, 2020

Thank you! Tested, yes, works for me. If there are so many restrictions in embedding, maybe will be better to just show all documentation in browser?

@tonka3000
Copy link
Owner Author

tonka3000 commented Nov 23, 2020

Hey @Shatur95 ,

I've also add external browser support. By default the extension launch the webview inside VSCode, but you can turn this off by just set qttools.useExternalBrowser to true. I've update the README.md where I list all the features and limitations.

Let me know I you like it or you miss something.

@Shatur
Copy link

Shatur commented Nov 23, 2020

Thanks, just what I need.

@tonka3000 tonka3000 merged commit 33a5697 into develop Nov 28, 2020
@tonka3000 tonka3000 deleted the feature-add-qt-help-view branch November 28, 2020 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search in documentation
2 participants