Skip to content

Conversation

@Lolretrorat
Copy link

Description

Added enhancement to courseflow unit search including autocomplete of available units that dynamically updates as input updates.

Also added remove units from list functionality

Fixes # (issue)

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

AS an admin
IF i input text into a search field
THEN i should see autocomplete suggestions
AND selecting an option should add the unit to the required/elective unit list
AND furhter autocomplete suggestions should not include the unit again

Input sanitization was also verified

Testing Checklist:

  • Tested in latest Chrome
  • Tested in latest Safari
  • Tested in latest Firefox

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have requested a review from @macite and @jakerenzella on the Pull Request

@Lolretrorat
Copy link
Author

Lolretrorat commented Sep 4, 2025

image

autocomplete

image

list of units

image

sanitization

image

new remove button

image

unit 002 selected

image

001 and 003 only show

Copy link

@Duy-Nguyen1104 Duy-Nguyen1104 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Josh. I have fetched your PRs and tested out the behavior regarding searching for unit. Here are the improvements that I confirmed:

  • When I search for a unit, the text I enter is used as a filter to find the exact match.
  • As I type, a filtered list appears above the search bar.
  • I can search using both the code and unit title

Everything is working smoothly. As a future enhancement, we could make the filter more fine-grained (e.g., by level or campus). Overall, great work!

Copy link

@AB-Deakin AB-Deakin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and Approved by Alex Brown 14/09/2025 no issues running and testing the changes. Above suggestions from Duy are good too.
2
1

@WaelAlahamdi
Copy link

Hi @Lolretrorat
I have tested the new feature, and everything is working as expected. The autocomplete filters units correctly by code and title, prevents duplicates, and the remove option updates the list instantly. Input sanitisation also works well. Thank you for this work.

Copy link

@Triet-coder Triet-coder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image image image Looks good! The courseflow unit search works smooth — autocomplete updates live as I type, and removing units from the list is clean with no weird side effects. I tested add/remove, fast typing, and empty state; no regressions. Maybe just add a small debounce to cut extra calls and a quick test for remove + no-match case.

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.

5 participants