feat: Global search for all scene/external/prefabs/extensions event sheet #8292
feat: Global search for all scene/external/prefabs/extensions event sheet #8292ViktorVovk wants to merge 8 commits into4ian:masterfrom
Conversation
- 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.
|
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:
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). |
- 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.
|
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.
|
- 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.
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.