Skip to content

Code search name filter.#2152

Merged
colinator27 merged 6 commits intoUnderminersTeam:masterfrom
VladiStep:codeSearchNameFilter
Jun 23, 2025
Merged

Code search name filter.#2152
colinator27 merged 6 commits intoUnderminersTeam:masterfrom
VladiStep:codeSearchNameFilter

Conversation

@VladiStep
Copy link
Copy Markdown
Member

@VladiStep VladiStep commented Jun 19, 2025

Description

Closes #2149, and fixes (partially) #2150.
Also, the code search window layout is flexible now.
image

Updated: since the second sub-issue of #2150 (disassembly new line inconsistency) was fixed, then this fixes #2150.

Caveats

None?

@VladiStep VladiStep requested a review from Copilot June 19, 2025 00:28
@VladiStep
Copy link
Copy Markdown
Member Author

I just wondering what Copilot will suggest

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a code-name filter to the search window, updates the layout to a flexible grid, and truncates long code lines in the results.

  • Introduce “Filter by code name” UI and logic in the search routine
  • Switch layout to a Grid with an Expander for name filtering
  • Truncate displayed lines to 128 characters with an ellipsis

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
SearchInCodeWindow.xaml.cs Added name‐filter fields and logic; reorganized fields; truncated long lines in results
SearchInCodeWindow.xaml Converted to Grid layout; added Expander and name‐filter controls; updated Search button styling
Comments suppressed due to low confidence (3)

UndertaleModTool/Windows/SearchInCodeWindow.xaml.cs:106

  • [nitpick] The error message capitalizes 'Regex' here but earlier messages use lowercase 'regex'; consider standardizing the case for consistency across messages.
                    this.ShowError($"Invalid Regex: {e.Message}");

UndertaleModTool/Windows/SearchInCodeWindow.xaml.cs:92

  • New name‐filter functionality is introduced; consider adding unit or integration tests to verify filtering by name (literal vs. regex, case sensitivity).
            bool filterByName = FilterByNameExpander.IsExpanded;

UndertaleModTool/Windows/SearchInCodeWindow.xaml:47

  • FontSize in WPF XAML should be a unitless numeric value; remove the "px" suffix and use FontSize="16" to prevent parse errors.
            <UndertaleModTool:ButtonDark x:Name="SearchButton" Grid.Row="1" Content="Search" Width="68" Margin="0,5,0,0" FontSize="16px"

@github-actions
Copy link
Copy Markdown

github-actions bot commented Jun 19, 2025

@luizzeroxis
Copy link
Copy Markdown
Contributor

Cool but why is the search button text huge

@VladiStep
Copy link
Copy Markdown
Member Author

Cool but why is the search button text huge

Because I think it was too small for such a button (especially when there's a second row with the name filter)

@colinator27
Copy link
Copy Markdown
Member

I'm fine making the Search button larger, but maybe the font size shouldn't be so large in comparison to the rest of the text.

@VladiStep
Copy link
Copy Markdown
Member Author

VladiStep commented Jun 22, 2025

Done.
image

(the wrong UTMT icon is because of Visual Studio Code)

Copy link
Copy Markdown
Member

@colinator27 colinator27 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested locally and seems to work well!

@colinator27 colinator27 merged commit 2cc12cd into UnderminersTeam:master Jun 23, 2025
5 checks passed
@VladiStep VladiStep deleted the codeSearchNameFilter branch June 23, 2025 16:24
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.

Visual bugs in the code search results. Add a code entry name filter to the code search.

4 participants