Skip to content

Unify editor class and reference search

Rafał Mikrut requested to merge github/fork/RayKoopa/unified_help_search into master

Created by: RayKoopa

Merges the class hierarchy tree and flat documentation reference search in one list. animation

The hierarchy can be toggled on or off. This setting is stored.

  • When off, it is very similar to the previous flat documentation search.
  • When on, it resembles the previous class list, but with added member search. Classes required to build the hierarchy but not actually matching any part of the search term when searching for members are grayed out.

Usability changes / improvements

  • Case sensitivity can be toggled (setting is stored).
  • The first full match is automatically selected.
  • Removed now redundant buttons to open the separate class documentation.
  • List can be filtered by item type. This setting is not stored to start new searches later on over all types.
  • Tooltip on classes now strips unneccessary newlines at start and end.
  • Results without an icon get the "ArrowRight" icon to make the text indented logically. Actual icons to differentiate between methods / constants / etc. would be interesting.
  • Window size is stored and restored.
  • Class names are matched like members, i.e. by subsequences of the search term. Previously, class names only containing the letters in any order of the search term were found.
  • Drawing root lines can be toggled with the already existing scene dock settings.
  • Tree no longer draws buggy lines when hierarchy lines should be rendered while the root item is hidden.

Code related changes

  • Search is now only executed when the window is actually visible. It previously executed even at initial filling, for example when the editor was started.
  • Deleted EditorHelpIndex. EditorHelpSearch (now in separate file) handles both.
  • Removed open_class signal, now handled by go_to_help.
  • Removed EditorNode signal request_help_index, now handled by request_help_search.
  • Unified ScriptEditorBase signals request_help_index and request_help_search in request_help (tell me if you want to keep the name request_help_search instead).
  • Rewrote so many parts of EditorHelpSearch::IncrementalSearch that I also renamed it to EditorHelpSearch::Runner as it isn't just an "incremental" search anymore (more a phased search).
  • ClassDB::is_parent_class now uses get_parent_class_nocheck rather than get_parent_class internally since it didn't seem to care about empty strings, causing a lot of logged errors when it was used.

Merge request reports

Loading