-
Notifications
You must be signed in to change notification settings - Fork 64
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 hierarchy follow up #4818
Conversation
- restructured hierarchy computed prop to extend functionality - remember open state for each topic segment - alter topic count to include deeply nested topics not just immediate children - add the ability to copy topic path
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4818 +/- ##
=======================================
Coverage 78.70% 78.70%
=======================================
Files 316 316
Lines 15152 15152
Branches 3486 3486
=======================================
Hits 11925 11925
Misses 3227 3227
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Serban, the topic count at the fully collapsed level is 8
in this screenshot but it is not reflective of the actual number of topics. You are counting the number of topics + the number of levels.
Let me try to clarify:
There really only is 5 topics:
- another-long-topic with spaces and Not-well-formed/at/all/really/test1
- another-long-topic with spaces and Not-well-formed/at/all/really/test2
- another-long-topic with spaces and Not-well-formed/at/all/really/test3
- another-long-topic with spaces and Not-well-formed/at/all/really/test6
- another-long-topic with spaces and Not-well-formed/at/all/really/test8
... but your tree is counting nesting levels as additional topics
In MQTT Explorer, this is clearer as they only show the count on the immediate parent:
Altered the counting method to only consider terminating segments/children This implies that a response of 'foo/bar', Not 100% sure if the initial foo/bar should be counted off as a terminating segment as it has nested topics. @hardillb please advise |
Yes if |
In this case, the UI would need some tweaking to let users know that foo/bar is a standalone topic otherwise it would seem that the counter is glitching @joepavitt I'd appreciate your input on the UI side |
@hardillb would something along these lines be suggestive enough? |
Cant we just lose the slashes in the visualisation (obviously they are still required to make a valid topic in the copy data) and where there is an empty topic, perhaps a grey (empty) placeholder would be better? Also. that count of 7 doesn't look right? What were the underlying topics that built that out? |
Removing the slashes works, but would still need a way to indicate mid topic message. The video from Steve has access to the last message value which helps, but we don't have that. How about not adding the extra entry (with the bare e.g.
|
A Also, I really think we should not show the topic separators |
|
…ounter to also count terminating segments
Can you explain what this means please? I'd expect every tier to be able to receive topics? The archive icon looks like a delete/remove icon |
While every level can, not every level has, the marker is on the topics that have had a message published, leaving intermediate levels unmarked. |
From what I can tell not all topics have messages. If i have a topic response with the following form:
only the terminating foo, paz and baz topics hold messages while acme and bar don't. We don't display topic messages like MQTT Explorer does so we'd need a way to demarcate what topics hold or don't hold messages. While terminating topics are self explanatory that they have messages, topics like foo are not represented/demarcated accordingly in our interface. MQTT Explorer displays the last received message even on middle topics and for all terminating topics so you can differentiate between topic segments that are holding messages. Another representation solution that was mentioned was to mark middle topics with |
Agree with everything @knolleary has said |
The problem with this is that '/' or '(empty)' as we represent it is a valid root topic. As for the counter and not demarcating segments with messages, I can go wherever which way you decide. |
missed the leading slash in Ok then, I'll adjust accordingly! |
…, combine empty starting topics into /topic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cstns super close, but one case not quite working as expected.
If I publish to top/a/b
- then it correctly shows me top
at the top level:
If I then publish to /top/c/d
- it then only shows /top
at the top level, and the topics under top
have now been placed under it:
In this scenario, I'd expect to see separate top-level entries for top
and /top
…w-up # Conflicts: # frontend/src/pages/team/UNS/Hierarchy/components/TopicSegment.vue
should be fixed now, I don't know how i missed it 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Description
Related Issue(s)
closes #4801
closes #4802
also implemented a topic open state management mentioned in the main PR as a comment
Checklist
flowforge.yml
?FlowFuse/helm
to update ConfigMap TemplateFlowFuse/CloudProject
to update values for Staging/ProductionLabels
area:migration
label