Skip to content

Commit b1fe149

Browse files
committed
Refine panel padding, margins, and task indentation for improved UI consistency
- distances on 'add new' and on indent guides are incorrect in modern ui - 'add' rows render incorrectly (indent guides are misaligned)
1 parent 4a37050 commit b1fe149

10 files changed

Lines changed: 40 additions & 15 deletions

File tree

‎apps/editor/src/views/panel/frontend/Home/Home.module.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
justify-content: space-between;
55
gap: 4px;
66
width: 100%;
7-
padding: 4px 14px;
7+
padding: 4px 12px;
88

99
:global([data-modern-ui='true']) & {
1010
padding: 4px 10px;
@@ -69,7 +69,7 @@
6969
border-radius: 10px;
7070
border: 1px solid var(--cwc-border-color);
7171
overflow: hidden;
72-
margin: 0 14px;
72+
margin: 0 12px;
7373
z-index: 1;
7474

7575
:global([data-modern-ui='true']) & {

‎apps/editor/src/views/panel/frontend/Main/MainView/MainView.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
display: flex;
2020
flex-direction: column;
2121
gap: 6px;
22-
margin: 0 14px;
22+
margin: 0 12px;
2323

2424
:global([data-modern-ui='true']) & {
2525
margin: 0 10px;

‎apps/editor/src/views/panel/frontend/Main/MainView/components/Header/Header.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
display: flex;
33
justify-content: space-between;
44
align-items: center;
5-
padding: 4px 14px;
5+
padding: 4px 12px;
66
gap: 14px;
77

88
:global([data-modern-ui='true']) & {

‎packages/ui/src/components/editor/panel/Configurations/Configurations.module.scss‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
:global([data-modern-ui='true']) & {
2020
margin: 0 4px;
21+
padding: 0 6px;
2122
border-radius: var(--border-radius-small);
2223
}
2324

@@ -114,10 +115,10 @@
114115

115116
.footer {
116117
display: flex;
117-
padding: 8px 14px 10px 14px;
118+
padding: 10px 12px;
118119

119120
:global([data-modern-ui='true']) & {
120-
padding: 8px 10px 10px 10px;
121+
padding: 9px 10px;
121122
}
122123

123124
> button {

‎packages/ui/src/components/editor/panel/ListHeader/ListHeader.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
:global([data-modern-ui='true']) & {
1010
height: 28px;
11-
padding: 0 8px;
11+
padding: 0 8px 0 6px;
1212
margin: 0 4px;
1313
border-radius: var(--border-radius-small);
1414
}

‎packages/ui/src/components/editor/panel/Page/Page.module.scss‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
}
2525

2626
.footer {
27-
padding: 12px;
27+
padding: 10px 12px;
2828
border-top: 1px solid var(--cwc-border-color-dimmed);
29+
30+
:global([data-modern-ui='true']) & {
31+
padding: 10px 12px 5px 12px;
32+
}
2933
}

‎packages/ui/src/components/editor/panel/Tabs/Tabs.module.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.tabs {
22
height: 25px;
3-
padding: 0 14px 0 16px;
3+
padding: 0 12px 0 14px;
44
margin-bottom: 8px;
55
display: flex;
66
justify-content: space-between;

‎packages/ui/src/components/editor/panel/Tasks/Tasks.module.scss‎

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
display: flex;
33
flex-direction: column;
44
width: 100%;
5+
--task-item-padding-left: 10px;
6+
7+
:global([data-modern-ui='true']) & {
8+
--task-item-padding-left: 6px;
9+
}
510
}
611

712
.tasks {
@@ -11,16 +16,14 @@
1116

1217
.item {
1318
display: flex;
14-
padding: 1px 10px 6px 10px;
19+
padding: 1px 12px 6px 10px;
1520
gap: 4px;
1621
position: relative;
17-
--task-item-padding-left: 10px;
1822

1923
:global([data-modern-ui='true']) & {
2024
padding: 1px 6px 6px 6px;
2125
margin: 0 4px;
2226
border-radius: var(--border-radius-small);
23-
--task-item-padding-left: 6px;
2427
}
2528

2629
&:hover {
@@ -169,6 +172,11 @@
169172
position: relative;
170173
display: flex;
171174

175+
:global([data-modern-ui='true']) & {
176+
margin: 0 4px;
177+
border-radius: var(--border-radius-small);
178+
}
179+
172180
&:hover {
173181
background-color: var(--vscode-list-hoverBackground);
174182
}

‎packages/ui/src/components/editor/panel/Tasks/Tasks.tsx‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,11 @@ export const Tasks: React.FC<Props> = (props) => {
127127
<div
128128
key={i}
129129
className={styles['indent-guide']}
130-
style={{ left: `${19 + i * 20}px` }}
130+
style={{
131+
left: `calc(var(--task-item-padding-left, 10px) + 9px + ${
132+
i * 20
133+
}px)`
134+
}}
131135
/>
132136
))}
133137
<div className={styles.item__left}>

‎packages/ui/src/components/editor/panel/Tasks/components/TaskGroup.tsx‎

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,20 @@ export const TaskGroup: React.FC<TaskGroupProps> = (props) => {
8484
<div
8585
key={i}
8686
className={styles['indent-guide']}
87-
style={{ left: `${19 + i * 20}px` }}
87+
style={{
88+
left: `calc(var(--task-item-padding-left, 10px) + 9px + ${
89+
i * 20
90+
}px)`
91+
}}
8892
/>
8993
))}
9094
<button
9195
className={cn(styles['add-button'], styles['add-button--add'])}
92-
style={{ marginLeft: `${13 + depth * 20}px` }}
96+
style={{
97+
marginLeft: `calc(var(--task-item-padding-left, 10px) + 3px + ${
98+
depth * 20
99+
}px)`
100+
}}
93101
title="Add task"
94102
/>
95103
</div>

0 commit comments

Comments
 (0)