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

Candidature: conserver le mode d'affichage (Tableau/Liste) quand on efface tous les filtres #5435

Merged
merged 2 commits into from
Jan 23, 2025

Conversation

xavfernandez
Copy link
Contributor

🤔 Pourquoi ?

Actuellement, quand on se met en mode tableau et qu'on ajoute des filtres (ou dans l'autre sens), si on enlève ensuite les filtres avec le bouton "Effacer tout", on est rebasculé en mode liste.

Pas trop d'idée de test par contre...

🍰 Comment ?

Décrivez en quelques mots la solution retenue et mise en oeuvre, les difficultés ou problèmes rencontrés. Attirez l'attention sur les décisions d'architecture ou de conception importantes.

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

🏝️ Comment tester

Les instructions pour reproduire le problème, les profils de test, le parcours spécifique à utiliser, etc. Si vous disposez d'une recette jetable, mettre l'URL pour tester dans cette partie.

💻 Captures d'écran

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.

Tu pourrais vérifier que le lien de reset contient ce query param ?

When removing all filter from table view, users expect to stay in table
view.
@xavfernandez xavfernandez force-pushed the xfernandez/fix_reset_filter_button branch from e83ace4 to cd4a256 Compare January 23, 2025 09:29
@xavfernandez
Copy link
Contributor Author

J'ai snapshoté :)

@xavfernandez xavfernandez added this pull request to the merge queue Jan 23, 2025
Merged via the queue into master with commit 93f028b Jan 23, 2025
11 checks passed
@xavfernandez xavfernandez deleted the xfernandez/fix_reset_filter_button branch January 23, 2025 11:40
@@ -10,15 +10,15 @@
{% if btn_dropdown_filter|default:False %}
<div class="ms-md-auto" id="apply-list-filter-counter"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{% if filters_counter > 0 %}
<a href="{{ reset_url }}" class="btn btn-ico btn-dropdown-filter" aria-label="Réinitialiser {{ filters_counter|pluralizefr:"le filtre actif,les filtres actifs" }}">
<a href="{{ reset_url }}?display={{ display_kind }}" class="btn btn-ico btn-dropdown-filter" aria-label="Réinitialiser {{ filters_counter|pluralizefr:"le filtre actif,les filtres actifs" }}">
Copy link
Contributor

Choose a reason for hiding this comment

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

Pourquoi ne pas avoir utilisé un URL dédié ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Avec un {% url_add_query list_url display=display_kind as reset_url %} ?

Copy link
Contributor

Choose a reason for hiding this comment

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

Non, je pensais changer directement le path plutôt qu’un query param. Ça permet de retenir la vue en cours sans tricher.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah oui, mais c'est plus impactant cela 😅 .
Avec la vue tableau qui va passer par défaut (et du coup la vue liste qui serait en sursis ?), je ne vais pas me précipiter 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants