-
-
Notifications
You must be signed in to change notification settings - Fork 98
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 keywords for easier searching of methods/properties/β¦ in the class reference #5085
Comments
+100, often I try to find a function without remembering the exact name, and the search will find everything BUT the thing I'm looking for :/ |
Let's think of some examples. What would be among the most common keywords that one could use? And what other cases other than the ones proposed would keywords be used on? |
"mouse click" or some similar to InputEventMouseButton If I remember some others, I'll note them down. |
I just thought of another usage for keywords. Sometimes, the renames of Godot 4 are so difficult to re-find or recognise, that it may be good to include their 3.x names as keywords, too. |
If we go with this proposal, I'd change that bit. Changing the XML structure by hand can be annoying. I'd probably go with a new bbcode tag, Can be placed in any description. ...which can be a problem if there is no description field for something. Hmm... |
That sounds pretty clever, actually. Is there a problem in handling those cases without description as the exception to the norm? |
No problem other than adding support for descriptions just to allow keywords. Actually, the only thing that doesn't have a description which I can remember are the class members that override their parent. So maybe it's not a problem at all. |
I think this could extend to add node dialog and script editor as well. Not everybody knows to press F1. In script editor, suggestions based on keywords should be ranked lower not to clog more literal finds. Here's a few more keyword suggestions: |
That's based on a real use case. I almost started implementing my own function because i was looking for |
Note: keywords should be implemented in such a way that they can be translated to other languages. This would boost usability a lot for somebody who doesn't know english well, as even with fully translated editor node names and scripting api are in english |
If they are included within the documentation's xml file there would be no issue then. (As part of the description) |
Describe the project you are working on
The Godot editor π
Describe the problem or limitation you are having in your project
Finding properties/methods in the class reference can be difficult if you don't know the exact name of the property/method. See #5077 where this issue was encountered.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Add keywords for easier searching of methods/properties/β¦ in the class reference.
This is something I originally proposed in godotengine/godot#29286 (comment) and godotengine/godot#29286, but it seems I forgot to open a proposal about it until now.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
keywords="keyword1, keyword2, ..."
attribute onproperty
/method
/signal
/constant
/theme_item
/enum
/annotation
tags. This attribute won't be generated by--doctool
, so it'll be up for contributors to add it where needed. (For consistency, tt should always be added as the last attribute.)keywords
tag is probably not relevant for constructors and operators.--doctool
to preserve thekeywords
attribute on relevant tags.keywords
attribute on relevant tag.The online class reference may be able to benefit from this by collecting all keyword aliases for each class, then throwing them all under a
<meta keywords="...">
tag using the following reStructuredText at the top:This
keywords
meta tag is ignored by search engines like Google, but the internal search bar will make use of them.If this enhancement will not be used often, can it be worked around with a few lines of script?
No.
Is there a reason why this should be core and not an add-on in the asset library?
This is about improving documentation usability.
The text was updated successfully, but these errors were encountered: