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

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

Merged
merged 1 commit into from
May 2, 2024

Conversation

francoisfreitag
Copy link
Contributor

@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

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
11 checks passed
@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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants