Skip to content

#582 Add topic autocomplete to rule creation dialog#583

Merged
bracyw merged 1 commit intodevelopfrom
582-topic-autocomplete-rule-dialog
Apr 7, 2026
Merged

#582 Add topic autocomplete to rule creation dialog#583
bracyw merged 1 commit intodevelopfrom
582-topic-autocomplete-rule-dialog

Conversation

@bracyw
Copy link
Copy Markdown
Collaborator

@bracyw bracyw commented Apr 7, 2026

Changes

Replaces the plain text input for the topic field in the add-rule dialog with a PrimeNG AutoComplete component. Topics are fetched from the backend via getAllDatatypes and filtered as the user types, matching case-insensitively against any segment of the "/" delimited path as well as partial paths. forceSelection ensures only valid topics can be submitted.

  • Swapped pInputText for p-autoComplete with forceSelection and fluid layout
  • Fetches topic list on dialog open via APIService.query with auto-cleanup (filter + take(1))
  • Registered AutoCompleteModule globally in main.ts

Notes

The edit-rule dialog does not have a topic field (it only edits expression and debounce time), so no changes were needed there.

Test Cases

  • Typing a partial segment like "volt" surfaces all voltage-related topics across BMS, VCU, DTI, etc.
  • Typing a partial path like "BMS/Pack" correctly matches topics under that hierarchy
  • Selecting a suggestion populates the form with the full topic name
  • Typing a non-matching string and blurring clears the field (forceSelection)
  • Form validation still requires a non-empty topic before submission

Screenshots

autocomplete-suggestions

Checklist

It can be helpful to check the Checks and Files changed tabs.
Please review the contributor guide and reach out to your Tech Lead if anything is unclear.
Please request reviewers and ping on slack only after you've gone through this whole checklist.

  • All commits are tagged with the ticket number
  • No linting errors / newline at end of file warnings
  • All code follows repository-configured prettier formatting
  • No merge conflicts
  • All checks passing
  • Screenshots of UI changes (see Screenshots section)
  • Remove any non-applicable sections of this template
  • Assign the PR to yourself
  • No package-lock.json changes (unless dependencies have changed)
  • Request reviewers & ping on Slack
  • PR is linked to the ticket (fill in the closes line below)

Closes #582

@bracyw bracyw self-assigned this Apr 7, 2026
@bracyw bracyw marked this pull request as ready for review April 7, 2026 22:45
@bracyw bracyw merged commit f28146f into develop Apr 7, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add topic autocomplete to rule creation dialog

1 participant