Skip to content

All settings within same filterable containers are visible when search is matched#37183

Open
nathanc7278 wants to merge 2 commits intoppy:masterfrom
nathanc7278:fix-hidden-buttons-settings-search
Open

All settings within same filterable containers are visible when search is matched#37183
nathanc7278 wants to merge 2 commits intoppy:masterfrom
nathanc7278:fix-hidden-buttons-settings-search

Conversation

@nathanc7278
Copy link
Copy Markdown

Fixes #35917

Modified the MatchingFilter setter in SettingsSection.cs to additionally mark MatchingFilter attribute of child elements to true when a setting is being searched. Added a private helper function showIFilterableChildren that recurses on IContainerEnumerable<Drawable>.

Before:

before.2.mp4

After:

after.1.mp4

A big downside of this approach is that it makes the screens a bit cluttered when searching for more popular options like "cursor"

{
if (drawable is IFilterable filterable)
filterable.MatchingFilter = true;
if (drawable is IContainerEnumerable<Drawable> container)

Check warning

Code scanning / InspectCode

Incorrect blank lines: Blank lines are missing elsewhere Warning

Blank lines are missing, expected minimum 1 instead of 0
@nathanc7278 nathanc7278 force-pushed the fix-hidden-buttons-settings-search branch from a6b1b38 to 9d9cc95 Compare April 2, 2026 23:08
@peppy
Copy link
Copy Markdown
Member

peppy commented Apr 4, 2026

I don't get it. Why does "delete" show the whole maintenance section? Why does "export" show "Learn more about lazer"? This doesn't make sense. If we're doing this kind of approach, unrelated buttons/controls need to be dimmed or something.

In the linked issue, I proposed keeping the other buttons visible for that specific control, because they are horizontally dependent on each other for alignment.

@nathanc7278
Copy link
Copy Markdown
Author

I don't get it. Why does "delete" show the whole maintenance section? Why does "export" show "Learn more about lazer"? This doesn't make sense. If we're doing this kind of approach, unrelated buttons/controls need to be dimmed or something.

In the linked issue, I proposed keeping the other buttons visible for that specific control, because they are horizontally dependent on each other for alignment.

Thanks for clarifying. I will take a look at how to only show buttons that are in the same horizontal layer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Buttons in button groups should use the whole width when alone.

3 participants