Skip to content

Conversation

@guilyx
Copy link

@guilyx guilyx commented Nov 13, 2025

Hello @facontidavide, coming with some overall improvement (UX improvements) for the republisher plugin:

Problem(s):

  1. Topics in the "Select topics to be published" dialog were shown in the order they appeared in the metadata, not alphabetically, making it hard to find specific topics.
  2. Menu for selecting topics differed from the one in data loader selection

Solution(s)

  1. Sort topics alphabetically by name before displaying them
  2. Add a filter input box for quick topic search
  3. Replace checkboxes with a table widget for row selection and highlighting (consistent with the data loader dialog)

Changes

Alphabetical Sorting:

  • Added #include for std::sort
  • Sort _topics_info by topic_name before populating the dialog
  • Topics now appear in alphabetical order

Filter Functionality

  • Added filter input box (top right) with case-insensitive, space-separated term matching
  • Filter shows/hides topics based on search string
  • SelectAll/DeselectAll buttons work with filtered/visible rows

UI Improvements

  • Replaced QFormLayout with checkboxes with QTableWidget for row selection
  • Topics are highlighted when selected (same as data loader)
  • Click topic name to select/deselect (row selection)
  • OK button enabled only when topics are selected

Code Quality

Replaced deprecated foreach with C++11 range-based for loops
Note: void TopicPublisherROS2::broadcastTF(double current_time) was reformatted for consistency

Screenshots

From:

Screenshot from 2025-11-14 00-28-25

To:

Screenshot from 2025-11-14 00-30-03 image image

@guilyx guilyx changed the title Fix: Sort topics alphabetically in ROS2 republisher selection dialog Overall improvement of the Republisher Dialog (sorting, filters, better selection process) Nov 13, 2025
@facontidavide
Copy link
Contributor

also, the formatting changes make the PR much harder to review.

But that is not some, really. I will add clang-format and pre-commit to prevent that, but please be more considerate in the future.

@facontidavide
Copy link
Contributor

added proper formatting and check. Please fix conflict and reformat using pre-commit

@guilyx guilyx force-pushed the feat/sorting-republisher-topics branch from d6a03f2 to 6b3fbd0 Compare December 25, 2025 14:06
@guilyx
Copy link
Author

guilyx commented Jan 16, 2026

@facontidavide should be ready for review now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants