-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Unify editor class and reference search #14535
Conversation
looks good, but it seems a bit confusing since in every other place the left panel (or tree) has some relation or dictates the content on the right side. |
Yeah, thought the same. Open for ideas. Mine so far are:
|
editor/editor_help_search.h
Outdated
#include "editor/editor_help.h" | ||
#include "editor/editor_plugin.h" | ||
#include "scene/gui/tree.h" | ||
#include "editor/code_editor.h" |
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.
Sorry, clang-format
is quite strict on the alphabetical ordering of includes :P
https://travis-ci.org/godotengine/godot/jobs/314530991
In that case maybe could more option to filter the results ? Like checkboxes or something like that. |
I edited my previous comment, you mean something like that? |
Yeah, that's better. I try that. |
Nice, thanks :) |
I opened an issue #14319 about better search in Search Help a few days ago. I'd personally prefer filtering just by typing. Since it's a search box, your hands are already on the keyboard. It's fast to just type in "signal" or "method". Checkboxes and menus force me to grab the mouse again. |
You can tab and configure the filter like in most other applications. I could still add shortcuts. If you want to filter, you have to do more than typing (except someone wants to add keywords). |
You mean use Tab to select the checkboxes and Space to toggle them? |
Something like that, or whatever you need to press to typically use the UI keyboard wise. There can still be hotkeys assigned to toggle each filter. |
Well IMHO, no need for obscure keyboard shortcuts for now. In most cases you'll find the result you are looking for by just typing its name. |
@RayKoopa I'd rather avoid a plethora of ad-hoc new keyboard shortcuts. As for using Tab, that'd almost unusable. Imagine having to disable all the boxes but the Signal one using Tab and space. At this point using the mouse would be less of a sore. @groud Well when you're looking for a Signal, anything other than a signal showing up is just noise. Same if you're looking for a Class, or a Property. It's not that you won't find it. It's just that the signals are drowned in irrelevant methods and classes. The problem with the design you're going for, is that you want all of them included by default, but when you don't you usually want just one. With this design, getting from "all included" to "just signals" means unticking every single other box aside from "signals". I think that's bad and tedious. |
Not if you have a drop-down list as what I suggested. You select either "display all", "signals only", "methods only" etc.... |
Yeah the dropdown solution is a bit better, but then you can't have two at a time. |
This is not important, either you know what you are looking for and you select it, or you don't and the "display all" option is ok. |
Sometimes you don't know if something's going to be a method/getter or a property. It's all right if you think that deserves to wait for another PR. But I still think that this is not a really great design. It's be much more convenient to be able to select types through search terms |
The proposal seems ok to me. Let's just keep the interface simple by now, if more people complain we will improve it. But for now it does not seems really necessary to me. |
Do we agree on how the results should look like? For example, the search for "set_name" with the hierarchy displayed would
If that's how you'd like it, I have some trouble implementing it wisely.
|
For me, the logic you describes looks ok. If we can avoid recording a link to children classes it's better, avoiding redundancy in data structures is better, unless it's for performance reasons. I would just list the matching results then reconstruct the hierachical structure afterwards. |
It looks awesome! Maybe adding the function arguments could be good too? |
I guess they should still get the Object icon then? |
some are not even godot Objects Like the ResourceLoader, the others im not sure |
According to DocData, they inherit from |
Thanks a lot for your contribution! Moving this PR to the 3.1 milestone, to be reviewed once the release freeze is lifted. It could eventually be cherry-picked for a future 3.0.1 maintenance release if it doesn't change the user-facing APIs and doesn't compromise the engine's stability. |
i like this a lot, but i don't think an extra click should be needed (to get to help menu). can't we just click on search help as before, to bring this window up? |
yes? |
thank you |
Is the behavior of this feature still the same after the discussions? If not, please update the GIF. |
Yes it is. |
How am I supposed to ever resolve these conflicts? Why hasn't this been merged before accepting additional (redundant?) work on this? |
If you are having trouble with Git, just backup your versions, accept all rebase conflicts in favor of Godot, then add your changes back. |
Yeah except adding them back causes conflicts over conflicts, and I don't know what's been changed over time which I should try to keep / put into my changes. |
I'm sorry about that, but you made this contribution at an inconvenient time as we were in release freeze for the massive 3.0 release. Since similarly big contributions had piled up on the master branch during December/January, and more kept coming, it took us months to review and merge them while staying on top of new changes, and some PRs from that time are still waiting, like this one. Newer and potentially redundant work has been merged because it had a scope easier to review and manage. Big PRs are always harder to handle and can end up having conflicts to resolve before they're eventually merged or rejected. I'm still interested in the UX improvements made in this PR, for the reference. |
Yeah I understand, and sorry I couldn't get back earlier to this before all the changes happened. I just found a little spare time recently, but I'm not sure it's enough to review all the changes by now. Would be happy if someone feels free to fix that branch up. |
https://github.com/fire/godot/tree/unified_help_search Is rebased on top of master, but it's using your search rather than the current search. I hope you find this useful. It needs to be using the current search code with your changes to be complete. EDITED: The rebased version only works for class names, the other items in the list don't work. |
We've discussed this on IRC today and it would be a "go" once rebased on the current master branch:
|
To refer to what was said in the IRC, I can confirm that the GIF in the OP is up-to-date with the latest changes I commited back then. |
There is a PR for it #20155 |
Closing as the PR has conflicts and no update so it can't be merged for the time being. It's a nice feature though and a new rebased PR would be welcome, either from OP or from another contributor extending the work in this PR (which is what the Thanks for the initial work, I hope it will make it in the master branch eventually. |
Too bad, this was a great improvement. Hope someone will be interested in rebasing it. |
Merges the class hierarchy tree and flat documentation reference search in one list.
![animation](https://user-images.githubusercontent.com/9631152/34079929-1455d350-e337-11e7-97e8-9ada9bc52ccd.gif)
The hierarchy can be toggled on or off. This setting is stored.
Usability changes / improvements
Tree
no longer draws buggy lines when hierarchy lines should be rendered while the root item is hidden.Code related changes
EditorHelpIndex
.EditorHelpSearch
(now in separate file) handles both.open_class
signal, now handled bygo_to_help
.EditorNode
signalrequest_help_index
, now handled byrequest_help_search
.ScriptEditorBase
signalsrequest_help_index
andrequest_help_search
inrequest_help
(tell me if you want to keep the namerequest_help_search
instead).EditorHelpSearch::IncrementalSearch
that I also renamed it toEditorHelpSearch::Runner
as it isn't just an "incremental" search anymore (more a phased search).ClassDB::is_parent_class
now usesget_parent_class_nocheck
rather thanget_parent_class
internally since it didn't seem to care about empty strings, causing a lot of logged errors when it was used.