-
Notifications
You must be signed in to change notification settings - Fork 25
Remplacer le fil d'ariane par des boutons retour [GEN-237] #3884
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
Conversation
09c0ea3 to
d5f0135
Compare
80aaf3b to
439481b
Compare
|
🥁 La recette jetable est prête ! 👉 Je veux tester cette PR ! Préciser comment accéder à la fonctionnalité pour le métier :
|
hellodeloo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
francoisfreitag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je ne me suis pas trop plongé dans le code. En survolant et vérifiant quelques vues au hasard, ça m’a l’air bien.
| def is_list(url): | ||
| url_info = urlsplit(url) | ||
| url_path_last_part = url_info.path.split("/")[-1] | ||
| return any(url_path_last_part.endswith(postfix) for postfix in ["list", "results"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humpf, c’est assez crado. Après, si ça casse, on n’affichera juste pas “à la liste”, et si on doit maintenir une métadonnée qu’une vue est une ListView, y compris pour les function-based views, il y aura aussi des oublis. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C'est pour ça que j'ai ajouté des assert_previous_step dans tout plein de tests pour m'assurer que c'est en place.
Mais oui, c'est un peu crado en attendant d'avoir une idée de génie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je confirme la craditude mais return url_path_last_part.endswith(("list", "results")) permet d'être crado de manière plus courte.
106cb72 to
fa828f5
Compare
604effb to
16d8001
Compare
16d8001 to
2b6c201
Compare
|
Pour gérer des parcours de navigation un peu complexes entre les pages d'entreprise et de postes avec un retour à la liste au bon endroit j'ai revu un peu ma gestions de l'url de retour sur ces 2 vues (voir dernier commit de la PR) @francoisfreitag as-tu un avis là dessus ? |
|
C’est l’enfer de devoir garder l’historique de navigation de l’utilisateur de notre côté. Je me demande si on ne devrait pas limiter les Dans la fiche de poste ou la fiche entreprise, on garde le Qu’en penses-tu ? (j’espère que c’est clair) |
3767fa1 to
729fb8a
Compare
xavfernandez
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pas trop fan de tous ces back_url qu'on va se trimbaler et j'étais plutôt dans l'équipe du fil d'ariane mais bon 🤷♂️
| def is_list(url): | ||
| url_info = urlsplit(url) | ||
| url_path_last_part = url_info.path.split("/")[-1] | ||
| return any(url_path_last_part.endswith(postfix) for postfix in ["list", "results"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Je confirme la craditude mais return url_path_last_part.endswith(("list", "results")) permet d'être crado de manière plus courte.
|
Je préfère aussi le fils d'ariane, mais dans tous les cas, on aurait eu une construction complexe à cause des différents points d'entrée possible des pages... |
729fb8a to
d9b5cd7
Compare
|
Niveau passage des back_url : |
francoisfreitag
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Merci pour les pointeurs 😊
d9b5cd7 to
63a0784
Compare

Pourquoi ?
Pour que ce soit mieux :D