Skip to content

Commit 9e152b5

Browse files
committed
fixup! front: redesign top left of the scenario page
1 parent 856658d commit 9e152b5

File tree

2 files changed

+41
-48
lines changed

2 files changed

+41
-48
lines changed

front/src/applications/operationalStudies/views/Scenario.tsx

+17-17
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ const Scenario = () => {
138138
>
139139
<div className="scenario-sidemenu">
140140
{scenario && (
141-
<div className="scenario-top">
141+
<div>
142142
<div className="scenario-details-name">
143143
<span
144144
className="flex-grow-1 scenario-name text-truncate"
@@ -160,23 +160,23 @@ const Scenario = () => {
160160
<ChevronLeft />
161161
</button>
162162
</div>
163+
<button
164+
data-testid="editScenario"
165+
className="scenario-details-modify-button update-scenario"
166+
type="button"
167+
aria-label={t('editScenario')}
168+
onClick={() =>
169+
openModal(
170+
<AddAndEditScenarioModal editionMode scenario={scenario} />,
171+
'xl',
172+
'no-close-modal'
173+
)
174+
}
175+
title={t('editScenario')}
176+
>
177+
<Pencil />
178+
</button>
163179
</div>
164-
<button
165-
data-testid="editScenario"
166-
className="scenario-details-modify-button update-scenario"
167-
type="button"
168-
aria-label={t('editScenario')}
169-
onClick={() =>
170-
openModal(
171-
<AddAndEditScenarioModal editionMode scenario={scenario} />,
172-
'xl',
173-
'no-close-modal'
174-
)
175-
}
176-
title={t('editScenario')}
177-
>
178-
<Pencil />
179-
</button>
180180

181181
<div className="scenario-details-electrical-profile-set">
182182
{scenario.electrical_profile_set_id

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

+24-31
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
--navbar-height: 4.0625rem;
33
--content-height: calc(100vh - var(--navbar-height) - 0.25rem);
44
position: relative;
5-
background-color: #e9e8e1;
5+
background-color: var(--ambientB10);
66
font-family: 'IBM Plex Sans';
77
.scenario-container {
88
margin: 0;
@@ -121,26 +121,6 @@
121121
}
122122
}
123123

124-
.update-scenario {
125-
display: none;
126-
position: absolute;
127-
right: 2.5rem;
128-
top: 5.813rem;
129-
padding: 0.188rem 0.5rem;
130-
transition: 0.2s;
131-
height: 2rem;
132-
width: 2rem;
133-
border-radius: 0.25rem;
134-
box-shadow: 0 0 0 0.094rem rgba(255, 255, 255, 1) inset;
135-
opacity: 1;
136-
background-color: var(--ambientB10);
137-
color: var(--primary60);
138-
&:hover {
139-
background-color: var(--white);
140-
color: var(--primary80);
141-
}
142-
}
143-
144124
.scenario-details-name {
145125
display: flex;
146126
align-items: center;
@@ -160,25 +140,17 @@
160140
padding: 0.25rem 0.5rem;
161141
font-size: 1rem;
162142
border-radius: 4px;
163-
.scenario-details-modify-button-text {
164-
transition: opacity 0.2s;
165-
opacity: 0;
166-
font-size: 0.9rem;
167-
margin-right: 0.5rem;
168-
}
169143
&:hover {
170144
background-color: var(--secondary);
171145
color: var(--white);
172-
.scenario-details-modify-button-text {
173-
opacity: 1;
174-
}
175146
}
176147
}
177148
}
178149
.scenario-description-collapsed {
179150
display: flex;
180151
justify-content: space-between;
181-
button {
152+
position: relative;
153+
.scenario-details-modify-button {
182154
padding-bottom: 0.188rem;
183155
padding-left: 0.125rem;
184156
margin-top: 0.25rem;
@@ -189,6 +161,27 @@
189161
border-radius: 0.313rem 0px 0px 0.313rem;
190162
transform: translateX(1.5rem);
191163
}
164+
165+
.update-scenario {
166+
display: none;
167+
position: absolute;
168+
right: 2.5rem;
169+
bottom: -2rem;
170+
padding: 0.188rem 0.5rem;
171+
transition: 0.2s;
172+
height: 2rem;
173+
width: 2rem;
174+
border-radius: 0.25rem;
175+
box-shadow: 0 0 0 0.094rem rgba(255, 255, 255, 1) inset;
176+
opacity: 1;
177+
background-color: var(--ambientB10);
178+
color: var(--primary60);
179+
&:hover {
180+
background-color: var(--white);
181+
color: var(--primary80);
182+
}
183+
}
184+
192185
}
193186
.scenario-details-electrical-profile-set {
194187
margin-top: 0.375rem;

0 commit comments

Comments
 (0)