🩹(frontend) improve minor ux/ui

- Better logo resolution (x4)
- Remove floating bar when printing a doc
- Add loader during doc import
This commit is contained in:
Anthony LC
2026-03-02 11:49:21 +01:00
parent a30384573e
commit c9f42e7924
8 changed files with 18 additions and 6 deletions

View File

@@ -98,7 +98,7 @@ test.describe('Home page', () => {
style: { width: '110px', height: 'auto' }, style: { width: '110px', height: 'auto' },
}, },
icon: { icon: {
src: '/assets/icon-docs-v2.svg', src: '/assets/icon-docs-dsfr-v2.png',
style: { style: {
width: '100px', width: '100px',
height: 'auto', height: 'auto',

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

View File

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -16,6 +16,7 @@ const PRINT_ONLY_CONTENT_CSS = `
/* Hide non-essential elements for printing */ /* Hide non-essential elements for printing */
.--docs--header, .--docs--header,
.--docs--floating-bar,
.--docs--resizable-left-panel, .--docs--resizable-left-panel,
.--docs--doc-editor-header, .--docs--doc-editor-header,
.--docs--doc-header, .--docs--doc-header,

View File

@@ -39,7 +39,12 @@ export const DocsGrid = ({
}: DocsGridProps) => { }: DocsGridProps) => {
const { t } = useTranslation(); const { t } = useTranslation();
const [isDragOver, setIsDragOver] = useState(false); const [isDragOver, setIsDragOver] = useState(false);
const { getRootProps, getInputProps, open } = useImport({ const {
getRootProps,
getInputProps,
open,
isPending: isImportPending,
} = useImport({
onDragOver: (dragOver: boolean) => { onDragOver: (dragOver: boolean) => {
setIsDragOver(dragOver); setIsDragOver(dragOver);
}, },
@@ -94,7 +99,7 @@ export const DocsGrid = ({
$align="center" $align="center"
className="--docs--doc-grid" className="--docs--doc-grid"
> >
<DocsGridLoader isLoading={isRefetching || loading} /> <DocsGridLoader isLoading={isRefetching || loading || isImportPending} />
<Card <Card
data-testid="docs-grid" data-testid="docs-grid"
$height="100%" $height="100%"

View File

@@ -225,7 +225,13 @@ export const DocsGridItemDate = ({
} }
return ( return (
<Text $size="xs" $layer="background" $theme="neutral" $variation="primary"> <Text
$size="xs"
$layer="background"
$theme="neutral"
$variation="primary"
$shrink="0"
>
{dateToDisplay} {dateToDisplay}
</Text> </Text>
); );

View File

@@ -110,7 +110,7 @@ export const useImport = ({ onDragOver }: UseImportProps) => {
}, },
noClick: true, noClick: true,
}); });
const { mutate: importDoc } = useImportDoc(); const { mutate: importDoc, isPending } = useImportDoc();
return { getRootProps, getInputProps, open }; return { getRootProps, getInputProps, open, isPending };
}; };