Skip to content

Commit 4bd57d6

Browse files
committed
wip: properties panel css dim commit+revert when not active
1 parent b674e2d commit 4bd57d6

File tree

2 files changed

+34
-8
lines changed

2 files changed

+34
-8
lines changed

packages/webui/src/client/styles/propertiesPanel.scss

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,16 @@
9090
top: 2px;
9191
}
9292

93+
&:disabled {
94+
cursor: not-allowed;
95+
opacity: 0.3;
96+
97+
&:active {
98+
transform: none;
99+
top: 0;
100+
}
101+
}
102+
93103
> svg {
94104
margin-top: -0.1em;
95105
vertical-align: middle;
@@ -156,19 +166,25 @@
156166
> .propertiespanel-pop-up__action {
157167
margin-top: 15px;
158168
color: #ddd;
159-
padding: 4px;
169+
padding: 4px 4px;
160170
}
161171

162172
> .properties-panel-pop-up__form {
163173
margin-top: 15px;
164174
color: #ddd;
165-
padding: 4px;
175+
padding: 4px 4px;
176+
177+
> .properties-panel-pop-up__form__schema {
178+
border-color: pink;
179+
border-width: 0px;
180+
181+
}
166182
}
167183

168184
> .properties-panel-pop-up__has-been-edited {
169-
background-color: #8a2929c0;
185+
background-color: #ba0b9d24;
170186
border-radius: 8px;
171-
padding: 4px
187+
padding: 4px 4px;
172188
}
173189

174190

packages/webui/src/client/ui/UserEditOperations/PropertiesPanel.tsx

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,11 @@ export function PropertiesPanel(): JSX.Element {
255255
</>
256256
)}
257257
<div className="propertiespanel-pop-up__footer">
258-
<button className="propertiespanel-pop-up__button" onClick={handleRevertChanges}>
258+
<button
259+
className="propertiespanel-pop-up__button"
260+
onClick={handleRevertChanges}
261+
disabled={!hasPendingChanges}
262+
>
259263
<span className="propertiespanel-pop-up__label">REVERT CHANGES</span>
260264
</button>
261265
<button
@@ -501,6 +505,8 @@ function EditingTypeChangeSourceLayerSource(props: {
501505
</button>
502506
)
503507
})}
508+
<br />
509+
<br />
504510
</div>
505511
{selectedGroupSchema && (
506512
<div
@@ -509,9 +515,13 @@ function EditingTypeChangeSourceLayerSource(props: {
509515
hasBeenEdited ? 'properties-panel-pop-up__has-been-edited' : ''
510516
)}
511517
>
512-
<a className="propertiespanel-pop-up__label">{t('Source')}:</a>
513-
<br />
514-
<div onChange={handleSourceChange}>
518+
<div
519+
className={classNames(
520+
'properties-panel-pop-up__form__schema',
521+
hasBeenEdited ? 'properties-panel-pop-up__has-been-edited' : ''
522+
)}
523+
onChange={handleSourceChange}
524+
>
515525
<SchemaFormInPlace
516526
schema={selectedGroupSchema}
517527
object={selectedValues}

0 commit comments

Comments
 (0)