Skip to content

UX/UI: Passer le bouton “Modifier” de la fiche de poste à droite#5021

Merged
hellodeloo merged 1 commit into
masterfrom
deloo/fix-job-description-box-action-cta
Nov 7, 2024
Merged

UX/UI: Passer le bouton “Modifier” de la fiche de poste à droite#5021
hellodeloo merged 1 commit into
masterfrom
deloo/fix-job-description-box-action-cta

Conversation

@hellodeloo
Copy link
Copy Markdown
Contributor

@hellodeloo hellodeloo commented Oct 31, 2024

🤔 Pourquoi ?

Parcqu'il était tout seul dans une barre d'action prévue pour plusieurs boutons et que nous avons une mise en page prévue pour un seul bouton d'action

💻 Captures d'écran

Avant
capture 2024-10-31 à 15 41 38

Apres
capture 2024-10-31 à 15 42 14

@notion-workspace
Copy link
Copy Markdown

@hellodeloo hellodeloo self-assigned this Oct 31, 2024
@hellodeloo hellodeloo added the modifié Modifié dans le changelog. label Oct 31, 2024
@hellodeloo hellodeloo changed the title fix: job description box--action cta UX/UI: Passer le bouton “Modifier” de la fiche de poste à droite Oct 31, 2024
@hellodeloo hellodeloo added the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Oct 31, 2024
@github-actions
Copy link
Copy Markdown

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

{% if not can_update_job_description %}
{% if job.is_active and not siae.block_job_applications %}
{% if job_app_to_transfer %}
<div class="form-group col-12 col-lg-auto">
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.

Mais du coup ces bouton là aussi ont le même problème, non ?

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.

Le problème c'était que le bouton "Modifier" apparaissait seul dans la box d'action et que les UX préfèrent que s'il n'y a qu'un seul bouton, il apparaisse seul à la droite du titre, sans box d'action. S'il y a plusieurs boutons, alors là, OK, dans la box d'actions

Donc, a priori, les boutons changent juste de mise en page, pas de conditions d'apparitions (sauf si j'ai merdoullé)

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'avais l'impression qu'il n'y avait qu'un seul bouton, mais en fait il peut y en avoir plusieurs

@hellodeloo hellodeloo requested a review from tonial November 4, 2024 10:30
Copy link
Copy Markdown
Member

@francoisfreitag francoisfreitag left a comment

Choose a reason for hiding this comment

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

Pour éviter les redites, le patch suivant permet de mutualiser le code, au prix d’un peu de différence dans les espacements.

Peut-être l’améliorer un peu ?

diff --git a/itou/templates/companies/job_description_card.html b/itou/templates/companies/job_description_card.html
index 2a83ad370..0d4c30904 100644
--- a/itou/templates/companies/job_description_card.html
+++ b/itou/templates/companies/job_description_card.html
@@ -26,18 +26,18 @@
         {% include "apply/includes/job_application_external_transfer_progress.html" with job_app_to_transfer=job_app_to_transfer step=1 only %}
     {% endif %}
 
-    {% if can_update_job_description %}
-        <div class="d-flex flex-column flex-md-row gap-3 mb-3 mb-md-4 justify-content-md-between">
-            <div>
-                <h1 class="m-1">{{ job.display_name }}</h1>
-                {% if job.is_active %}
-                    <p class="mb-0">
-                        <span class="badge rounded-pill bg-success">
-                            {{ job.open_positions }} poste{{ job.open_positions|pluralizefr }} ouvert{{ job.open_positions|pluralizefr }} au recrutement
-                        </span>
-                    </p>
-                {% endif %}
-            </div>
+    <div class="d-flex flex-column flex-md-row gap-3 mb-3 mb-md-4 justify-content-md-between">
+        <div>
+            <h1>{{ job.display_name }}</h1>
+            {% if job.is_active %}
+                <p class="mt-n2">
+                    <span class="badge rounded-pill bg-success">
+                        {{ job.open_positions }} poste{{ job.open_positions|pluralizefr }} ouvert{{ job.open_positions|pluralizefr }} au recrutement
+                    </span>
+                </p>
+            {% endif %}
+        </div>
+        {% if can_update_job_description %}
             <div>
                 <a href="{% url "companies_views:update_job_description" job_description_id=job.pk %}"
                    class="btn btn-lg btn-block btn-primary btn-ico"
@@ -47,17 +47,8 @@
                     <span>Modifier</span>
                 </a>
             </div>
-        </div>
-    {% else %}
-        <h1>{{ job.display_name }}</h1>
-        {% if job.is_active %}
-            <p class="mt-n2">
-                <span class="badge rounded-pill bg-success">
-                    {{ job.open_positions }} poste{{ job.open_positions|pluralizefr }} ouvert{{ job.open_positions|pluralizefr }} au recrutement
-                </span>
-            </p>
         {% endif %}
-    {% endif %}
+    </div>
 
     <div class="c-box c-box--action">
         <h2 class="visually-hidden">Actions rapides</h2>

@hellodeloo hellodeloo force-pushed the deloo/fix-job-description-box-action-cta branch from 23e1d10 to c678b5e Compare November 7, 2024 13:30
@hellodeloo hellodeloo removed the 1-recette-jetable [Payé à l’heure] Crée une recette jetable sur CC label Nov 7, 2024
@hellodeloo hellodeloo force-pushed the deloo/fix-job-description-box-action-cta branch from c678b5e to 1ac9a26 Compare November 7, 2024 14:01
@hellodeloo hellodeloo added this pull request to the merge queue Nov 7, 2024
Merged via the queue into master with commit eb35700 Nov 7, 2024
@hellodeloo hellodeloo deleted the deloo/fix-job-description-box-action-cta branch November 7, 2024 14:20
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