diff --git a/CHANGELOG.md b/CHANGELOG.md index cae849931..30c3f98c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to ### Fixed +- 💄(frontend) fix some UI/UX in the left panel #2516 - 🐛(frontend) fix tree dnd firefox #2516 diff --git a/src/backend/impress/configuration/theme/default.json b/src/backend/impress/configuration/theme/default.json index 4c752dd48..d21444014 100644 --- a/src/backend/impress/configuration/theme/default.json +++ b/src/backend/impress/configuration/theme/default.json @@ -4,6 +4,8 @@ "logo": { "src": "/assets/icon-docs.svg", "alt": "Docs Logo", + "width": 54, + "height": 63, "style": { "width": "54px", "height": "auto" }, "withTitle": true }, @@ -130,6 +132,8 @@ "with-proconnect": false, "icon-banner": { "src": "/assets/icon-docs.svg", + "width": 64, + "height": 74, "style": { "width": "64px", "height": "auto" @@ -141,6 +145,8 @@ "logo": {}, "icon": { "src": "/assets/icon-docs.svg", + "width": 36, + "height": 42, "style": { "width": "36px", "height": "auto" diff --git a/src/frontend/apps/impress/public/assets/icon-docs-dsfr-v3.png b/src/frontend/apps/impress/public/assets/icon-docs-dsfr-v3.png new file mode 100644 index 000000000..a11c7a63c Binary files /dev/null and b/src/frontend/apps/impress/public/assets/icon-docs-dsfr-v3.png differ diff --git a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocLeftPanelCollapseButton.tsx b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocLeftPanelCollapseButton.tsx index 79b9aa534..6f8af2285 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-header/components/DocLeftPanelCollapseButton.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-header/components/DocLeftPanelCollapseButton.tsx @@ -50,7 +50,7 @@ export const DocLeftPanelCollapseButton = () => { * visibility to show or hide the collapse button accordingly */ useEffect(() => { - if (!isDocTitleInDom) { + if (!isDocTitleInDom || isPanelOpen) { return; } @@ -77,7 +77,7 @@ export const DocLeftPanelCollapseButton = () => { observer.disconnect(); setIsDocTitleVisible(true); }; - }, [isDocTitleInDom]); + }, [isDocTitleInDom, isPanelOpen]); const { untitledDocument } = useTrans(); diff --git a/src/frontend/apps/impress/src/features/left-panel/assets/left-panel.svg b/src/frontend/apps/impress/src/features/left-panel/assets/left-panel.svg index 45b99f7e5..7d4b6a4a2 100644 --- a/src/frontend/apps/impress/src/features/left-panel/assets/left-panel.svg +++ b/src/frontend/apps/impress/src/features/left-panel/assets/left-panel.svg @@ -1,3 +1,6 @@ - - + + diff --git a/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelCollapseButton.tsx b/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelCollapseButton.tsx index 7ca7dea0f..b55d91877 100644 --- a/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelCollapseButton.tsx +++ b/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelCollapseButton.tsx @@ -3,6 +3,7 @@ import { Button } from '@gouvfr-lasuite/cunningham-react'; import { Text } from '@/components'; import { FadeComponent } from '@/components/Effect'; import { CardFloatingBar } from '@/components/FloatingBar'; +import { useResponsiveStore } from '@/stores'; import LeftPanelIcon from '../assets/left-panel.svg'; import { useLeftPanelStore } from '../stores'; @@ -15,6 +16,7 @@ export const LeftPanelCollapseButton = ({ buttonTitle?: string; }) => { const { isPanelOpen, togglePanel } = useLeftPanelStore(); + const { isSmallMobile } = useResponsiveStore(); return ( @@ -27,17 +29,20 @@ export const LeftPanelCollapseButton = ({ variant="tertiary" icon={} data-testid="floating-bar-toggle-left-panel" - > - - - {buttonTitle} - - + > + {!isSmallMobile && !!buttonTitle && ( + + + {buttonTitle} + + + )} + ); }; diff --git a/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelFooter.tsx b/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelFooter.tsx index c26266183..3cd62b0b6 100644 --- a/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelFooter.tsx +++ b/src/frontend/apps/impress/src/features/left-panel/components/LeftPanelFooter.tsx @@ -8,10 +8,8 @@ import { useAuth } from '@/features/auth/hooks/useAuth'; import { gotoLogout } from '@/features/auth/utils'; import { HelpMenu } from '@/features/help'; import { LanguagePicker } from '@/features/language/components/LanguagePicker'; -import { useResponsiveStore } from '@/stores'; export const LeftPanelFooter = () => { - const { isLargeScreen } = useResponsiveStore(); const { t } = useTranslation(); const { user } = useAuth(); @@ -35,7 +33,7 @@ export const LeftPanelFooter = () => { withMobileView={false} /> - {!isLargeScreen && } +