From 490b2392ed025dbb2f1c84cb5de9452d8ddc7e38 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 11 Jul 2023 15:02:50 +0200 Subject: [PATCH 1/2] style(identity): improve edit identity dropdown UI --- app/assets/stylesheets/dossier_views.scss | 6 ++++++ app/views/shared/dossiers/_identite_entreprise.html.haml | 2 +- app/views/users/dossiers/_identity_dropdown.html.haml | 8 +++----- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/dossier_views.scss b/app/assets/stylesheets/dossier_views.scss index ddfc50980..52215ebbe 100644 --- a/app/assets/stylesheets/dossier_views.scss +++ b/app/assets/stylesheets/dossier_views.scss @@ -22,6 +22,12 @@ } } + .edit-identity-content { + .champ-row { + padding: 0; + } + } + .edit-identity-action { .dropdown-content { padding: $default-padding; diff --git a/app/views/shared/dossiers/_identite_entreprise.html.haml b/app/views/shared/dossiers/_identite_entreprise.html.haml index 30824f888..c53cfe9d4 100644 --- a/app/views/shared/dossiers/_identite_entreprise.html.haml +++ b/app/views/shared/dossiers/_identite_entreprise.html.haml @@ -6,7 +6,7 @@ %p Il nʼest pas possible dʼaccepter ou de refuser un dossier sans cette étape. -.fr-background-alt--grey.fr-p-3v +%div{ class: class_names("fr-background-alt--grey fr-p-3v" => !local_assigns[:short_identity]) } - if etablissement.as_degraded_mode? = render Dossiers::RowShowComponent.new(label: "SIRET") do |c| - c.with_value do diff --git a/app/views/users/dossiers/_identity_dropdown.html.haml b/app/views/users/dossiers/_identity_dropdown.html.haml index 88781adfb..070287d2f 100644 --- a/app/views/users/dossiers/_identity_dropdown.html.haml +++ b/app/views/users/dossiers/_identity_dropdown.html.haml @@ -1,4 +1,4 @@ -= render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: {class: ['edit-identity-action']}, menu_options: { class:['edit-identity-content'] }) do |menu| += render Dropdown::MenuComponent.new(wrapper: :div, wrapper_options: { class: ['dossier-show', 'edit-identity-action'] }, menu_options: { class:['edit-identity-content'] }) do |menu| - menu.with_button_inner_html do = t("views.shared.dossiers.demande.my_identity") @@ -6,12 +6,10 @@ - if dossier.procedure.for_individual = render partial: "shared/dossiers/identite_individual", locals: { individual: dossier.individual } - .center - = link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--secondary' + = link_to t('views.shared.dossiers.demande.edit_identity'), identite_dossier_path(dossier), class: 'fr-btn fr-btn--secondary fr-btn--sm fr-my-1w' - elsif dossier.etablissement = render partial: "shared/dossiers/identite_entreprise", locals: { etablissement: dossier.etablissement, short_identity: true, profile: "usager" } - .center - = link_to t('views.shared.dossiers.demande.edit_siret'), siret_dossier_path(dossier), class: 'button' + = link_to t('views.shared.dossiers.demande.edit_siret'), siret_dossier_path(dossier), class: 'fr-btn fr-btn--secondary fr-btn--sm fr-my-1w' From 0a670cb063a6165acc8e2e7f87b9efe6c7bb3625 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 11 Jul 2023 15:18:39 +0200 Subject: [PATCH 2/2] style(new-dossier): buttons as list for better margin & accessibility --- app/views/commencer/show.html.haml | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/app/views/commencer/show.html.haml b/app/views/commencer/show.html.haml index 1cae0d8d3..4f79e78ef 100644 --- a/app/views/commencer/show.html.haml +++ b/app/views/commencer/show.html.haml @@ -5,11 +5,13 @@ = render Dsfr::CalloutComponent.new(title: t("views.commencer.show.start_procedure"), heading_level: 'h2') do |c| - c.body do = render partial: 'shared/france_connect_login', locals: { url: commencer_france_connect_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token) } - = link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn fr-mb-2w fr-mr-2w' do - = t('views.shared.account.create') - %span.optional-on-small-screens.fr-ml-1v - #{APPLICATION_NAME} - = link_to t('views.shared.account.already_user'), commencer_sign_in_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn fr-btn--secondary fr-mb-2w' + %ul.fr-btns-group.fr-btns-group--inline + %li + = link_to commencer_sign_up_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn' do + = t('views.shared.account.create') + %span.optional-on-small-screens.fr-ml-1v + #{APPLICATION_NAME} + %li= link_to t('views.shared.account.already_user'), commencer_sign_in_path(path: @procedure.path, prefill_token: @prefilled_dossier&.prefill_token), class: 'fr-btn fr-btn--secondary' - else - revision = @revision.draft? ? @revision : @procedure.revisions.where.not(id: @procedure.draft_revision_id) @@ -32,8 +34,9 @@ - c.body do %p = t('views.commencer.show.already_draft_detail_html', time_ago: time_ago_in_words(dossier.created_at), procedure: dossier.procedure.libelle) - = link_to t('views.commencer.show.continue_file'), url_for_dossier(dossier), class: 'fr-btn fr-mb-2w' - = link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary fr-mb-2w' + %ul.fr-btns-group.fr-btns-group--inline + %li= link_to t('views.commencer.show.continue_file'), url_for_dossier(dossier), class: 'fr-btn' + %li= link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary' - elsif not_drafts.size == 1 - dossier = not_drafts.first @@ -41,14 +44,16 @@ - c.body do %p = t('views.commencer.show.already_not_draft_detail_html', time_ago: time_ago_in_words(dossier.depose_at), procedure: dossier.procedure.libelle) - = link_to t('views.commencer.show.show_my_submitted_file'), url_for_dossier(dossier), class: 'fr-btn fr-mb-2w' - = link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary fr-mb-2w' + %ul.fr-btns-group.fr-btns-group--inline + %li= link_to t('views.commencer.show.show_my_submitted_file'), url_for_dossier(dossier), class: 'fr-btn' + %li= link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: 'fr-btn fr-btn--secondary' - else = render Dsfr::CalloutComponent.new(title: t("views.commencer.show.existing_dossiers"), heading_level: 'h2') do |c| - c.body do - = link_to t('views.commencer.show.show_dossiers'), dossiers_path, class: "fr-btn fr-mb-2w" - = link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: "fr-btn fr-btn--secondary fr-mb-2w" + %ul.fr-btns-group.fr-btns-group--inline + %li= link_to t('views.commencer.show.show_dossiers'), dossiers_path, class: "fr-btn" + %li= link_to t('views.commencer.show.start_new_file'), url_for_new_dossier(@revision), class: "fr-btn fr-btn--secondary" - if @procedure.feature_enabled?(:dossier_pdf_vide)