-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Revamp how documentation tooltips work #82051
Revamp how documentation tooltips work #82051
Conversation
50cf640
to
ea80f45
Compare
ea80f45
to
7d71021
Compare
29ed403
to
da43d87
Compare
@dalexeev Changes made. |
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.
Some changes are still required, but overall this should be a great improvement.
We could probably reduce code duplication even more around the whole "No description available for %s."
self-modulation construction. But this can be done in a follow-up.
da43d87
to
e6d6b7d
Compare
Tested this PR briefly while trying to assess whether it would conflict with #76147. I noticed this bug when you hover a category (
This happens whether the category has a doc hint or not, for example: extends Node2D
## The script is described here.
## Hello some int
@export var test: int = 6
## My categories are exquisite.
@export_category("Yo cat")
## This is a plop
@export var plop: int = 42 For the record, in 4.2-dev5 categories don't seem to support doc hints in the tooltip, they always show the category's name as a tooltip. In this PR, it shows an empty tooltip + the error mentioned above. Ideally it would be good for categories to support doc hints too, but that's probably for a separate PR. Tested |
e6d6b7d
to
54a7521
Compare
54a7521
to
ae91644
Compare
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.
LGTM, thank you for taking a crack at this refactor
Thanks! |
This PR does the following this:
get_*_description()
functions toEditorHelpBit
, that fetches the doc description of various components, and then caches them.EditorHelpTooltip
, that handles the doc tooltips that before were scattered across multiple places. It internally uses the functions above.EditorHelpBit
I found while making this PR.This PR is necessary for #81284 (see #81284 (comment)).