Skip to content

Commit 7f5fa09

Browse files
committed
feat: Properties panel is edited pencil styling
1 parent 958d8e3 commit 7f5fa09

File tree

2 files changed

+23
-19
lines changed

2 files changed

+23
-19
lines changed

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

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,14 +188,24 @@
188188
margin-top: 15px;
189189
color: #ddd;
190190
padding: 4px 4px;
191-
191+
position: relative;
192+
display: flex;
193+
align-items: flex-start;
194+
gap: 8px;
195+
196+
// Add positioning for the pencil icon
197+
> svg {
198+
margin-top: 4px;
199+
flex-shrink: 0;
200+
}
201+
192202
> .properties-panel-pop-up__form__schema {
193-
border-color: pink;
194-
border-width: 0px;
195-
203+
border-color: pink;
204+
border-width: 0px;
205+
flex-grow: 1;
196206
}
197207
}
198-
208+
199209
> .properties-panel-pop-up__has-been-edited {
200210
background-color: #ffffff16;
201211
border-radius: 8px;

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

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,12 @@ function EditingTypeAction(props: {
360360
hasBeenEdited ? 'properties-panel-pop-up__has-been-edited' : ''
361361
)}
362362
>
363+
{hasBeenEdited && (
364+
<>
365+
{' '}
366+
<FontAwesomeIcon icon="pencil-alt" />
367+
</>
368+
)}{' '}
363369
<a
364370
className={classNames('propertiespanel-pop-up__switchbutton', 'switch-button', {
365371
'sb-on': getPendingState() ?? (props.userEditOperation.isActive || false),
@@ -377,12 +383,6 @@ function EditingTypeAction(props: {
377383
</div>
378384
</a>
379385
<span className="propertiespanel-pop-up__label">
380-
{hasBeenEdited && (
381-
<>
382-
{' '}
383-
<FontAwesomeIcon icon="pencil-alt" />
384-
</>
385-
)}{' '}
386386
{translateMessage(props.userEditOperation.label, i18nTranslator)}
387387
</span>
388388
</div>
@@ -532,14 +532,8 @@ function EditingTypeChangeSourceLayerSource(props: {
532532
hasBeenEdited ? 'properties-panel-pop-up__has-been-edited' : ''
533533
)}
534534
>
535-
<div
536-
className={classNames(
537-
'properties-panel-pop-up__form__schema',
538-
hasBeenEdited ? 'properties-panel-pop-up__has-been-edited' : ''
539-
)}
540-
onChange={handleSourceChange}
541-
>
542-
{hasBeenEdited && <FontAwesomeIcon icon="pencil-alt" />}
535+
{hasBeenEdited && <FontAwesomeIcon icon="pencil-alt" />}
536+
<div className="properties-panel-pop-up__form__schema" onChange={handleSourceChange}>
543537
<StyledSchemaFormInPlace
544538
schema={selectedGroupSchema}
545539
object={selectedValues}

0 commit comments

Comments
 (0)