Skip to content
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

[FAU-418] Implement live search in the degree programs overview form #30

Merged
merged 16 commits into from
May 24, 2024

Conversation

zhyian
Copy link
Collaborator

@zhyian zhyian commented May 15, 2024

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes/features)
  • Docs have been added/updated (for bug fixes/features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
https://inpsyde.atlassian.net/browse/FAU-418

What is the new behavior (if this is a feature change)?
Added live search functionality, instead of page reloading we receive data via REST API.

Does this PR introduce a breaking change? (What changes might users need to make in their application due to this PR?)
No

Other information:
Psalm issue should be fixed after we merge this PR.

@zhyian zhyian marked this pull request as ready for review May 16, 2024 09:45
@zhyian zhyian requested review from shvlv, tyrann0us, amiut and o-samaras May 16, 2024 09:46
Copy link
Collaborator

@shvlv shvlv left a comment

Choose a reason for hiding this comment

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

As we discussed, the approach is a bit complicated because it uses a REST API JSON response, which requires generating HTML additionally. However, I like it because it's aligned with the general idea of using REST API. It could even be the first step to generating a degree program overview by getting REST API data from the providing website in real-time.

It works locally as expected.

Thanks!

Copy link
Collaborator

@amiut amiut left a comment

Choose a reason for hiding this comment

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

Thanks a lot for taking care of this, LGTM and works nicely locally.
There are only two things that I noticed:

  1. When typing something in the search input and then clear the search input, the search doesn't trigger, and previous keyword remains applied. same happens if you remove letter by letter, it works until 3 characters left.
  2. When triggering search, order and orderby are not preserved and get removed when filters are applied.

@zhyian
Copy link
Collaborator Author

zhyian commented May 21, 2024

Thank you for the review!

  • Implemented suggestion with triggering the search on blur event, if the text is less than 3 characters.
  • I appreciate you catching that. I didn't originally consider sorting when filtering, but you're right. I've now included it.

Copy link
Collaborator

@amiut amiut left a comment

Choose a reason for hiding this comment

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

Thanks a lot for incorporating the changes, LGTM 💪

Copy link
Collaborator

@tyrann0us tyrann0us left a comment

Choose a reason for hiding this comment

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

Thank you a lot for working on this! It's a massive job 💪🏽 and working beautifully in my local tests.
Left very minor comments that don't stop me from approving. Thanks!

resources/ts/degree-program-overview/degree-program.ts Outdated Show resolved Hide resolved
templates/search/filter/active-filters.php Outdated Show resolved Hide resolved
templates/search/filter/active-filters.php Outdated Show resolved Hide resolved
Copy link
Collaborator

@o-samaras o-samaras left a comment

Choose a reason for hiding this comment

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

LGTM in general. Left an a11y related comment.

Co-authored-by: Philipp Bammes <[email protected]>
Copy link
Collaborator

@o-samaras o-samaras left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

@zhyian zhyian merged commit 9766620 into dev May 24, 2024
7 checks passed
@zhyian zhyian deleted the FAU-418 branch May 24, 2024 11:59
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