-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Topic filter #144
Topic filter #144
Conversation
Something that came up while talking about this feature: htop F3 Search vs F4 Filter. |
I think the filter/search should be case insensitive. "Simple" pattern matching would be nice I think. |
When clearing retained messages, it's essential to adhere to the specified filter criteria. For instance, consider the following topics:
Applying a filter for |
The current Simple functionality is working and solves lots of issues.
If they make sense to you, I would be glad to add these features. |
thank you for your input! I have some thoughts on them. Guess there is no perfect way of doing it and I want to balance usefulness and simplicity (for both using and developing) with it.
The downside of the MQTT topic matching is the required stuff like
Not sure if that’s over the top already. I like the simplistic approach of htop there: it’s only in the bottom line not obstructing the view of something else. Also the widget looks like it has way too much. There is no need for things like multiline or things like that. What’s currently missing what’s really needed?
That’s more like the F3 Search of htop while currently it’s more implemented like F4 Filter. Still not sure what’s better or more useful. |
Are there other things here being similar? I thought about just denying to use that feature while a filter is used as it's more complicated then. Another thought is to not add the filter and only add a search. Then nothing like that is possible to confuse users in the first place. |
I don't like the idea of blocking the feature in general. Maybe a more explicit warning? |
I agree with you, I didn't feel that I need this feature in the past, but a workaround for this could be make a decision to use matches function when we have
No, not really.
As a user, It felt bad not to be able to navigate between the results while searching. it is my opinion. |
I like that we are thinking about these things!
I think I'd go with the simple solution of not including something like that at first. Keeping it simple. Somehow I think a search function would be more beneficial than a filter function. It has less downsides (the remove retained feature for example) and serves the purpose of finding topics of interest. |
b5d8e4e
to
a596e98
Compare
For everyone looking into this: I created a topic search PR #145 which will likely supersede this PR. Feel free to join into the discussion and provide feedback! It was very helpful here to come to that point in the first place. |
Closing in favor of #145 |
The initial implementation just does
topic.contains(filter)
which is very simple. Is that enough? I thought about mqtt topic matching (+/status/#
) or regular expressions (\/status\/
) but that would be more complex quickly.#103 thought about searching in the current payload too. Not sure how well that works performance wise. Also it might be not as easy to understand what's going on in such a case. Keeping it simple might be the best overall solution?
Other thoughts?
(You can test around with the build including the current filter mechanic prebuilt from here when logged in to GitHub: https://github.com/EdJoPaTo/mqttui/actions/workflows/rust.yml?query=branch%3Atopic-filter)