Skip to content

Inscription: Refonte de parcours pour les candidats [GEN-1569]#4991

Merged
calummackervoy merged 1 commit into
masterfrom
calum/refonte-parcours-inscription
Dec 18, 2024
Merged

Inscription: Refonte de parcours pour les candidats [GEN-1569]#4991
calummackervoy merged 1 commit into
masterfrom
calum/refonte-parcours-inscription

Conversation

@calummackervoy

Copy link
Copy Markdown
Contributor

🤔 Pourquoi ?

Nous rencontrons des difficultés avec les candidats qui sont plusieurs à se partager la même adresse email.

Example : Un candidat peut s’inscrire avec un compte Pe connect et son épouse utiliser un compte France connect qui utilise le même email , des données sont écrasées à tort , on ne sait plus à qui appartient le compte ni qui est légitime à conserver ses données dessus.

🍰 Comment ?

Dans cette contexte on a dessiné un nouveau parcours d'inscription, pour améliorer l'UX autours des comptes existants. Dans cette PR :

  • Les pages et formulaires d'inscription ont été refait afin de changer leur contenu et l'ordre
  • Parmis les dessins il y a un système complexe à résoudre si un utilisateur existe, principalement pour changer le contenu de la modale affiché au utilisateur. La modale introduit pour gerer un conflit d'email suite à l'inscription avec un SSO a été reconditionné pour ce but, et j'ai créé une nouvelle classe (JobSeekerSignupConflictModalResolver) qui encache la complexité du dev du formulaire.
  • Date de naissance a été ajouté dans les champs d'inscription.
  • Pour éviter un 404 pendant la migration, un URL temporaire a été créé pour l'ancienne signup:job_seeker_nir. Similairement, j'ai ajouté un redirect temporaire qui invalide un parcours d'inscription démarré si le clé ITOU_SESSION_NIR_KEY existe dans la session (clé autrement enlevé par ce PR)
  • J'ai considéré l'utilisation d'un wizard du django-formtools qui est utilisé dans quelques autres parcours, mais enfin j'ai préféré utilisé la patterne existante. Principalement pour impacter le code moins, et pour rester sur un arbre d'inheritance des forms/views plus parallèle à celui de django-allauth

🚨 À vérifier

  • Mettre à jour le CHANGELOG_breaking_changes.md ?

💻 Captures d'écran

Screenshot 2024-10-28 at 11 12 25 Screenshot 2024-10-21 at 16 53 38 Screenshot 2024-10-28 at 11 13 32

Utilisateur non-existant :

Screenshot 2024-10-28 at 11 14 09

Utilisateur existant :

Screenshot 2024-10-28 at 11 23 42

Erreur affiché dans le cas où je retourne à inscription :

Screenshot 2024-10-28 at 11 24 31

@calummackervoy calummackervoy added the modifié Modifié dans le changelog. label Oct 28, 2024
@calummackervoy calummackervoy self-assigned this Oct 28, 2024
@notion-workspace

Copy link
Copy Markdown

@calummackervoy

Copy link
Copy Markdown
Contributor Author

Dans les dessins "Suivant" est griser quand il y a des champs restants non-remplis mais obligatoires :

Screenshot 2024-10-28 at 11 31 40

Ce serait dommage parce que ce serait une amélioration UX... vous pensez que ça vaut l'ajout du JS, testé à la main avec juste un test snapshot ?

Comment thread itou/www/signup/forms.py
<b>Ou utilisez votre adresse e-mail</b>
</div>

<form method="post" action="{% url 'signup:job_seeker' %}" role="form" class="js-prevent-multiple-submit" data-matomo-name="signup-job-seeker-identity">

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Je veux souligner que j'ai enlevé la classe js-prevent-multiple-submit ici - afin de ne pas empêcher les utilisateurs de retourner et changer leurs informations une fois après avoir continuer à l'étape suivante

@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from f3a01d8 to 7ac6280 Compare October 28, 2024 11:01
Comment thread itou/templates/signup/includes/no_email_link.html
@hellodeloo

Copy link
Copy Markdown
Contributor

@calummackervoy j'ai pushé un commit de correction UI. Les modifications UI ont été validées par @AntoinePoindron

Comment thread itou/www/signup/errors.py Outdated
@hellodeloo hellodeloo force-pushed the calum/refonte-parcours-inscription branch from bae8624 to 73193a4 Compare October 28, 2024 17:08
Comment thread itou/openid_connect/utils.py
Comment thread itou/templates/signup/job_seeker_situation.html Outdated
Comment thread itou/utils/constants.py
Comment thread itou/www/signup/errors.py Outdated
Comment thread itou/www/signup/errors.py Outdated
Comment thread tests/www/welcoming_tour/tests.py Outdated
Comment thread tests/www/signup/test_job_seeker.py Outdated
Comment thread tests/www/signup/test_job_seeker.py Outdated
Comment thread tests/www/signup/test_job_seeker.py Outdated
Comment thread tests/www/signup/test_job_seeker.py Outdated
Comment thread itou/templates/signup/job_seeker_signup_base.html Outdated
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from 73193a4 to f0b3f2f Compare October 29, 2024 15:57

@tonial tonial left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

J'ai rajouté quelques commentaire pour améliorer un peu les tests

Comment thread tests/www/signup/test_job_seeker.py
Comment thread itou/www/signup/errors.py Outdated
Comment thread tests/www/signup/test_job_seeker.py
@calummackervoy calummackervoy requested a review from tonial October 30, 2024 14:59
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from f0b3f2f to 9e884e3 Compare October 30, 2024 15:00
Comment thread tests/www/signup/test_job_seeker.py
Comment thread itou/static/css/itou.css Outdated
white-space: nowrap !important;
}

/* Override itou-theme on some forms */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Est-ce encore utile ? Pas moyen de mettre une classe utilitaire à la place ?

@calummackervoy calummackervoy Nov 4, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

La classe form-checkbox-greater-spacing est une classe utilitaire que j'ai ajouté. J'ai enlevé le commentaire /* Override itou-theme on some forms */

@tonial

tonial commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

Après vérification, quand un candidat change son adresse email, on ne crée par d'objet EmailAddress donc le cas de figure n'est pas possibe. LGTM

Par contre, c'est un soucis, et il faudrait le corriger, à remonter au métier

@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from 9e884e3 to a0475b5 Compare November 4, 2024 10:30
@calummackervoy calummackervoy added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Nov 4, 2024
@github-actions

github-actions Bot commented Nov 4, 2024

Copy link
Copy Markdown

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

Comment thread itou/openid_connect/utils.py Outdated
Comment thread itou/templates/signup/job_seeker_signup.html Outdated
Comment thread itou/www/signup/forms.py Outdated
Comment thread itou/templates/signup/includes/no_email_link.html Outdated
Comment thread itou/templates/signup/job_seeker_signup.html Outdated
{% bootstrap_field form.password1 %}
{% bootstrap_field form.password2 wrapper_class="form-group mb-0" %}
<div class="form-text mb-0">
Vous pourrez créer et modifier des informations telles que votre adresse ou un lien vers un CV après votre inscription, à partir de votre tableau de bord.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Je sais que c'est le texte existant mais a priori la partie sur le lien vers le CV n'est plus d'actualité depuis quelques années ?

@calummackervoy calummackervoy Nov 4, 2024

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
Vous pourrez créer et modifier des informations telles que votre adresse ou un lien vers un CV après votre inscription, à partir de votre tableau de bord.
Vous pouvez modifier ces informations après vous être inscrit, à partir de votre tableau de bord.

Il y a un lien depuis le tableau de bord vers une service qui permet à téléverser le CV, mais j'imagine on a pas besoin du prédire ici ?

Screenshot 2024-11-04 at 15 50 36

Comment thread itou/templates/signup/job_seeker_signup_credentials.html Outdated
Comment thread itou/www/signup/errors.py Outdated
Comment thread itou/www/signup/errors.py Outdated
Comment thread itou/www/signup/forms.py Outdated
Comment on lines +131 to +130
request = None # View request optional (used for creating error modals to manage identity conflicts)
_nir_submitted = None
_email_submitted = None

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pourquoi les définir sur la classe et non sur l'instance dans __init__ ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

C'est peut-être l'influence des autres langues mais je le trouve plus explicite ?

@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from a0475b5 to fce6458 Compare November 4, 2024 15:01
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch 3 times, most recently from 3596eb3 to 28e5350 Compare November 26, 2024 08:55

@xavfernandez xavfernandez left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Je viens de tester de créer 2 fois le même candidat avec 2 adresses emails différentes mais à chaque fois un NIR temporaire/pas de NIR.
Le doublon est bien détecté mais on affiche cette modale:
Screenshot 2024-11-26 at 17-09-08 Demandeur d'emploi - Inscription - Les emplois de l'inclusion
ce qui est assez perturbant vu que je n'ai jamais donné de NIR.

Comment thread itou/www/signup/errors.py Outdated
and User.objects.filter(
kind=UserKind.JOB_SEEKER,
jobseeker_profile__birthdate=cleaned_data["birthdate"],
jobseeker_profile__nir="",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pourquoi ignorer ceux avec un NIR ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Je viens d'avoir le même retour du métier, je l'enlèverai 😅 au début c'était pour cibler le cas donné dans le ticket en limitant la possibilité que deux Jean-Paul Sartre 21/06/1905 légitimement distincts vont se tomber sur la modale

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ah bah en fait je pense que j'ai bien lu le Figma pour ce cas, j'attends le métier pour voir si on va ajouter un cas pour les noms matchant sans NIR

Comment thread itou/www/signup/forms.py Outdated
@calummackervoy

Copy link
Copy Markdown
Contributor Author

Un compte existe déjà avec ce NIR

Je viens de tenter répliquer sur ma machine et c'est la message d'erreur quand l'email est déjà utilisé par un autre utilisateur dans la base de données :

Screenshot 2024-11-27 at 12 40 10

Celui-ci est la notification quand tu utilises un NIR temporaire, avec le même nom / date de naissance mais un e-mail différent :

Screenshot

@xavfernandez

Copy link
Copy Markdown
Contributor

Un compte existe déjà avec ce NIR

Je viens de tenter répliquer sur ma machine et c'est la message d'erreur quand l'email est déjà utilisé par un autre utilisateur dans la base de données :

Tu peux essayer de t'inscrire sur https://c1-review-calum-refonte-parcours-inscription.cleverapps.io/signup/
avec:

@calummackervoy

Copy link
Copy Markdown
Contributor Author

@xavfernandez oui il y a un utilisateur inscrit avec cette adresse mail

Si j'utilise une autre adresse c'est la bonne modale qui est affichée sur la page :

Screenshot 2024-11-27 at 14 20 14

@xavfernandez

xavfernandez commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

oui il y a un utilisateur inscrit avec cette adresse mail

Je sais c'est moi qui l'ai créé 😅

Mais du coup, si tu rentres 2 fois les mêmes infos sans donner de nir tu as le message "Un compte existe déjà avec un NIR différent"

@calummackervoy

calummackervoy commented Nov 27, 2024

Copy link
Copy Markdown
Contributor Author

Ahh maintenant je vois ! Difficile à percevoir avec le grand dessins des flows 🙈 c'est un bug oui la message d'erreur devrait être "Vous possédez déjà un compte"

@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from b7c19f5 to b71939f Compare November 27, 2024 14:42
@calummackervoy calummackervoy added 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC and removed 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC labels Nov 27, 2024
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from b71939f to 44e9f9c Compare December 3, 2024 10:04
@calummackervoy calummackervoy added 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC and removed 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC labels Dec 3, 2024
@github-actions

github-actions Bot commented Dec 3, 2024

Copy link
Copy Markdown

🥁 La recette jetable est prête ! 👉 Je veux tester cette PR !

@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch 2 times, most recently from d89a2e7 to 6936d17 Compare December 3, 2024 15:00
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from 6936d17 to d72039d Compare December 11, 2024 09:52
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from d72039d to 7b00594 Compare December 11, 2024 17:05

@tonial tonial left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ça me semble bon !

Comment thread itou/openid_connect/utils.py Outdated
Redesign JobSeeker signup process

Improve error behavior on NIR or email conflict

Provide detailed error information to the user, and provide them the opportunity to login with the existing account or continue their registration with new details

Add some logic to redirect users mid-registration during deployment

Fix form submission prevention when returning to change information

Fix test

fix: ui adjustments

Refactor registration modal content to use title element

The new solution is a simple approach to addressing accessibility and styling concerns with the previous solution

Remove custom title for job_seeker_situation.html during job-seeker signup process

For consistency with the other steps in the process

Fix grammar in SSO email conflict modal

Temporary legacy support during NIR initialization (SSO signup)

Support for users midway through the signup process when the new code is deployed

Following SSO signup, clean the session keys

Code cleanliness improvements in JobSeekerSignupConflictModalResolver

Simplify session key test assertions

Add comment for clarifying role of JobSeekerSignupConflictModalResolver

Remove typo from previous commit

Remove stray TODO and update modal content around password reset link

Remove now unused variable from JobSeekerSignupConflictModalResolver logic

Extend TestJobSeekerSignup tests

Adds a test for unverified EmailAddress (django-allauth) and a condition for the presence of a link to existing user login

Remove unnecessary comment and whitespace from itou.css

Fix alignment on jobseeker signup views (CSS)

Remove login_reminder.html and move into template where it's used

Fix typo in comment

Rename form class to follow convention

Replace no_email_link.html text in JobSeekerSignup form

To bring the template closer to the designs

Fix typo in signup form

Update snapshot for fixed typo

Update signup prompt text to be shorter and up-to-date

Refactor use of lambas in JobSeekerSignupConflictModalResolver

simplify code

Fix styling on login_reminder

Fix other differences with the original designs

Replace job_seeker_signup logo PNG with SVG

Revert "Replace job_seeker_signup logo PNG with SVG"

This reverts commit e9e9f5b.

Added extra tests for temporary NIR cases

Detect conflict on name fields when temporary NIR is in use

Fix gramatical error in modal content

Tweak support URL destinations in error modals

Fix impossible to continue on multiple errors and temporary NIR

Fix wording on email conflict modal

Fix quality

Allow users to re-submit NIR if it's invalid

Fix pipeline

Fix modal grammar

Birth date/name conflict does apply when NIR is defined on the account

Shorthand solution for QueryDict mutability workaround

Matching everything except a temporary NIR is now considered a complete match

Additional modal for name/birth fields

Fix subtle differences in color on signup views

Update snapshots for job seeker signup

Change dismiss_text of error modal depending on tentative success of registration

Display submitted data and add ability to return from the registration page

Restyle signup modals and final form

Reinstate ITOU_SESSION_NIR_KEY constant with a TODO
@calummackervoy calummackervoy force-pushed the calum/refonte-parcours-inscription branch from 7b00594 to 4567b8f Compare December 18, 2024 08:10
@calummackervoy calummackervoy added this pull request to the merge queue Dec 18, 2024
Merged via the queue into master with commit 44842fe Dec 18, 2024
@calummackervoy calummackervoy deleted the calum/refonte-parcours-inscription branch December 18, 2024 08:31
@sentry

sentry Bot commented Dec 24, 2024

Copy link
Copy Markdown

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ User.jobseeker_profile.RelatedObjectDoesNotExist: User has no jobseeker_profile. /signup/job_seeker View Issue

Did you find this useful? React with a 👍 or 👎

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

Labels

1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC modifié Modifié dans le changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants