FlowFuse / flowfuse

Connect, collect, transform, visualise, and interact with your Industrial Data in a single platform. Use FlowFuse to manage, scale and secure your Node-RED solutions.
https://flowfuse.com
Other
285 stars 64 forks source link

Topic browser does not handle empty topics gracefully #4819

Open Steve-Mcl opened 8 hours ago

Steve-Mcl commented 8 hours ago

Current Behavior

Trailing slashes on topics are not handled well (see gif)

To be clear, a trailing slash actually means empty topic section. It is not recommended but it is valid and many folk do it.

same goes for leading slashes. Again, not recommended as it creates an empty section in the topic hierarchy

chrome_n0gYXZAOw3

Expected Behavior

Either dont show the incomplete branch to child item or use a place holder like (empty)

we might also wish to NOT show trailing slashes on all the regular topic paths since a slash implies children - IMO, the presense of a caret/expander should be what indicates the topic has children - MQTT Explorer for example shows this:

image

I am not saying MQTT explorer handles all cases better, but there is no implication with the trailing slash that child topics exist (blank or otherwise)

Steps To Reproduce

publish to a topic with a trailing slash e.g. my/topic/

Environment

Have you provided an initial effort estimate for this issue?

I have provided an initial effort estimate