🩹(frontend) fine tuning v2.2.0
Fix minor issues: - Add some height to the carret in the editor - Improve css in mail templates - Improve images resolution on homepage
@@ -10,7 +10,7 @@ test.describe('Header', () => {
|
|||||||
test('checks all the elements are visible', async ({ page }) => {
|
test('checks all the elements are visible', async ({ page }) => {
|
||||||
const header = page.locator('header').first();
|
const header = page.locator('header').first();
|
||||||
|
|
||||||
await expect(header.getByAltText('Docs Logo')).toBeVisible();
|
await expect(header.getByLabel('Docs Logo')).toBeVisible();
|
||||||
await expect(header.locator('h2').getByText('Docs')).toHaveCSS(
|
await expect(header.locator('h2').getByText('Docs')).toHaveCSS(
|
||||||
'color',
|
'color',
|
||||||
'rgb(0, 0, 145)',
|
'rgb(0, 0, 145)',
|
||||||
|
|||||||
@@ -1,11 +1,10 @@
|
|||||||
import { Button } from '@openfun/cunningham-react';
|
import { Button } from '@openfun/cunningham-react';
|
||||||
import Image from 'next/image';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
import { BoxButton } from '@/components';
|
import { BoxButton } from '@/components';
|
||||||
|
|
||||||
import ProConnectImg from '../assets/button-proconnect.svg?url';
|
import ProConnectImg from '../assets/button-proconnect.svg';
|
||||||
import { useAuth } from '../hooks';
|
import { useAuth } from '../hooks';
|
||||||
import { gotoLogin, gotoLogout } from '../utils';
|
import { gotoLogin, gotoLogout } from '../utils';
|
||||||
|
|
||||||
@@ -41,8 +40,9 @@ export const ProConnectButton = () => {
|
|||||||
background-color: var(--c--theme--colors--primary-action);
|
background-color: var(--c--theme--colors--primary-action);
|
||||||
}
|
}
|
||||||
`}
|
`}
|
||||||
|
$radius="4px"
|
||||||
>
|
>
|
||||||
<Image src={ProConnectImg} alt={t('ProConnect Image')} />
|
<ProConnectImg />
|
||||||
</BoxButton>
|
</BoxButton>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export const DocEditor = ({ doc, versionId }: DocEditorProps) => {
|
|||||||
$css="overflow-x: clip; flex: 1;"
|
$css="overflow-x: clip; flex: 1;"
|
||||||
$position="relative"
|
$position="relative"
|
||||||
>
|
>
|
||||||
<Box $css="flex:1;" $position="relative">
|
<Box $css="flex:1;" $position="relative" $width="100%">
|
||||||
{isVersion ? (
|
{isVersion ? (
|
||||||
<DocVersionEditor docId={doc.id} versionId={versionId} />
|
<DocVersionEditor docId={doc.id} versionId={versionId} />
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ export const cssEditor = (readonly: boolean) => css`
|
|||||||
}
|
}
|
||||||
.collaboration-cursor-custom__caret {
|
.collaboration-cursor-custom__caret {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 85%;
|
height: 100%;
|
||||||
width: 2px;
|
width: 2px;
|
||||||
bottom: 4%;
|
bottom: 4%;
|
||||||
left: -1px;
|
left: -1px;
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
import Image from 'next/image';
|
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
import { css } from 'styled-components';
|
import { css } from 'styled-components';
|
||||||
|
|
||||||
import { default as IconDocs } from '@/assets/icons/icon-docs.svg?url';
|
import IconDocs from '@/assets/icons/icon-docs.svg';
|
||||||
import { Box, StyledLink } from '@/components/';
|
import { Box, StyledLink } from '@/components/';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { ButtonLogin } from '@/features/auth';
|
import { ButtonLogin } from '@/features/auth';
|
||||||
@@ -51,7 +50,7 @@ export const Header = () => {
|
|||||||
$height="fit-content"
|
$height="fit-content"
|
||||||
$margin={{ top: 'auto' }}
|
$margin={{ top: 'auto' }}
|
||||||
>
|
>
|
||||||
<Image priority src={IconDocs} alt={t('Docs Logo')} width={25} />
|
<IconDocs aria-label={t('Docs Logo')} width={25} />
|
||||||
<Title />
|
<Title />
|
||||||
</Box>
|
</Box>
|
||||||
</StyledLink>
|
</StyledLink>
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 342 KiB After Width: | Height: | Size: 401 KiB |
|
Before Width: | Height: | Size: 336 KiB After Width: | Height: | Size: 410 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 61 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 95 KiB |
|
Before Width: | Height: | Size: 112 KiB After Width: | Height: | Size: 119 KiB |
|
Before Width: | Height: | Size: 114 KiB After Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 56 KiB |
|
Before Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 407 KiB |
@@ -1,7 +1,7 @@
|
|||||||
import Image from 'next/image';
|
import Image from 'next/image';
|
||||||
import { useTranslation } from 'react-i18next';
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { default as IconDocs } from '@/assets/icons/icon-docs.svg?url';
|
import IconDocs from '@/assets/icons/icon-docs.svg';
|
||||||
import { Box } from '@/components';
|
import { Box } from '@/components';
|
||||||
import { useCunninghamTheme } from '@/cunningham';
|
import { useCunninghamTheme } from '@/cunningham';
|
||||||
import { ButtonTogglePanel, Title } from '@/features/header/';
|
import { ButtonTogglePanel, Title } from '@/features/header/';
|
||||||
@@ -61,7 +61,7 @@ export const HomeHeader = () => {
|
|||||||
$position="relative"
|
$position="relative"
|
||||||
$height="fit-content"
|
$height="fit-content"
|
||||||
>
|
>
|
||||||
<Image priority src={IconDocs} alt={t('Docs Logo')} width={32} />
|
<IconDocs aria-label={t('Docs Logo')} width={32} />
|
||||||
<Title />
|
<Title />
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ export const HomeSection = ({
|
|||||||
height: 'fit-content',
|
height: 'fit-content',
|
||||||
margin: 'auto',
|
margin: 'auto',
|
||||||
overflow: 'auto',
|
overflow: 'auto',
|
||||||
flexBasis: direction === 'column' ? '100%' : '50%',
|
flexBasis: direction === 'column' ? 'fit-content' : '50%',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<mj-include path="./partial/header.mjml" />
|
<mj-include path="./partial/header.mjml" />
|
||||||
|
|
||||||
<mj-body mj-class="bg--blue-100">
|
<mj-body mj-class="bg--blue-100">
|
||||||
<mj-wrapper css-class="wrapper" padding="0 25px 0px 25px">
|
<mj-wrapper css-class="wrapper" padding="5px 25px 0px 25px">
|
||||||
<mj-section css-class="wrapper-logo">
|
<mj-section css-class="wrapper-logo">
|
||||||
<mj-column>
|
<mj-column>
|
||||||
<mj-image
|
<mj-image
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
/>
|
/>
|
||||||
</mj-column>
|
</mj-column>
|
||||||
</mj-section>
|
</mj-section>
|
||||||
<mj-section mj-class="bg--white-100" padding="30px 20px 60px 20px">
|
<mj-section mj-class="bg--white-100" padding="0px 20px 60px 20px">
|
||||||
<mj-column>
|
<mj-column>
|
||||||
<mj-text align="center">
|
<mj-text align="center">
|
||||||
<h1>{{title|capfirst}}</h1>
|
<h1>{{title|capfirst}}</h1>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
<mj-all
|
<mj-all
|
||||||
font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif"
|
font-family="Roboto, -apple-system, BlinkMacSystemFont, 'Segoe UI', Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif"
|
||||||
font-size="16px"
|
font-size="16px"
|
||||||
line-height="1.3em"
|
line-height="normal"
|
||||||
color="#3A3A3A"
|
color="#3A3A3A"
|
||||||
/>
|
/>
|
||||||
</mj-attributes>
|
</mj-attributes>
|
||||||
|
|||||||