From 79a706efe3fe6cd4ca2093fedc53ffc94c39f25b Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 12 Jun 2025 17:24:06 +0200 Subject: [PATCH] feat: Implement stacked mobile layout for interest table Mobile Table Redesign: - Redesigned mobile table layout with stacked status badges under contact info - Contact information takes 60% width with badges stacked below name/email - All status badges (Sales Process, EOI, Contract, Lead Category) now stack vertically - Eliminated horizontal scrolling issues and cramped mobile display Visual Improvements: - Optimized badge sizing (x-small) for mobile to fit more content - Enhanced spacing and alignment for better readability - Improved touch targets and visual hierarchy - Contact info and badges properly aligned for clean appearance Layout Structure: - Mobile: 3 columns (Contact+Badges 60%, Status 20%, Created 20%) - Desktop: Maintains original 6-column layout unchanged - Responsive breakpoint at 768px for optimal mobile experience User Experience Enhancements: - All status information visible without horizontal scrolling - Better content density and information accessibility - Maintained click functionality and hover effects - Consistent design language across mobile and desktop The mobile table now provides a much cleaner, more accessible experience with all status information clearly visible in a stacked format. --- pages/dashboard/interest-list.vue | 314 ++++++++++++++++++++---------- 1 file changed, 207 insertions(+), 107 deletions(-) diff --git a/pages/dashboard/interest-list.vue b/pages/dashboard/interest-list.vue index 73695fe..b9dd5a0 100644 --- a/pages/dashboard/interest-list.vue +++ b/pages/dashboard/interest-list.vue @@ -136,59 +136,136 @@ > @@ -584,95 +661,91 @@ const getRelativeTime = (dateString: string) => { /* Mobile-specific styles */ @media (max-width: 768px) { + /* Mobile Contact Cell with Stacked Layout */ + .mobile-contact-cell { + padding: 12px 8px !important; + vertical-align: top !important; + width: 60% !important; + min-width: 280px !important; + } + + .mobile-contact-container { + width: 100%; + } + + .mobile-badges-stack { + margin-left: 44px; /* Align with contact info text */ + } + + .mobile-badges-stack .v-chip { + height: 20px !important; + font-size: 0.65rem !important; + padding: 0 6px !important; + margin: 1px !important; + } + + /* Mobile Status Cell */ + .mobile-status-cell { + padding: 12px 4px !important; + text-align: center !important; + vertical-align: middle !important; + width: 20% !important; + min-width: 80px !important; + } + + /* Mobile Date Cell */ + .mobile-date-cell { + padding: 12px 8px !important; + text-align: center !important; + vertical-align: middle !important; + width: 20% !important; + min-width: 100px !important; + } + + .mobile-date-cell .text-caption { + font-size: 0.65rem !important; + line-height: 1.3; + } + + /* Table container improvements */ .table-container { position: relative; overflow-x: auto; -webkit-overflow-scrolling: touch; - margin: 0 -16px; /* Extend to screen edge */ - padding: 0 16px; /* Add padding back */ + margin: 0 -16px; + padding: 0 16px; } - /* Add padding to the wrapper instead */ .modern-table :deep(.v-table__wrapper) { - min-width: 400px; /* Reduced minimum width for mobile */ + min-width: 460px; /* Minimum width to fit 3 columns properly */ } + /* Table headers for mobile */ .modern-table :deep(th) { padding: 8px 4px !important; font-size: 0.75rem; white-space: nowrap; + text-align: center; } - .modern-table :deep(td) { - padding: 12px 4px !important; - vertical-align: middle; - } - - /* Optimize mobile column widths to fit better */ - .modern-table :deep(th:nth-child(1)), - .modern-table :deep(td:nth-child(1)) { - min-width: 220px !important; /* Contact info needs more space */ - max-width: 220px !important; - } - - .modern-table :deep(th:nth-child(2)), - .modern-table :deep(td:nth-child(2)) { - min-width: 100px !important; - max-width: 100px !important; - } - - .modern-table :deep(th:nth-child(3)), - .modern-table :deep(td:nth-child(3)) { - min-width: 80px !important; - max-width: 80px !important; - } - - /* Contact cell optimization */ - .contact-cell { - max-width: 220px; - padding: 8px 4px !important; - } - - .contact-cell .text-truncate { - max-width: 160px; - } - - .contact-cell .v-avatar { - margin-right: 8px !important; - flex-shrink: 0; + .modern-table :deep(th:first-child) { + text-align: left !important; + padding-left: 8px !important; } /* Adjust table row height on mobile */ .table-row td { - padding: 8px 4px !important; height: auto !important; - min-height: 60px; + min-height: 80px !important; /* Increased for stacked content */ } - /* Ensure badges are sized appropriately */ - .modern-table :deep(.v-chip) { - height: 18px !important; - font-size: 0.625rem !important; - padding: 0 6px !important; + /* Contact cell text improvements */ + .mobile-contact-cell .text-truncate { + max-width: 200px; } - /* Style the date column to be more compact */ - .modern-table :deep(td:nth-child(3) .text-caption) { - font-size: 0.6rem !important; - line-height: 1.2; - } - - /* Add visual scroll indicators */ - .table-container::after { - content: ''; - position: absolute; - top: 0; - right: 16px; - bottom: 0; - width: 20px; - background: linear-gradient(to right, transparent, rgba(255,255,255,0.9)); - pointer-events: none; - z-index: 1; + .mobile-contact-cell .v-avatar { + flex-shrink: 0; } /* Fix container padding */ @@ -690,6 +763,33 @@ const getRelativeTime = (dateString: string) => { word-break: break-word; overflow-wrap: break-word; } + + /* Add visual scroll indicators */ + .table-container::after { + content: ''; + position: absolute; + top: 0; + right: 16px; + bottom: 0; + width: 20px; + background: linear-gradient(to right, transparent, rgba(255,255,255,0.9)); + pointer-events: none; + z-index: 1; + } + + /* Hover effects for mobile */ + .modern-table :deep(tbody tr:hover) { + background-color: #f5f5f5; + } + + /* Optimize badge spacing in stacked layout */ + .mobile-badges-stack .d-flex { + gap: 4px !important; + } + + .mobile-badges-stack .gap-1 { + gap: 4px !important; + } } /* Ensure proper text truncation */