amelioration(design): ETQ usager la cohabitation du design d'un form mi-DSFR, mi-DS n'est pas trop moche

amelioration(design): ETQ usager la cohabitation du design d'un form mi-DSFR, mi-DS n'est pas trop moche
This commit is contained in:
Martin 2023-06-26 11:47:20 +02:00 committed by mfo
parent c86c1efcb7
commit 9a0ee850a8
3 changed files with 7 additions and 9 deletions

View file

@ -213,7 +213,7 @@
.fr-label {
// la description d'un champ peut contenir du markup (markdown->html),
// on herite donc la fontsize/mrgin/padding du fr-hint-text
.fr-hint-text > *{
.fr-hint-text > * {
font-size: inherit;
margin: inherit;
padding: inherit;
@ -223,7 +223,6 @@
input[type=password],
select {
display: block;
margin-bottom: $default-fields-spacer;
margin-bottom: 0;
&.small-margin {

View file

@ -103,7 +103,6 @@ module Dsfr
def hint?
I18n.exists?("activerecord.attributes.#{object.class.name.underscore}.hints.#{@attribute}")
end
end
end
end

View file

@ -419,7 +419,7 @@ describe 'The user' do
let(:procedure) do
create(:procedure, :published, :for_individual,
types_de_champ_public: [
{ type: :integer_number, libelle: 'age', stable_id: age_stable_id },
{ type: :integer_number, libelle: 'age du candidat', stable_id: age_stable_id },
{ type: :yes_no, libelle: 'permis de conduire', stable_id: permis_stable_id, condition: permis_condition },
{ type: :header_section, libelle: 'info voiture', condition: permis_condition },
{ type: :integer_number, libelle: 'tonnage', stable_id: tonnage_stable_id, condition: tonnage_condition },
@ -432,12 +432,12 @@ describe 'The user' do
fill_individual
expect(page).to have_css('label', text: 'age', visible: true)
expect(page).to have_css('label', text: 'age du candidat', visible: true)
expect(page).to have_no_css('label', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('legend h2', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age (facultatif)', with: '18')
fill_in('age du candidat (facultatif)', with: '18')
expect(page).to have_css('label', text: 'permis de conduire', visible: true)
expect(page).to have_css('legend h2', text: 'info voiture', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true)
@ -453,7 +453,7 @@ describe 'The user' do
fill_in('tonnage (facultatif)', with: 'a')
expect(page).to have_no_css('label', text: 'parking', visible: true)
fill_in('age (facultatif)', with: '2')
fill_in('age du candidat (facultatif)', with: '2')
expect(page).to have_no_css('label', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true)
@ -461,11 +461,11 @@ describe 'The user' do
click_on 'Accéder à votre dossier'
click_on 'Modifier mon dossier'
expect(page).to have_css('label', text: 'age', visible: true)
expect(page).to have_css('label', text: 'age du candidat', visible: true)
expect(page).to have_no_css('label', text: 'permis de conduire', visible: true)
expect(page).to have_no_css('label', text: 'tonnage', visible: true)
fill_in('age (facultatif)', with: '18')
fill_in('age du candidat (facultatif)', with: '18')
wait_for_autosave(false)
# the champ keeps their previous value so they are all displayed