Skip to content

Commit a362aa6

Browse files
Caracol3nicolaswurtz
authored andcommitted
front: operationalstudies: support returns to line in prodject-study-scenario description
- remove remark-breaks plugin for react-markdown - add CSS rule (white-space: break-spaces) - add placeholder in project, study and scenario modal for the description
1 parent f5b6aec commit a362aa6

File tree

15 files changed

+15
-0
lines changed

15 files changed

+15
-0
lines changed

front/public/locales/en/operationalStudies/project.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"scenariosCount_one": "1 scenario",
4747
"scenariosCount_other": "{{count}} scenarios",
4848
"scenariosCount_zero": "No scenario",
49+
"projectDescriptionPlaceholder": "Short description of the project",
4950
"sortOptions": {
5051
"byName": "Sort by name",
5152
"byRecentDate": "Latest"

front/public/locales/en/operationalStudies/scenario.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"scenarioDeleted": "Successful deletion!",
2424
"scenarioDeletedDetails": "Scenario {{ name }} has been deleted.",
2525
"scenarioDescription": "Description",
26+
"scenarioDescriptionPlaceholder": "Short description of the scenario",
2627
"scenarioModificationTitle": "Modify scenario",
2728
"scenarioModifyButton": "Save",
2829
"scenarioName": "Scenario's name",

front/public/locales/en/operationalStudies/study.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"studyDeleted": "Successful deletion!",
3838
"studyDeletedDetails": "The {{ name }} study has been deleted.",
3939
"studyDescription": "Description",
40+
"studyDescriptionPlaceholder": "Short description of the study",
4041
"studyEstimatedEndingDate": "Expected ending",
4142
"studyModificationTitle": "Edit a study",
4243
"studyModifyButton": "Save",

front/public/locales/fr/operationalStudies/project.json

+1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"scenariosCount_one": "1 scénario",
4747
"scenariosCount_other": "{{count}} scénarios",
4848
"scenariosCount_zero": "Aucun scénario",
49+
"projectDescriptionPlaceholder": "Courte description du projet",
4950
"sortOptions": {
5051
"byName": "Tri par nom",
5152
"byRecentDate": "Plus récents"

front/public/locales/fr/operationalStudies/scenario.json

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"scenarioDeleted": "Suppression réussie !",
2424
"scenarioDeletedDetails": "Le scénario {{ name }} a bien été supprimé.",
2525
"scenarioDescription": "Description",
26+
"scenarioDescriptionPlaceholder": "Courte description du scénario",
2627
"scenarioModificationTitle": "Modifier le scénario",
2728
"scenarioModifyButton": "Enregistrer",
2829
"scenarioName": "Nom du scénario",

front/public/locales/fr/operationalStudies/study.json

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"studyDeleted": "Suppression réussie !",
3838
"studyDeletedDetails": "L'étude {{ name }} a bien été supprimée.",
3939
"studyDescription": "Description",
40+
"studyDescriptionPlaceholder": "Courte description de l'étude",
4041
"studyEstimatedEndingDate": "Fin estimée",
4142
"studyModificationTitle": "Modifier une étude",
4243
"studyModifyButton": "Enregistrer",

front/src/modules/project/components/AddOrEditProjectModal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ export default function AddOrEditProjectModal({
273273
onChange={(e) =>
274274
setCurrentProject({ ...currentProject, description: e.target.value })
275275
}
276+
placeholder={t('projectDescriptionPlaceholder')}
276277
rows={3}
277278
/>
278279
</div>

front/src/modules/project/styles/_projectCard.scss

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
height: 3.9rem;
124124
overflow: auto;
125125
font-size: 0.8rem;
126+
white-space: break-spaces;
126127
&::first-letter {
127128
text-transform: capitalize;
128129
}

front/src/modules/scenario/components/AddOrEditScenarioModal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,7 @@ export default function AddOrEditScenarioModal({
252252
onChange={(e) =>
253253
setCurrentScenario({ ...currentScenario, description: e.target.value })
254254
}
255+
placeholder={t('scenarioDescriptionPlaceholder')}
255256
/>
256257
</div>
257258
{!editionMode && electricalProfilOptions.length > 1 && (

front/src/modules/scenario/styles/_scenarioCard.scss

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@
7676
font-size: 0.9rem;
7777
height: 100%;
7878
overflow: auto;
79+
white-space: break-spaces;
7980
}
8081
.scenario-card-tags {
8182
display: flex;

front/src/modules/study/components/AddOrEditStudyModal.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ export default function AddOrEditStudyModal({ editionMode, study }: Props) {
256256
}
257257
value={currentStudy?.description}
258258
onChange={(e) => setCurrentStudy({ ...currentStudy, description: e.target.value })}
259+
placeholder={t('studyDescriptionPlaceholder')}
259260
/>
260261
</div>
261262
</div>

front/src/modules/study/styles/_studyCard.scss

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
padding: 0 0.5rem;
8484
overflow: auto;
8585
height: 5rem;
86+
white-space: break-spaces;
8687
}
8788
.study-card-financials {
8889
display: flex;

front/src/styles/scss/applications/operationalStudies/_project.scss

+1
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
max-height: 20vh;
7171
margin-bottom: 1rem;
7272
font-size: 1.25rem;
73+
white-space: break-spaces;
7374
}
7475
.project-details-title-objectives {
7576
overflow: auto;

front/src/styles/scss/applications/operationalStudies/_scenario.scss

+1
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@
112112
overflow: auto;
113113
height: 4rem;
114114
font-size: 0.9rem;
115+
white-space: break-spaces;
115116
}
116117
}
117118
.scenario-timetable {

front/src/styles/scss/applications/operationalStudies/_study.scss

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@
8282
}
8383
.study-details-description {
8484
margin-bottom: 0.5rem;
85+
white-space: break-spaces;
8586
}
8687
.study-details-state {
8788
padding: 5rem 0 1rem;

0 commit comments

Comments
 (0)