Skip to content

feat: Global search for all scene/external/prefabs/extensions event sheet #8292

Draft
ViktorVovk wants to merge 8 commits into4ian:masterfrom
ViktorVovk:feat-global-search-clean
Draft

feat: Global search for all scene/external/prefabs/extensions event sheet #8292
ViktorVovk wants to merge 8 commits into4ian:masterfrom
ViktorVovk:feat-global-search-clean

Conversation

@ViktorVovk
Copy link
Contributor

Hello. I would like to present my PR in which I implemented a global project search feature.

Currently, in large projects with many scenes and external events, it can be quite time-consuming to quickly find specific items such as actions, conditions, or variables. For this reason, a global search functionality has been implemented.

It is designed as a separate tab panel that contains a search form and search results grouped by scenes. When clicking a search result entry, the editor automatically navigates to the corresponding tab (scene event sheet or external events), where the matches are highlighted.

image image image image image

Viktor Vovk added 3 commits February 18, 2026 14:47
- Implemented methods to set and clear global search results in EventsFunctionsExtensionEditor and EventsEditorContainer.
- Enhanced EventsSheetComponent to manage global search results and focus.
- Added UI components for displaying highlighted search results across various event renderers.
- Introduced a new GlobalEventsSearchEditorContainer for managing global search interactions.
- Updated MainFrame to handle navigation and state management for global search.
- Introduced a new SVG icon for the global search functionality.
- Implemented a utility function `highlightSearchText` to highlight search terms in various components.
- Updated multiple components (Instruction, DefaultField, ObjectField, VariableField, GlobalEventsSearchEditorContainer) to utilize the new highlighting function.
- Enhanced the MainFrame to include global search options in the menu and project manager.
- Integrated global search event handling for improved user experience.
- Added a check for bad instruction metadata in the Instruction component.
- Introduced a fallback rendering for missing instructions using the InstructionMissing component.
- Ensured that the small icon filename defaults to an empty string if not available.
@4ian
Copy link
Owner

4ian commented Feb 19, 2026

This looks like a cool addition. I know this is still a draft but from a functional point of view we can think of these ways to discover this feature:

  • Probably a link/button somewhere in the current search box in events "[Search in all event sheets...]"
  • Maybe the same in the context menu of events? A "Search >" menu with three options: Search & Replace, Search any text, | (separator), Search any text in all Event Sheets
  • Probably the same in the File menu in a Search menu?
  • Having a "Global Search" in the project manager seems to actually give a visibility that is a tad too high to this (it's an excellent feature, but is not part of the structure of the project, so unsure it should be an item, if you see what I mean?)
  • And a command in the command palette! :)

This last point would allow one day to extend this search with a "Search anything" (that could search in events, object properties, behavior properties, extension properties...) (but that's not the point of this PR of course).

Viktor Vovk added 2 commits February 19, 2026 22:39
- Introduced the GlobalEventsSearchEditor for managing global search interactions.
- Created supporting components including GroupItem, GroupList, and RenderMatchRow for displaying search results.
- Implemented context management for search state and navigation using GlobalSearchContext.
- Added utility functions for handling search logic and deduplication of event paths.
- Updated BaseEditor to streamline navigation to events from global search results.
- Added matchCase parameter to global search methods across various components, including EventsFunctionsExtensionEditor, EventsEditorContainer, and GlobalEventsSearchEditor.
- Updated highlightSearchText utility to support case-sensitive searches.
- Modified multiple components to utilize the new matchCase feature for improved search accuracy.
- Ensured consistent handling of search results and state management in the MainFrame and related containers.
@ViktorVovk
Copy link
Contributor Author

ViktorVovk commented Feb 20, 2026

HI @4ian. First of all, I would like to thank you for reviewing my PR, even though it is still in Draft. Your comments are truly helpful, as I spent quite some time thinking about the best place to position the project search button. I chose Game Settings because it’s quick to access and easy to find. However, you are absolutely right — the “Search” feature is not really part of the project itself, and to be honest, I was counting on your feedback and suggestions.

In my opinion, a good place could be a transition from the scene search to the project-wide search. However, I’m still struggling from a UI/UX perspective with how and where exactly to place a button (or another control) that would switch from the local search to the global search tab. I would really appreciate it if you could provide a rough mockup (PNG) showing how you think the control for switching from local search to the global search tab should be positioned.

Additionally, I have already added a menu item under View => Global Search.

I would also like to add a hotkey for this feature. I’d be glad if you could suggest which key combination would be the most appropriate.

Regarding the context menu, I’m not entirely sure about it yet, since the entire line gets selected, and actions or conditions can sometimes be quite long.

  • Removed the button from Game Settings.
  • Added the command to the Command Palette (Global Search / Search in Project).
  • Added a hotkey: Ctrl+Shift+F (since Ctrl+F is used for scene search).

Viktor Vovk added 3 commits February 20, 2026 17:10
- Deleted the unused search_black.svg icon from the project.
- Added 'OPEN_GLOBAL_SEARCH' command to the CommandsList for initiating global search.
- Defined keyboard shortcut 'CmdOrCtrl+Shift+KeyF' for the global search functionality.
- Updated MainFrame and command handlers to support the new global search command.
- Adjusted KeyboardShortcuts to prevent conflicts with existing search functionality.
…ld and ObjectField components

- Updated the highlightSearchText function calls in DefaultField and ObjectField to consistently use the matchCase parameter for improved case-sensitive search functionality.
- Removed unnecessary spanProps variable to streamline the code.
…tem components

- Simplified the rendering of search result messages by replacing Trans components with template literals for better readability and performance.
- Updated the label for match counts in GroupItem to use string interpolation, enhancing consistency across the search interface.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments