From 5e045526d631f3b5b510b57746f600fc4ec897d2 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Sun, 18 Jan 2026 11:51:29 -0600 Subject: [PATCH 1/3] fix: standardize card/list action buttons and hover states (refs #51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Documents page: Convert from text buttons to icon buttons (Eye for View Details, Trash for Delete), add card hover shadow effect, convert to MUI components for consistency - Fuel Logs: Add row hover background effect on list items - Maintenance Records: Add card hover shadow effect - Maintenance Schedules: Add card hover shadow effect All changes follow the VehicleCard pattern with: - Light gray shadow/elevation on hover with 0.2s transition - Consistent icon button styling with mobile-responsive touch targets - Proper MUI component usage throughout 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../documents/pages/DocumentsPage.tsx | 259 ++++++++++++------ .../fuel-logs/components/FuelLogsList.tsx | 7 +- .../components/MaintenanceRecordsList.tsx | 11 +- .../components/MaintenanceSchedulesList.tsx | 11 +- 4 files changed, 203 insertions(+), 85 deletions(-) diff --git a/frontend/src/features/documents/pages/DocumentsPage.tsx b/frontend/src/features/documents/pages/DocumentsPage.tsx index f45464c..0848216 100644 --- a/frontend/src/features/documents/pages/DocumentsPage.tsx +++ b/frontend/src/features/documents/pages/DocumentsPage.tsx @@ -1,8 +1,18 @@ import React, { useMemo } from 'react'; import { useAuth0 } from '@auth0/auth0-react'; import { useDocumentsList, useDeleteDocument } from '../hooks/useDocuments'; -import { Card } from '../../../shared-minimal/components/Card'; -import { Button } from '../../../shared-minimal/components/Button'; +import { + Card, + CardContent, + Box, + Typography, + IconButton, + Button, + useTheme, + useMediaQuery, +} from '@mui/material'; +import VisibilityIcon from '@mui/icons-material/Visibility'; +import DeleteIcon from '@mui/icons-material/Delete'; import { useNavigate } from 'react-router-dom'; import { AddDocumentDialog } from '../components/AddDocumentDialog'; import { ExpirationBadge } from '../components/ExpirationBadge'; @@ -17,41 +27,43 @@ export const DocumentsPage: React.FC = () => { const navigate = useNavigate(); const removeDoc = useDeleteDocument(); const [isAddOpen, setIsAddOpen] = React.useState(false); + const theme = useTheme(); + const isMobile = useMediaQuery(theme.breakpoints.down('sm')); const vehiclesMap = useMemo(() => new Map(vehicles?.map(v => [v.id, v]) || []), [vehicles]); // Show loading while auth is initializing if (authLoading) { return ( -
-

Documents

-
-
Checking authentication...
-
-
+ + Documents + + Checking authentication... + + ); } // Show login prompt when not authenticated if (!isAuthenticated) { return ( -
-

Documents

- -
-
- + + Documents + + + + -
-

Authentication Required

-

Please log in to view your documents

- -
+
-
+ ); } @@ -59,115 +71,198 @@ export const DocumentsPage: React.FC = () => { const isAuthError = error && (error as any).response?.status === 401; if (isAuthError) { return ( -
-

Documents

- -
-
- + + Documents + + + + -
-

Session Expired

-

Your session has expired. Please log in again to continue.

- -
+
-
+ ); } return ( -
-
-

Documents

-
- -
-
+ + + Documents + + setIsAddOpen(false)} /> {isLoading && ( -
-
Loading documents...
-
+ + Loading documents... + )} {error && !isAuthError && ( - -
-
- + + + + -
-

Error Loading Documents

-

Failed to load documents. Please try again.

- -
+
)} {!isLoading && !error && data && data.length === 0 && ( - -
-
- + + + + -
-

No Documents Yet

-

You haven't added any documents yet. Documents will appear here once you create them.

- -
+
)} {!isLoading && !error && data && data.length > 0 && ( -
+ {data.map((doc) => { const vehicle = vehiclesMap.get(doc.vehicleId); const vehicleLabel = getVehicleLabel(vehicle); return ( - -
-
- {doc.title} + + + + {doc.title} -
-
Type: {doc.documentType}
+ + Type: {doc.documentType} -
- Vehicle: - -
+ + {doc.sharedVehicleIds.length > 0 && ( -
+ Shared with {doc.sharedVehicleIds.length} other vehicle{doc.sharedVehicleIds.length > 1 ? 's' : ''} -
+ )} -
- - -
-
+ + + navigate(`/garage/documents/${doc.id}`)} + sx={{ + color: 'text.secondary', + minWidth: isMobile ? 48 : 'auto', + minHeight: isMobile ? 48 : 'auto', + '&:hover': { + backgroundColor: 'primary.main', + color: 'white', + }, + ...(isMobile && { + border: '1px solid', + borderColor: 'divider', + borderRadius: 2, + }), + }} + title="View Details" + > + + + removeDoc.mutate(doc.id)} + sx={{ + color: 'error.main', + minWidth: isMobile ? 48 : 'auto', + minHeight: isMobile ? 48 : 'auto', + '&:hover': { + backgroundColor: 'error.main', + color: 'white', + }, + ...(isMobile && { + border: '1px solid', + borderColor: 'error.main', + borderRadius: 2, + }), + }} + title="Delete" + > + + +
); })} -
+
)} -
+ ); }; diff --git a/frontend/src/features/fuel-logs/components/FuelLogsList.tsx b/frontend/src/features/fuel-logs/components/FuelLogsList.tsx index 64df06f..6e5a6f5 100644 --- a/frontend/src/features/fuel-logs/components/FuelLogsList.tsx +++ b/frontend/src/features/fuel-logs/components/FuelLogsList.tsx @@ -162,7 +162,12 @@ export const FuelLogsList: React.FC = ({ logs, onEdit, onDele flexDirection: isMobile ? 'column' : 'row', alignItems: isMobile ? 'stretch' : 'center', gap: isMobile ? 1 : 0, - py: isMobile ? 2 : 1 + py: isMobile ? 2 : 1, + '&:hover': { + backgroundColor: 'action.hover', + }, + transition: 'background-color 0.2s ease-in-out', + cursor: 'default', }} > = ({ const subtypeCount = record.subtypeCount || record.subtypes?.length || 0; return ( - + = const reminderDisplay = getReminderDisplay(schedule); return ( - + Date: Sun, 18 Jan 2026 12:10:10 -0600 Subject: [PATCH 2/3] fix: add Edit (pencil) icon to Documents page (refs #51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added missing Edit icon button between Eye and Trash icons. Clicking Edit opens EditDocumentDialog to modify the document. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../documents/pages/DocumentsPage.tsx | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/frontend/src/features/documents/pages/DocumentsPage.tsx b/frontend/src/features/documents/pages/DocumentsPage.tsx index 0848216..6ee40d4 100644 --- a/frontend/src/features/documents/pages/DocumentsPage.tsx +++ b/frontend/src/features/documents/pages/DocumentsPage.tsx @@ -12,10 +12,13 @@ import { useMediaQuery, } from '@mui/material'; import VisibilityIcon from '@mui/icons-material/Visibility'; +import EditIcon from '@mui/icons-material/Edit'; import DeleteIcon from '@mui/icons-material/Delete'; import { useNavigate } from 'react-router-dom'; import { AddDocumentDialog } from '../components/AddDocumentDialog'; +import { EditDocumentDialog } from '../components/EditDocumentDialog'; import { ExpirationBadge } from '../components/ExpirationBadge'; +import type { DocumentRecord } from '../types/documents.types'; import { DocumentCardMetadata } from '../components/DocumentCardMetadata'; import { useVehicles } from '../../vehicles/hooks/useVehicles'; import { getVehicleLabel } from '../utils/vehicleLabel'; @@ -27,6 +30,7 @@ export const DocumentsPage: React.FC = () => { const navigate = useNavigate(); const removeDoc = useDeleteDocument(); const [isAddOpen, setIsAddOpen] = React.useState(false); + const [editingDoc, setEditingDoc] = React.useState(null); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down('sm')); @@ -100,6 +104,13 @@ export const DocumentsPage: React.FC = () => { setIsAddOpen(false)} /> + {editingDoc && ( + setEditingDoc(null)} + document={editingDoc} + /> + )} {isLoading && ( @@ -235,6 +246,27 @@ export const DocumentsPage: React.FC = () => { > + setEditingDoc(doc)} + sx={{ + color: 'text.secondary', + minWidth: isMobile ? 48 : 'auto', + minHeight: isMobile ? 48 : 'auto', + '&:hover': { + backgroundColor: 'primary.main', + color: 'white', + }, + ...(isMobile && { + border: '1px solid', + borderColor: 'divider', + borderRadius: 2, + }), + }} + title="Edit" + > + + removeDoc.mutate(doc.id)} From 48aea409d84ff1da74564ec750fe896a16189f09 Mon Sep 17 00:00:00 2001 From: Eric Gullickson <16152721+ericgullickson@users.noreply.github.com> Date: Sun, 18 Jan 2026 12:21:44 -0600 Subject: [PATCH 3/3] fix: remove colored hover fills from icon buttons (refs #51) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Changed icon button hover behavior to match VehicleCard pattern: - Removed background color fills on hover (was primary.main/error.main) - Icons now use default MUI IconButton gray ripple on hover - Edit icons use text.secondary color (matches VehicleCard) - Delete icons use error.main color (matches VehicleCard) Affected files: - DocumentsPage.tsx - FuelLogsList.tsx - MaintenanceRecordsList.tsx - MaintenanceSchedulesList.tsx 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .../documents/pages/DocumentsPage.tsx | 27 ------------------- .../fuel-logs/components/FuelLogsList.tsx | 14 +--------- .../components/MaintenanceRecordsList.tsx | 20 +------------- .../components/MaintenanceSchedulesList.tsx | 20 +------------- 4 files changed, 3 insertions(+), 78 deletions(-) diff --git a/frontend/src/features/documents/pages/DocumentsPage.tsx b/frontend/src/features/documents/pages/DocumentsPage.tsx index 6ee40d4..9f44d19 100644 --- a/frontend/src/features/documents/pages/DocumentsPage.tsx +++ b/frontend/src/features/documents/pages/DocumentsPage.tsx @@ -232,15 +232,6 @@ export const DocumentsPage: React.FC = () => { color: 'text.secondary', minWidth: isMobile ? 48 : 'auto', minHeight: isMobile ? 48 : 'auto', - '&:hover': { - backgroundColor: 'primary.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'divider', - borderRadius: 2, - }), }} title="View Details" > @@ -253,15 +244,6 @@ export const DocumentsPage: React.FC = () => { color: 'text.secondary', minWidth: isMobile ? 48 : 'auto', minHeight: isMobile ? 48 : 'auto', - '&:hover': { - backgroundColor: 'primary.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'divider', - borderRadius: 2, - }), }} title="Edit" > @@ -274,15 +256,6 @@ export const DocumentsPage: React.FC = () => { color: 'error.main', minWidth: isMobile ? 48 : 'auto', minHeight: isMobile ? 48 : 'auto', - '&:hover': { - backgroundColor: 'error.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'error.main', - borderRadius: 2, - }), }} title="Delete" > diff --git a/frontend/src/features/fuel-logs/components/FuelLogsList.tsx b/frontend/src/features/fuel-logs/components/FuelLogsList.tsx index 6e5a6f5..5166514 100644 --- a/frontend/src/features/fuel-logs/components/FuelLogsList.tsx +++ b/frontend/src/features/fuel-logs/components/FuelLogsList.tsx @@ -208,15 +208,9 @@ export const FuelLogsList: React.FC = ({ logs, onEdit, onDele size={isMobile ? 'medium' : 'small'} onClick={() => onEdit(log)} sx={{ - color: 'primary.main', - '&:hover': { backgroundColor: 'primary.main', color: 'white' }, + color: 'text.secondary', minWidth: isMobile ? 48 : 'auto', minHeight: isMobile ? 48 : 'auto', - ...(isMobile && { - border: '1px solid', - borderColor: 'primary.main', - borderRadius: 2 - }) }} > @@ -228,14 +222,8 @@ export const FuelLogsList: React.FC = ({ logs, onEdit, onDele onClick={() => handleDeleteClick(log)} sx={{ color: 'error.main', - '&:hover': { backgroundColor: 'error.main', color: 'white' }, minWidth: isMobile ? 48 : 'auto', minHeight: isMobile ? 48 : 'auto', - ...(isMobile && { - border: '1px solid', - borderColor: 'error.main', - borderRadius: 2 - }) }} > diff --git a/frontend/src/features/maintenance/components/MaintenanceRecordsList.tsx b/frontend/src/features/maintenance/components/MaintenanceRecordsList.tsx index 27efd28..015029c 100644 --- a/frontend/src/features/maintenance/components/MaintenanceRecordsList.tsx +++ b/frontend/src/features/maintenance/components/MaintenanceRecordsList.tsx @@ -157,18 +157,9 @@ export const MaintenanceRecordsList: React.FC = ({ size={isMobile ? 'medium' : 'small'} onClick={() => onEdit(record)} sx={{ - color: 'primary.main', + color: 'text.secondary', minWidth: 44, minHeight: 44, - '&:hover': { - backgroundColor: 'primary.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'primary.main', - borderRadius: 2, - }), }} > @@ -182,15 +173,6 @@ export const MaintenanceRecordsList: React.FC = ({ color: 'error.main', minWidth: 44, minHeight: 44, - '&:hover': { - backgroundColor: 'error.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'error.main', - borderRadius: 2, - }), }} > diff --git a/frontend/src/features/maintenance/components/MaintenanceSchedulesList.tsx b/frontend/src/features/maintenance/components/MaintenanceSchedulesList.tsx index 44ea1da..03e7f56 100644 --- a/frontend/src/features/maintenance/components/MaintenanceSchedulesList.tsx +++ b/frontend/src/features/maintenance/components/MaintenanceSchedulesList.tsx @@ -257,18 +257,9 @@ export const MaintenanceSchedulesList: React.FC = size={isMobile ? 'medium' : 'small'} onClick={() => onEdit(schedule)} sx={{ - color: 'primary.main', + color: 'text.secondary', minWidth: 44, minHeight: 44, - '&:hover': { - backgroundColor: 'primary.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'primary.main', - borderRadius: 2, - }), }} > @@ -282,15 +273,6 @@ export const MaintenanceSchedulesList: React.FC = color: 'error.main', minWidth: 44, minHeight: 44, - '&:hover': { - backgroundColor: 'error.main', - color: 'white', - }, - ...(isMobile && { - border: '1px solid', - borderColor: 'error.main', - borderRadius: 2, - }), }} >