diff --git a/components/fakemui/email/atoms/StarButton.tsx b/components/fakemui/email/atoms/StarButton.tsx index ac8bc5b93..312b47932 100644 --- a/components/fakemui/email/atoms/StarButton.tsx +++ b/components/fakemui/email/atoms/StarButton.tsx @@ -1,5 +1,5 @@ // fakemui/email/atoms/StarButton.tsx -import React, { forwardRef, useState } from 'react' +import React, { forwardRef, useEffect, useState } from 'react' import { MaterialIcon } from '../../../../icons/react/fakemui' import { useAccessible } from '../../../../hooks/useAccessible' @@ -16,6 +16,8 @@ export const StarButton = forwardRef< >(({ isStarred = false, onToggleStar, testId, ...props }, ref) => { const [starred, setStarred] = useState(isStarred) + useEffect(() => { setStarred(isStarred) }, [isStarred]) + const accessible = useAccessible({ feature: 'email', component: 'star-button', diff --git a/components/fakemui/email/surfaces/ComposeWindow.tsx b/components/fakemui/email/surfaces/ComposeWindow.tsx index d3d7b9411..e0b87020e 100644 --- a/components/fakemui/email/surfaces/ComposeWindow.tsx +++ b/components/fakemui/email/surfaces/ComposeWindow.tsx @@ -24,6 +24,7 @@ export const ComposeWindow = ({ const [bcc, setBcc] = useState([]) const [subject, setSubject] = useState('') const [body, setBody] = useState('') + const [showCcBcc, setShowCcBcc] = useState(false) const accessible = useAccessible({ feature: 'email', component: 'compose', identifier: customTestId || 'compose' @@ -58,15 +59,37 @@ export const ComposeWindow = ({ - - - + + + {!showCcBcc && ( + + )} + + {showCcBcc && ( + <> + + + + )} { + document.documentElement.setAttribute( + 'data-theme', + state.isDarkMode ? 'dark' : 'light' + ) + }, [state.isDarkMode]) + const header = ( - {state.activeFolder} + {state.activeFolder + .replace(/_/g, ' ') + .replace(/^\w/, c => c.toUpperCase())} {state.filteredEmails.length > 0 && ` (${state.filteredEmails.length})`} @@ -66,6 +75,11 @@ export default function EmailClientContent() { {state.filteredEmails.length === 0 ? ( + + {state.activeFolder === 'inbox' || state.searchQuery + ? 'inbox' + : 'folder_open'} + {state.activeFolder === 'inbox' && state.searchQuery diff --git a/frontends/emailclient/app/globals.css b/frontends/emailclient/app/globals.css index 1c323428f..f26b29d00 100644 --- a/frontends/emailclient/app/globals.css +++ b/frontends/emailclient/app/globals.css @@ -339,10 +339,15 @@ input, textarea, select { } .folder-nav-item .unread-count { - font-size: 0.75rem; - font-weight: 600; + background-color: var(--mat-sys-primary-container); + color: var(--mat-sys-on-primary-container); + border-radius: var(--mat-sys-corner-full); + padding: 0 6px; + font-size: 0.6875rem; + font-weight: 700; + min-width: 18px; + text-align: center; margin-left: auto; - color: var(--mat-sys-on-surface-variant); } /* Active folder — filled tonal */ @@ -616,8 +621,17 @@ input, textarea, select { border-color: var(--mat-sys-surface-variant); } +/* Issue 1 — selected card distinct highlight */ +.email-card[aria-current="true"] { + background-color: var(--mat-sys-secondary-container) !important; + border-left: 3px solid var(--mat-sys-primary); + padding-left: 13px; +} + .email-card--unread { background-color: var(--mat-sys-surface-container-lowest); + border-left: 3px solid var(--mat-sys-primary); + padding-left: 13px; } .email-card--unread .email-from, @@ -698,6 +712,15 @@ input, textarea, select { background-color: var(--mat-sys-surface-container-high); } +/* Issue 4 — starred state amber color */ +.star-button--active { + color: #f9a825; +} + +.star-button--active .material-symbols-outlined { + color: #f9a825; +} + /* ============================================ */ /* Email Detail / Reading Pane */ /* ============================================ */ @@ -714,6 +737,21 @@ input, textarea, select { line-height: 1.3; } +/* Issue 9 — email header metadata layout */ +.header-top { + display: flex; + align-items: flex-start; + justify-content: space-between; + gap: 8px; +} + +.header-details { + display: flex; + flex-direction: column; + gap: 4px; + margin-top: 12px; +} + /* ============================================ */ /* Thread Panel (main area) */ /* ============================================ */