diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/_index.scss b/src/frontend/src/features/layouts/components/mailbox-panel/_index.scss index b440f1c8..64e29154 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/_index.scss +++ b/src/frontend/src/features/layouts/components/mailbox-panel/_index.scss @@ -3,23 +3,25 @@ flex-direction: column; height: 100%; max-height: 100%; - overflow: auto; font-size: var(--c--globals--font--sizes--sm); position: relative; } .mailbox-panel__header { - position: sticky; - top: 0; - z-index: 10; flex-shrink: 0; background: var(--c--contextuals--background--surface--secondary); + z-index: 10; +} + +.mailbox-panel__body { + flex: 1; + min-height: 0; } .mailbox-panel__mailbox-title { margin: 0; flex-shrink: 0; - padding-block: var(--c--globals--spacings--sm); + padding-bottom: var(--c--globals--spacings--xs); & > .c__dropdown-menu-trigger { justify-content: flex-start; @@ -51,13 +53,3 @@ } } } - -.mailbox-panel .mailbox-list { - flex-shrink: 0; - margin-bottom: var(--c--globals--spacings--sm); -} - -.mailbox-panel .mailbox-labels { - border-top: 1px solid var(--c--contextuals--border--surface--primary); - flex: 1; -} diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/_index.scss b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/_index.scss index 4c3eabf5..f90e140b 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/_index.scss +++ b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-actions/_index.scss @@ -1,8 +1,3 @@ -@keyframes mailbox-panel-actions__spin { - from { transform: rotate(0deg); } - to { transform: rotate(360deg); } -} - .mailbox-panel-actions { display: flex; justify-content: space-between; @@ -15,8 +10,16 @@ align-items: center; justify-content: center; + @keyframes refreshIconSpin { + 0% { transform: rotate(0deg); filter: blur(0px); } + 33% { filter: blur(1px); } + 50% { filter: blur(2px); } + 66% { filter: blur(1px); } + 100% { transform: rotate(360deg); filter: blur(0px); } + } + &--spinning { - animation: mailbox-panel-actions__spin 700ms ease-in-out infinite; + animation: refreshIconSpin 700ms var(--c--globals--transitions--ease-in-out) infinite; } } diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-labels/_index.scss b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-labels/_index.scss index 0a4837d8..0034a1f6 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-labels/_index.scss +++ b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-labels/_index.scss @@ -3,7 +3,6 @@ flex-direction: column; height: 100%; overflow-y: auto; - min-height: 200px; } .mailbox-labels__drag-over-indicator { diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-list/_index.scss b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-list/_index.scss index dedf56f5..83daaf1a 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-list/_index.scss +++ b/src/frontend/src/features/layouts/components/mailbox-panel/components/mailbox-list/_index.scss @@ -3,7 +3,8 @@ flex-direction: column; margin-inline: var(--c--globals--spacings--sm); gap: var(--c--globals--spacings--4xs); - flex-shrink: 0; + height: 100%; + overflow-y: auto; } // Wraps a folder link together with its disclosure chevron button. The diff --git a/src/frontend/src/features/layouts/components/mailbox-panel/index.tsx b/src/frontend/src/features/layouts/components/mailbox-panel/index.tsx index 994bf160..0c86f245 100644 --- a/src/frontend/src/features/layouts/components/mailbox-panel/index.tsx +++ b/src/frontend/src/features/layouts/components/mailbox-panel/index.tsx @@ -8,6 +8,7 @@ import { useSearchParams } from "next/navigation"; import { useLayoutContext } from "@/features/layouts/components/layout-context"; import { MailboxLabels } from "./components/mailbox-labels"; import { useState } from "react"; +import { Group, Panel, Separator, useDefaultLayout } from "react-resizable-panels"; export const MailboxPanel = () => { const router = useRouter(); @@ -15,6 +16,10 @@ export const MailboxPanel = () => { const { selectedMailbox, mailboxes, queryStates } = useMailboxContext(); const { closeLeftPanel } = useLayoutContext(); const [isOpen, setIsOpen] = useState(false); + const { defaultLayout, onLayoutChange } = useDefaultLayout({ + groupId: "mailbox-panel-sections", + storage: typeof window !== "undefined" ? localStorage : undefined, + }); const getMailboxOptions = () => { if (!mailboxes) return []; @@ -64,11 +69,20 @@ export const MailboxPanel = () => { {!selectedMailbox || queryStates.mailboxes.isLoading ? : ( - <> - - - - + + + + + + + + + )} ) diff --git a/src/frontend/src/features/layouts/components/thread-panel/components/thread-panel-filter.tsx b/src/frontend/src/features/layouts/components/thread-panel/components/thread-panel-filter.tsx index d5026a89..601e44cf 100644 --- a/src/frontend/src/features/layouts/components/thread-panel/components/thread-panel-filter.tsx +++ b/src/frontend/src/features/layouts/components/thread-panel/components/thread-panel-filter.tsx @@ -98,7 +98,11 @@ export const ThreadPanelFilter = () => { callback: () => handleSelectFilter(type), }))} > - +