thomasnordquist / MQTT-Explorer

An all-round MQTT client that provides a structured topic overview
https://mqtt-explorer.com
Other
2.99k stars 287 forks source link

Search box behavior quirks #676

Open leifclaesson opened 1 year ago

leifclaesson commented 1 year ago

Hi! Thank you for an incredible tool, I use it all the time. I have one issue with the Search box behavior, though.

In a large MQTT tree, it can be difficult to find things in the (unsorted) tree, which is why it's great to have the search box.

When you enter text into the search box, it does not just navigate to the right place in the tree, it also hides all the non-matching messages, which is great too.

But, here's where the problem comes in.

When you've entered a search query and found the part of the tree you're looking for, you don't see the relative location in the tree, because everything else is hidden. And, when you clear the search query by pressing X, MQTT Explorer navigates AWAY from the item you've selected and unselects it, even if you've specifically clicked on it. So, you're back to square one.

I don't know why MQTT explorer does this, and I would much rather it didn't. I don't understand why clearing the search box affects the selection. Other programs do not do this -- for example, in a web browser you can search to find a part of the document, and when you close the search box the web browser does not clear the highlight and scroll back to the beginning, because that would be the opposite of helpful.

It would greatly reduce frustration and increase utility of the search box if this behavior could be changed. :)