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

[Search page] Add search input and filters #22

Merged
merged 21 commits into from
Feb 28, 2024
Merged

[Search page] Add search input and filters #22

merged 21 commits into from
Feb 28, 2024

Conversation

tkohr
Copy link
Member

@tkohr tkohr commented Feb 21, 2024

This PR adds the search form to the search page and a load more button at the bottom of the page.

The search input has not been adapted to the design yet, as the search input from #23 will be reused for this.

Todos:

search_form

@tkohr tkohr marked this pull request as ready for review February 23, 2024 13:33
tkohr added 18 commits February 27, 2024 10:52
search-filters are just placeholders for now
that uses gn-ui components for now
to implement dropdown button template corresponding to mockups
only use mel-primary-button tailwind component here instead of angular component
also adds mel-title-line to styles for common red line over titles and makes checked checkboxes display in primary color
to prevent ghost displaying in search-results if no results found
Copy link
Contributor

@cmoinier cmoinier left a comment

Choose a reason for hiding this comment

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

Thanks for this big work! 👍

A few comments and behavior issues I noticed :

  1. In some cases, if i type only a part of a word that I know will match (eg : "carto" or "conven") in the home page, it goes to the search page alright, but returns no results (when it should). When I do that with some other words (eg : 'alpen'), it returns the right results.

  2. Shouldn't filter's numbers be updated with the search? for instance this is misleading for the user IMO (5 results but multiple themes have a count in the filters). I don't know if it's something that's done in gn-ui actually.
    image

  3. @Angi-Kinas if you test, FYI, you'll need to run npm install first to upgrade gn-ui deps.

Copy link
Contributor

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Thanks @tkohr this works like a charm :)

I noticed only a really small detail in the UI:

  • the borders of the filter buttons are not rounded in the design, but it's almost not noticeable ;-)

@@ -2,7 +2,7 @@
<gn-ui-content-ghost
ghostClass="h-[212px]"
class="container"
[showContent]="resultsReady"
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for cleaning this up! I don't know why I implemented it with overrides...

@tkohr
Copy link
Member Author

tkohr commented Feb 28, 2024

Thanks for the detailed reviews @cmoinier @Angi-Kinas ! I've added a commit to address the rounded buttons and the tests.

Thanks also for pointing out the following two points:

  1. In some cases, if i type only a part of a word that I know will match (eg : "carto" or "conven") in the home page, it goes to the search page alright, but returns no results (when it should). When I do that with some other words (eg : 'alpen'), it returns the right results.

  2. Shouldn't filter's numbers be updated with the search? for instance this is misleading for the user IMO (5 results but multiple themes have a count in the filters). I don't know if it's something that's done in gn-ui actually.

I totally agree that both behaviors are not ideal, but they are identical in gn-ui. 1. seems to be due to search on entire words only. Not sure if there are bugs or if this has not been implemented yet, but it should be fixed or evolved in gn-ui.

Copy link
Contributor

@Angi-Kinas Angi-Kinas left a comment

Choose a reason for hiding this comment

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

Thanks @tkohr for addressing the comments. I had another look and for me it looks good to go 🚀

@tkohr
Copy link
Member Author

tkohr commented Feb 28, 2024

Just a note from the gn-ui daily regarding the two behaviors mentioned above:

  1. The search currently does not execute a fuzzy search, but you can use a wildcard (like "carto*") to search for parts of a word
  2. Improving the proposed options in the multiselect-dropdowns is a feature waiting for financing

@tkohr tkohr merged commit 0a35220 into main Feb 28, 2024
7 checks passed
@tkohr tkohr deleted the search-filter branch February 28, 2024 09:51
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.

3 participants