Skip to content

Conversation

@francoisfreitag
Copy link
Member

🤔 Pourquoi ?

  • Faciliter la refonte UX/UI
  • Performances

@francoisfreitag francoisfreitag added the modifié Modifié dans le changelog. label Jun 20, 2024
@francoisfreitag francoisfreitag self-assigned this Jun 20, 2024
@francoisfreitag francoisfreitag requested a review from tonial June 20, 2024 14:06
@francoisfreitag francoisfreitag force-pushed the ff/dpt branch 2 times, most recently from 0aed187 to 5514628 Compare June 20, 2024 14:08
@francoisfreitag francoisfreitag marked this pull request as draft June 20, 2024 14:11
@francoisfreitag francoisfreitag removed the request for review from tonial June 20, 2024 14:11
@francoisfreitag
Copy link
Member Author

Arf, il y a toujours un problème avec le rechargement des départements si l’utilisateur change de ville. Je corrige.

The departments were computed by iterating over the list of objects,
forcing to fetch them all to memory. For Paris, with 100 kms radius,
that’s almost 2.5K job offers. That’s a lot of work, where a basic
adjacency list is likely sufficient for users.

Also, the departments field had to be reloaded when the search distance
changed. That would lead to a pretty annoying UI with the upcoming
changes to [Dropdown
filters](https://zeroheight.com/85c89893b/p/207551-buttons): when a
department is selected, the department field is reloaded (with HTMX),
closing the dropdown filter. Hence, a user wanting to select multiple
departments need to open the dropdown, click a department. The results
load, they can then open the dropdown, click a department, and so on.

Instead, use an adjacency list. Users can of course ask for an
impossible combination of filters, such as SIAE 5 kms from Limoges and
in Corrèze. They’ll just get no results, and pick more sensible filters.

The assertNumQueries were outdated, and were updated to better reflect
the actual queries.
@francoisfreitag francoisfreitag requested a review from tonial June 20, 2024 14:28
@francoisfreitag francoisfreitag marked this pull request as ready for review June 20, 2024 14:28
Copy link
Contributor

@tonial tonial left a comment

Choose a reason for hiding this comment

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

Ça semble en effet bien plus simple de pré-stocker les départements limitrophes :)

Par contre, je n'ai pas du tout vérifié DEPARTMENTS_ADJACENCY, on va faire confiance à la page github 👍

@francoisfreitag francoisfreitag added this pull request to the merge queue Jun 24, 2024
Merged via the queue into master with commit 3f6a0a5 Jun 24, 2024
@francoisfreitag francoisfreitag deleted the ff/dpt branch June 24, 2024 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants