Skip to content

Commit f147580

Browse files
committed
WIP
1 parent 24b5bb1 commit f147580

File tree

5 files changed

+54
-29
lines changed

5 files changed

+54
-29
lines changed

src/components/SelectInputContainer/index.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,7 @@ function SelectInputContainer<
316316
style={(searchText || !valueDisplay) ? undefined : {
317317
backgroundColor: valueBgColor ?? colorscheme[0][1],
318318
color: valueFgColor ?? colorscheme[0][0],
319+
border: 'var(--width-separator-sm) solid var(--color-foreground)',
319320
}}
320321
id={inputId}
321322
name={name}

src/index.css

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,15 @@
2323

2424
--base-font-size: 1rem;
2525

26-
--font-size-2xs: calc(var(--base-font-size) * 0.625);
27-
--font-size-xs: calc(var(--base-font-size) * 0.75);
28-
--font-size-sm: calc(var(--base-font-size) * 0.875);
29-
--font-size-md: var(--base-font-size);
30-
--font-size-lg: calc(var(--base-font-size) * 1.25);
31-
--font-size-xl: calc(var(--base-font-size) * 1.44);
32-
--font-size-2xl: calc(var(--base-font-size) * 1.8);
33-
--font-size-3xl: calc(var(--base-font-size) * 2.5);
34-
--font-size-4xl: calc(var(--base-font-size) * 3.6);
26+
--font-size-2xs: calc(var(--base-font-size) * 0.625); /* -1 */
27+
--font-size-xs: calc(var(--base-font-size) * 0.75); /* -0.5 */
28+
--font-size-sm: calc(var(--base-font-size) * 0.875); /* -0.25 */
29+
--font-size-md: var(--base-font-size); /* 0 */
30+
--font-size-lg: calc(var(--base-font-size) * 1.25); /* 0.5 */
31+
--font-size-xl: calc(var(--base-font-size) * 1.44); /* 1 */
32+
--font-size-2xl: calc(var(--base-font-size) * 1.8); /* 1.5 */
33+
--font-size-3xl: calc(var(--base-font-size) * 2.5); /* 2 */
34+
--font-size-4xl: calc(var(--base-font-size) * 3.6); /* 2.5 */
3535

3636
@media screen and (max-width: 40rem) {
3737
--base-font-size: 0.875rem;
@@ -165,23 +165,23 @@ h1, h2, h3, h4, h5, h6 {
165165
}
166166

167167
h1 {
168-
font-size: var(--font-size-2xl);
168+
font-size: var(--font-size-3xl);
169169
}
170170

171171
h2 {
172-
font-size: var(--font-size-xl);
172+
font-size: var(--font-size-2xl);
173173
}
174174

175175
h3 {
176-
font-size: var(--font-size-lg);
176+
font-size: var(--font-size-xl);
177177
}
178178

179179
h4 {
180-
font-size: var(--font-size-md);
180+
font-size: var(--font-size-lg);
181181
}
182182

183183
h5 {
184-
font-size: var(--font-size-sm);
184+
font-size: var(--font-size-md);
185185
}
186186

187187
p {

src/views/DailyJournal/AddWorkItemDialog/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ function AddWorkItemDialog(props: Props) {
8888
<Dialog
8989
open={showAddWorkItemDialog}
9090
onClose={handleModalClose}
91-
heading="Add new entry"
91+
heading="Add entry"
9292
contentClassName={styles.modalContent}
9393
className={styles.addWorkItemDialog}
9494
focusElementRef={titleInputRef}

src/views/DailyJournal/DayView/index.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@ function DayView(props: Props) {
221221
groupedItem.attribute,
222222
);
223223

224-
const Heading = `h${bound(groupedItem.level + 2, 2, 4)}` as unknown as ElementType;
224+
const headingLevel = bound(groupedItem.level + 2, 2, 4);
225+
const Heading = `h${headingLevel}` as unknown as ElementType;
225226

226227
return (
227228
<Heading
@@ -301,6 +302,11 @@ function DayView(props: Props) {
301302
return null;
302303
}
303304

305+
const itemErrored = groupedItem.value.status !== 'TODO' && (
306+
isNotDefined(groupedItem.value.type)
307+
|| isNotDefined(groupedItem.value.duration)
308+
);
309+
304310
return (
305311
<div
306312
className={styles.workItemContainer}
@@ -312,7 +318,7 @@ function DayView(props: Props) {
312318
/>
313319
)}
314320
<WorkItemRow
315-
className={styles.workItem}
321+
className={_cs(styles.workItem, itemErrored && styles.errored)}
316322
workItem={groupedItem.value}
317323
onClone={onWorkItemClone}
318324
onChange={onWorkItemChange}

src/views/DailyJournal/DayView/styles.module.css

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.day-view {
22
display: flex;
33
flex-direction: column;
4-
gap: var(--spacing-md);
4+
gap: var(--spacing-lg);
55

66
.header {
77
display: flex;
@@ -40,36 +40,44 @@
4040
}
4141
}
4242

43-
.project-list {
44-
display: flex;
45-
flex-direction: column;
46-
gap: var(--spacing-md);
47-
}
48-
4943
.new-group {
5044
display: flex;
5145
flex-direction: column;
5246
gap: var(--spacing-2xs);
5347

5448
.nested-heading {
5549
display: flex;
56-
align-items: center;
50+
align-items: baseline;
5751
gap: var(--spacing-sm);
5852
color: var(--color-text-light);
5953
font-weight: var(--font-weight-semibold);
6054

6155
&h2 {
56+
margin-top: var(--spacing-lg);
57+
}
58+
&h3 {
6259
margin-top: var(--spacing-md);
60+
}
61+
&h4 {
62+
margin-top: var(--spacing-sm);
63+
}
6364

64-
.icon {
65-
height: 1em;
65+
.icon {
66+
border-radius: 50%;
67+
background-color: var(--color-foreground);
68+
height: 0.8em;
69+
}
70+
71+
&:first-child {
72+
&h2 {
73+
margin-top: 0;
6674
}
6775
}
6876
}
6977

7078
.joined-heading {
7179
display: flex;
72-
align-items: center;
80+
align-items: baseline;
7381
gap: var(--spacing-sm);
7482
color: var(--color-text-light);
7583
font-weight: var(--font-weight-semibold);
@@ -81,8 +89,14 @@
8189
height: 0.5rem;
8290
}
8391

92+
&h4 {
93+
margin-top: var(--spacing-sm);
94+
}
95+
8496
.icon {
85-
height: 1em;
97+
border-radius: 50%;
98+
background-color: var(--color-foreground);
99+
height: 0.8em;
86100
}
87101
}
88102

@@ -93,6 +107,10 @@
93107
.work-item {
94108
flex-grow: 1;
95109
background-color: var(--color-foreground);
110+
111+
&.errored {
112+
background-color: #ffeae1;
113+
}
96114
}
97115
}
98116
}

0 commit comments

Comments
 (0)