Skip to content

Commit 825ca24

Browse files
committed
💄(frontend) align colors with theme from figma
Some colors were not exactly the same as the ones in figma, this commit aligns them with the theme tokens.
1 parent 0582e68 commit 825ca24

File tree

5 files changed

+61
-17
lines changed

5 files changed

+61
-17
lines changed

src/frontend/apps/impress/src/features/docs/doc-editor/assets/loader.svg

Lines changed: 1 addition & 1 deletion
Loading

src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-blocks/UploadLoaderBlock.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { createReactBlockSpec } from '@blocknote/react';
99
import { t } from 'i18next';
1010
import { useEffect } from 'react';
1111

12-
import { Box, Text } from '@/components';
12+
import { Box, Icon, Text } from '@/components';
1313
import { useMediaUrl } from '@/core';
1414

1515
import { loopCheckDocMediaStatus } from '../../api';
@@ -125,7 +125,11 @@ const UploadLoaderBlockComponent = ({
125125
{block.props.type === 'warning' ? (
126126
<Warning />
127127
) : (
128-
<Loader style={{ animation: 'spin 1.5s linear infinite' }} />
128+
<Icon
129+
$theme="brand"
130+
$layer="border"
131+
icon={<Loader style={{ animation: 'spin 1.5s linear infinite' }} />}
132+
/>
129133
)}
130134
<Text>{block.props.information}</Text>
131135
</Box>

src/frontend/apps/impress/src/features/docs/doc-editor/styles.tsx

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,16 @@ export const cssEditor = css`
77
height: 100%;
88
}
99
10-
& .bn-editor {
11-
color: var(--c--globals--colors--gray-700);
12-
}
13-
1410
/**
15-
* WCAG Accessibility contrast fixes for BlockNote editor
11+
* Token Mantime
1612
*/
17-
.bn-block-content[data-is-empty-and-focused][data-content-type='paragraph']
18-
.bn-inline-content:has(> .ProseMirror-trailingBreak:only-child)::before {
19-
color: #767676 !important;
20-
font-weight: 400;
13+
& > .bn-container {
14+
--bn-colors-editor-text: var(
15+
--c--contextuals--content--semantic--neutral--primary
16+
);
17+
--bn-colors-side-menu: var(
18+
--c--contextuals--content--semantic--neutral--tertiary
19+
);
2120
}
2221
2322
/**
@@ -97,7 +96,9 @@ export const cssEditor = css`
9796
height: 38px;
9897
}
9998
.bn-side-menu .mantine-UnstyledButton-root svg {
100-
color: #767676 !important;
99+
color: var(
100+
--c--contextuals--content--semantic--neutral--tertiary
101+
) !important;
101102
}
102103
103104
/**
@@ -158,6 +159,41 @@ export const cssEditor = css`
158159
border: 1px solid #d3d2cf;
159160
}
160161
162+
/**
163+
* Checklist items
164+
*/
165+
.bn-block-content[data-content-type='checkListItem'] > div > input {
166+
appearance: none;
167+
width: 20px;
168+
height: 20px;
169+
border: 2px solid
170+
var(--c--contextuals--content--semantic--neutral--tertiary);
171+
border-radius: 4px;
172+
cursor: pointer;
173+
position: relative;
174+
align-self: center;
175+
margin-top: 2px;
176+
}
177+
.bn-block-content[data-content-type='checkListItem'] > div > input:checked {
178+
background-color: var(--c--contextuals--content--semantic--brand--tertiary);
179+
border-color: var(--c--contextuals--content--semantic--brand--tertiary);
180+
}
181+
.bn-block-content[data-content-type='checkListItem']
182+
> div
183+
> input:checked::after {
184+
content: 'check';
185+
font-family: 'Material Symbols Outlined Variable', sans-serif;
186+
position: absolute;
187+
top: 50%;
188+
left: 50%;
189+
transform: translate(-50%, -50%);
190+
color: var(--c--contextuals--content--semantic--overlay--primary);
191+
font-size: 18px;
192+
}
193+
194+
/**
195+
* Ensure consistent spacing between headings and paragraphs
196+
*/
161197
& .bn-block-outer:not(:first-child) {
162198
&:has(h1) {
163199
margin-top: 32px;

src/frontend/apps/impress/src/features/docs/doc-header/components/DocHeaderInfo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const DocHeaderInfo = ({ doc }: DocHeaderInfoProps) => {
4949
$variation="tertiary"
5050
$size="s"
5151
$weight="bold"
52-
$theme={isEditable ? 'gray' : 'warning'}
52+
$theme={isEditable ? 'neutral' : 'warning'}
5353
>
5454
{transRole(isEditable ? doc.user_role || doc.link_role : Role.READER)}
5555
&nbsp;·&nbsp;

src/frontend/apps/impress/src/features/docs/doc-share/components/DocVisibility.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ export const DocVisibility = ({ doc }: DocVisibilityProps) => {
180180
options={linkReachOptions}
181181
>
182182
<Box
183-
$theme={canManage ? 'brand' : 'gray'}
184-
$variation={canManage ? 'tertiary' : 'primary'}
183+
$theme={canManage ? 'brand' : 'neutral'}
184+
$variation="tertiary"
185185
$direction="row"
186186
$align="center"
187187
$gap={spacingsTokens['3xs']}
@@ -229,7 +229,11 @@ export const DocVisibility = ({ doc }: DocVisibilityProps) => {
229229
}
230230
label={t('Document access mode')}
231231
>
232-
<Text $weight="initial" $theme="brand" $variation="tertiary">
232+
<Text
233+
$weight="initial"
234+
$theme={!canManage ? 'neutral' : 'brand'}
235+
$variation={!canManage ? 'secondary' : 'tertiary'}
236+
>
233237
{linkModeTranslations[docLinkRole]}
234238
</Text>
235239
</DropdownMenu>

0 commit comments

Comments
 (0)