Skip to content

Conversation

viciscat
Copy link

Grays out tabs where the result isn't and moves you automatically to the next tab.
Not sure if this is an implementation you like.
Someone suggested to add a toggle for the global search above the search bar or something, tell me if you think it's a good idea.

Copy link
Owner

@isXander isXander left a comment

Choose a reason for hiding this comment

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

Love this! Thank you for the contribution.

@isXander
Copy link
Owner

I think it best not to clutter the interface even more with a toggle. It makes sense that a search box should search everything, not just the current tab.

One suggestion though, might be a bit tricky. Because entering in a non-matching search will change tabs automatically, the current tab should always prefer to be the originally selected tab if any results come up.
For example, if I search in "Foo", and Tab 2 matches an option called "Foo", but then I remove it so it's searching "F", Tab 2 will still match, but if Tab 1 has "Food", it should be re-selected since it was originally selected. The originally selected tab should be forgotten when the UI is interacted with outside of the search.

@viciscat viciscat force-pushed the multiversion/global_search branch from ce2564b to 81f9e9b Compare September 13, 2025 10:09
@viciscat viciscat marked this pull request as ready for review September 13, 2025 10:09
@viciscat viciscat requested a review from isXander September 13, 2025 10:10
@viciscat
Copy link
Author

I think I managed to do that


@Override
public boolean mouseClicked(double mouseX, double mouseY, int button /*? if >=1.21.9 {*/ ,boolean doubleClick /*?}*/) {
preferredTab = null;
Copy link
Owner

Choose a reason for hiding this comment

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

This means keyboard and controller navigation will not update this. You aught to find a better place for this to go in order to be a bit more abstract about it.

Copy link
Author

Choose a reason for hiding this comment

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

ah right
um
maybe in setFocused?

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