Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ and this project adheres to

### Changed

- ♻️(frontend) replace Arial font-family with token font #1411
- ♿(frontend) improve accessibility:
- #1354
- #1349
- ♿ improve accessibility by adding landmark roles to layout #1394
- ♿ add document visible in list and openable via enter key #1365
- ♿ add pdf outline property to enable bookmarks display #1368
Expand All @@ -29,8 +31,6 @@ and this project adheres to
### Added

- ✨(api) add API route to fetch document content #1206
- ♿(frontend) improve accessibility:
- #1349

### Changed

Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions src/frontend/apps/impress/src/components/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export interface TextProps extends BoxProps {
$ellipsis?: boolean;
$weight?: CSSProperties['fontWeight'];
$textAlign?: CSSProperties['textAlign'];
$textTransform?: CSSProperties['textTransform'];
$size?: TextSizes | (string & {});
$theme?:
| 'primary'
Expand Down Expand Up @@ -43,6 +44,8 @@ export type TextType = ComponentPropsWithRef<typeof Text>;

export const TextStyled = styled(Box)<TextProps>`
${({ $textAlign }) => $textAlign && `text-align: ${$textAlign};`}
${({ $textTransform }) =>
$textTransform && `text-transform: ${$textTransform};`}
${({ $weight }) => $weight && `font-weight: ${$weight};`}
${({ $size }) =>
$size &&
Expand Down
7 changes: 7 additions & 0 deletions src/frontend/apps/impress/src/cunningham/cunningham-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
);
}

/**
* Button
*/
.c__button {
contain: content;
}

/**
* Modal
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,7 @@ export const DocRoleDropdown = ({
},
]}
>
<Text
$theme="primary"
$variation="800"
$css={css`
font-family: Arial, Helvetica, sans-serif;
`}
>
<Text $theme="primary" $variation="800">
{transRole(currentRole)}
</Text>
</DropdownMenu>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ export const DocShareModalInviteUserRow = ({
$direction="row"
$align="center"
$css={css`
font-family: Arial, Helvetica, sans-serif;
font-size: var(--c--theme--font--sizes--sm);
color: var(--c--theme--colors--greyscale-400);
contain: content;
`}
$color="var(--c--theme--colors--greyscale-400)"
$cursor="pointer"
>
<Text $theme="primary" $variation="800">
<Text $theme="primary" $variation="800" $size="sm">
{t('Add')}
</Text>
<Icon
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { css } from 'styled-components';

import { Box } from '@/components';
import { Text } from '@/components';
import { tokens } from '@/cunningham';
import { User } from '@/features/auth';

Expand Down Expand Up @@ -37,35 +37,26 @@ export const UserAvatar = ({ user, background }: Props) => {
const splitName = name?.split(' ');

return (
<Box
<Text
className="--docs--user-avatar"
$align="center"
$color="rgba(255, 255, 255, 0.9)"
$justify="center"
$background={background || getColorFromName(name)}
$width="24px"
$height="24px"
$direction="row"
$align="center"
$justify="center"
$radius="50%"
$size="10px"
$textAlign="center"
$textTransform="uppercase"
$weight={600}
$css={css`
color: rgba(255, 255, 255, 0.9);
border: 1px solid rgba(255, 255, 255, 0.5);
contain: content;
`}
className="--docs--user-avatar"
>
<Box
$direction="row"
$css={css`
text-align: center;
font-style: normal;
font-weight: 600;
font-family:
Arial, Helvetica, sans-serif; // Can't use marianne font because it's impossible to center with this font
font-size: 10px;
text-transform: uppercase;
`}
>
{splitName[0]?.charAt(0)}
{splitName?.[1]?.charAt(0)}
</Box>
</Box>
{splitName[0]?.charAt(0)}
{splitName?.[1]?.charAt(0)}
</Text>
);
};
Loading