Skip to content

Recherche employeur : amélioration de l’affichage lorsque le formulaire de recherche est invalide#4001

Merged
francoisfreitag merged 1 commit intomasterfrom
ff/tests
May 2, 2024
Merged

Recherche employeur : amélioration de l’affichage lorsque le formulaire de recherche est invalide#4001
francoisfreitag merged 1 commit intomasterfrom
ff/tests

Conversation

@francoisfreitag
Copy link
Member

@francoisfreitag francoisfreitag commented May 1, 2024

🤔 Pourquoi ?

Plusieurs petits problèmes d’affichage, dont les compteurs qui n’étaient pas initialisés (badges vides sur les onglets), bouton retour manquant.

Les problèmes ont été révélés en enlevant le marqueur ignore_template_errors.

🍰 Comment ?

Afin de mutualiser la construction du contexte entre form_valid() et form_invalid(), définition d’un get_context_data().

💻 Captures d'écran

Avant

image

Après

image

🏝️ Comment tester

  1. Visiter la page /search/employers/results?city=foo-44

@francoisfreitag francoisfreitag added the modifié Modifié dans le changelog. label May 1, 2024
@francoisfreitag francoisfreitag self-assigned this May 1, 2024
Fixes multiple glitches due to missing context data on the page, when
the form is invalid.
Issues revealed by removing the `ignore_template_errors` mark.

In order to make sure context is being shared between both the
`form_valid()` and `form_invalid()` code paths, define it in
`get_context_data()`.
Copy link
Contributor

@xavfernandez xavfernandez left a comment

Choose a reason for hiding this comment

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

🙏

@francoisfreitag francoisfreitag added this pull request to the merge queue May 2, 2024
Merged via the queue into master with commit 4f722f1 May 2, 2024
@francoisfreitag francoisfreitag deleted the ff/tests branch May 2, 2024 13:55
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