camptocamp / mel-dataplatform

Source code for MEL's OpenData platform frontend
https://data.lillemetropole.fr/
GNU General Public License v3.0
2 stars 0 forks source link

[Search page] Add search input and filters #22

Closed tkohr closed 7 months ago

tkohr commented 7 months ago

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 commented 7 months ago

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.

tkohr commented 7 months ago

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