-
Notifications
You must be signed in to change notification settings - Fork 77
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
Fix problems with the built in help system #1084
Conversation
@pllim, I've had a number of problems with the built in help system. This is meant to address them. When you have time, can you test this with |
@ejeschke , is there a deadline? I am not sure if I can get to this next week. |
No deadline. Release 5.0 is way overdue, and now it is looking like late Jan or early Feb. |
Another possibility, @pllim, is to deprecate the |
I never used WBrowser myself except to play YouTube in a live demo so I am okay with replacing it with something else. |
Ok, sounds good. I feel like the browser widget in Qt (and Gtk) is getting more and more complicated and difficult to support. I read that the Qt browser widget is built on Chrome (!) so it is a pretty complex piece of software to embed. |
I'll rework this to just deprecate the |
I am a bit sad because I used to taunt Tom Robitaille saying that glue cannot play YouTube like Ginga. 😆 |
We could replace it with Tetris or Pong... |
A kid already broke Tetris. What about Doom? 😸 |
I dunno, maybe a space-based game might be best. There are lots to choose from. Asteroid? |
Oh, that is good idea. Or Space Invaders. 🤣 |
28466f5
to
b2849d1
Compare
Ok, @pllim, when you have a few minutes to try with |
c1b41d7
to
28aa3cd
Compare
28aa3cd
to
14a7c83
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes are not backward compatible with existing plugins developed outside Ginga while WBrowser was still a thing.
For example, the Help button for https://github.com/spacetelescope/stginga/blob/master/stginga/plugins/BackgroundSub.py now does nothing.
Maybe you need to also write a transition guide or make the existing Help button from the old way of things somehow invoke the new stuff.
14a7c83
to
24e0900
Compare
@pllim, ok, good point. Let me rework this slightly to make it backward compatible for the help button API. |
@pllim, I have updated the PR so that the behavior for To get the behavior of the PR, where it asks the user whether they want the online help rendered in an external browser or the docstring in a text window, I will submit a PR for stginga. |
efbc937
to
333ca30
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With spacetelescope/stginga#234 merged, I have no problem with this. Thanks!
This fixes several problems with the built in help system: - The WBrowser plugin is often unable to intialize correctly because it requires a QWebEngineView widget which is often not installed (for example it is offered separately in conda) - Even when the widget is installed, it often can fail to start if OpenGL libraries are not configured correctly (often the case for conda on Linux, for example) - The RTD web site often fails to access certain items, giving a HTTP 403 (Forbidden) error, particularly with trying to fetch the list if versions (ginga.doc.download_doc._find_rtd_version()) - The HTML ZIP download (ginga.doc.download_doc. _download_rtd_zip()) sometimes fails as well Solutions in this PR: - WBrowser is made more robust, so that if it cannot create the browser widget the plugin will still start in a degraded mode - In the degraded mode, WBrowser will pop up a dialog to ask the user whether they want to view the documentation in an external browser from the RTD link, or view the (local) plugin docstring in a text widget - If the browser widget is successfully created, but the RTD version check fails, or the download of the zipped documentation fails, it will fall back to displaying the online documentation; if that fails it will fall back to showing the local plugin docstring in a text widget.
- now handles URLs by calling Python's "webbrowser" module to open them - option to view local docstring in a plain text widget
333ca30
to
e47e088
Compare
Thanks, @pllim! |
This fixes several problems with the built in help system:
Solutions in this PR: