A tonne of updates to how the system builds the view points in hopes of having a better mobile expereince

This commit is contained in:
2025-07-24 12:42:27 -06:00
parent 8e133fb9b4
commit 37632d1dfc
17 changed files with 1253 additions and 98 deletions

View File

@@ -2,14 +2,22 @@
.admin-container {
display: flex;
height: calc(100vh - var(--header-height));
height: calc(var(--app-height) - var(--header-height));
background-color: #f5f5f5;
width: 100%;
max-width: 100vw;
overflow: hidden;
}
.admin-sidebar {
width: 250px;
min-width: 250px;
max-width: 250px;
background-color: white;
border-right: 1px solid #e0e0e0;
padding: 20px;
box-sizing: border-box;
flex-shrink: 0;
}
.admin-sidebar h2 {
@@ -45,6 +53,12 @@
flex: 1;
padding: 30px;
overflow-y: auto;
overflow-x: hidden;
width: 100%;
min-width: 0; /* Allow flex item to shrink */
box-sizing: border-box;
max-height: calc(100vh - var(--header-height));
max-height: calc(var(--app-height) - var(--header-height));
}
.admin-section {
@@ -52,6 +66,9 @@
border-radius: var(--border-radius);
padding: 30px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.admin-section h2 {
@@ -619,6 +636,9 @@
grid-template-columns: 1fr 2fr;
gap: 30px;
margin-top: 20px;
width: 100%;
box-sizing: border-box;
overflow: hidden;
}
.user-form,
@@ -628,6 +648,13 @@
padding: 25px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border: 1px solid #e0e0e0;
width: 100%;
box-sizing: border-box;
}
.users-list {
overflow-x: auto; /* Allow horizontal scrolling if needed */
min-width: 0; /* Allow shrinking */
}
.user-form h3,
@@ -644,6 +671,9 @@
border-collapse: collapse;
margin-top: 15px;
font-size: 14px;
table-layout: auto;
min-width: 600px; /* Ensure minimum width for readability on desktop */
box-sizing: border-box;
}
.users-table th,
@@ -677,6 +707,10 @@
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.5px;
display: inline-block;
text-align: center;
min-width: 45px;
line-height: 1.2;
}
.user-role.admin {
@@ -786,26 +820,108 @@
@media (max-width: 768px) {
.users-admin-container {
grid-template-columns: 1fr;
gap: 20px;
gap: 25px; /* Increased gap for better separation */
}
.user-form,
.users-list {
padding: 25px; /* Back to desktop padding for better comfort */
width: 100%;
box-sizing: border-box;
}
.users-list {
overflow-x: auto;
width: 100%;
box-sizing: border-box;
}
.users-table {
font-size: 12px;
font-size: 14px; /* Match desktop font size for better readability */
min-width: auto; /* Remove minimum width constraint on mobile */
width: 100%;
table-layout: auto; /* Changed from fixed to auto for better text flow */
border-collapse: collapse;
display: block;
}
.users-table thead {
display: none;
}
.users-table tbody,
.users-table tr,
.users-table td {
display: block;
width: 100% !important;
box-sizing: border-box;
}
.users-table tr {
margin-bottom: 15px;
border: 1px solid #e0e0e0;
border-radius: var(--border-radius);
padding: 10px;
}
.users-table th,
.users-table td {
padding: 8px;
padding: 8px 0;
border: none;
display: flex;
align-items: center;
word-wrap: break-word;
overflow-wrap: break-word;
}
.users-table td::before {
content: attr(data-label);
font-weight: bold;
width: 80px;
min-width: 80px;
margin-right: 10px;
color: #555;
}
/* Adjust column widths for mobile - less aggressive width constraints */
.users-table th:nth-child(1),
.users-table td:nth-child(1) { /* Email */
width: 35%; /* Increased back to give more space for email */
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) { /* Name */
width: 25%;
}
.users-table th:nth-child(3),
.users-table td:nth-child(3) { /* Admin */
width: 15%; /* Reduced back to original for more space elsewhere */
}
.users-table th:nth-child(4),
.users-table td:nth-child(4) { /* Created */
width: 0%;
display: none; /* Hide created date on mobile to save space */
}
.users-table th:nth-child(5),
.users-table td:nth-child(5) { /* Actions */
width: 25%; /* Reduced back to give more balanced layout */
}
.user-actions {
flex-direction: column;
gap: 4px;
gap: 8px; /* Increased for better spacing */
width: 100%;
}
.user-actions .btn {
font-size: 11px;
padding: 4px 8px;
font-size: 12px; /* Increased to match more with desktop */
padding: 8px 10px; /* More comfortable padding */
width: 100%;
text-align: center;
min-height: 36px; /* Increased minimum height for better touch targets */
line-height: 1.3;
}
.user-form .form-actions {
@@ -953,12 +1069,51 @@
@media (max-width: 480px) {
.users-table {
font-size: 11px;
font-size: 13px; /* Close to desktop, but slightly smaller for small screens */
min-width: auto;
}
.users-table th,
.users-table td {
padding: 10px 6px; /* Comfortable padding, not too cramped */
font-size: 13px; /* Match table font size */
line-height: 1.4;
}
/* Adjust column widths for very small screens */
.users-table th:nth-child(1),
.users-table td:nth-child(1) { /* Email */
width: 35%; /* Reduced from 40% */
word-break: break-all;
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) { /* Name */
width: 25%; /* Reduced from 30% */
}
.users-table th:nth-child(3),
.users-table td:nth-child(3) { /* Admin */
width: 18%; /* Increased from 15% */
}
.users-table th:nth-child(5),
.users-table td:nth-child(5) { /* Actions */
width: 22%; /* Increased from 15% */
}
.user-role {
font-size: 10px;
padding: 2px 6px;
font-size: 10px; /* Increased from 9px for better readability */
padding: 4px 6px; /* More comfortable padding */
line-height: 1.2;
}
.user-actions .btn {
font-size: 11px; /* Increased from 9px */
padding: 6px 8px; /* More comfortable padding */
border-radius: 4px; /* Slightly larger border radius */
min-height: 32px; /* Comfortable touch target */
line-height: 1.3;
}
.user-form input[type="email"],
@@ -1450,7 +1605,8 @@
/* Admin container becomes full width */
.admin-container {
flex-direction: column;
height: calc(100vh - 50px); /* Reduced header height */
height: calc(100vh - 50px); /* Fallback for older browsers */
height: calc(var(--app-height) - 50px); /* Reduced header height */
}
/* Sidebar as overlay */
@@ -1459,7 +1615,8 @@
top: 0;
left: -280px;
width: 280px;
height: 100vh;
height: 100vh; /* Fallback for older browsers */
height: var(--app-height);
background: white;
z-index: 9999; /* Increased from 1000 */
transition: left 0.3s ease;
@@ -1648,3 +1805,60 @@
font-size: 12px;
}
}
/* Medium screen adjustments for better content fitting */
@media (max-width: 1024px) and (min-width: 769px) {
.admin-sidebar {
width: 200px;
min-width: 200px;
max-width: 200px;
padding: 15px;
}
.admin-content {
padding: 20px;
}
.admin-section {
padding: 20px;
}
.users-admin-container {
grid-template-columns: 1fr;
gap: 20px;
}
.shifts-admin-container {
grid-template-columns: 1fr;
gap: 20px;
}
.user-form,
.users-list {
padding: 20px;
}
.users-table {
font-size: 13px;
}
.users-table th,
.users-table td {
padding: 10px 8px;
}
}
/* Small laptop adjustments */
@media (max-width: 1200px) and (min-width: 1025px) {
.admin-sidebar {
width: 220px;
min-width: 220px;
max-width: 220px;
}
.users-admin-container,
.shifts-admin-container {
grid-template-columns: 1fr 1.5fr;
gap: 25px;
}
}

View File

@@ -10,18 +10,27 @@
position: sticky;
top: 0;
z-index: 100;
width: 100%;
max-width: 100vw;
box-sizing: border-box;
}
.header h1 {
margin: 0;
font-size: 1.5em;
font-weight: 600;
flex: 1;
min-width: 0;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.header-actions {
display: flex;
align-items: center;
gap: 20px;
flex-shrink: 0;
}
.user-info {
@@ -74,6 +83,8 @@
max-width: 1200px;
margin: 0 auto;
padding: 20px;
width: 100%;
box-sizing: border-box;
}
/* My Signups section - now at the top */
@@ -446,8 +457,18 @@
/* Mobile adjustments */
@media (max-width: 768px) {
/* Ensure proper scrolling on mobile */
body {
overflow-y: auto;
}
#app {
overflow-y: auto;
}
.shifts-container {
padding: 15px;
padding-bottom: 60px; /* Add extra bottom padding for mobile */
}
.shifts-grid {
@@ -561,4 +582,17 @@
.calendar-day-number {
font-size: 0.75em;
}
}
/* Shifts Page Specific Overrides */
body {
height: auto;
min-height: 100vh;
min-height: var(--app-height);
}
#app {
height: auto;
min-height: 100vh;
min-height: var(--app-height);
}

View File

@@ -10,6 +10,16 @@
--border-radius: 4px;
--transition: all 0.3s ease;
--header-height: 60px;
/* Responsive width variables */
--container-max-width: 100%;
--content-padding: 20px;
--mobile-padding: 15px;
/* Breakpoints for consistency */
--mobile-breakpoint: 768px;
--tablet-breakpoint: 1024px;
--desktop-breakpoint: 1200px;
}
/* Reset and base styles */
@@ -25,14 +35,20 @@ body {
line-height: 1.5;
color: var(--dark-color);
background-color: var(--light-color);
width: 100%;
overflow-x: hidden; /* Prevent horizontal scrolling */
}
/* App container */
#app {
display: flex;
flex-direction: column;
height: 100vh;
height: 100vh; /* Fallback for older browsers */
height: var(--app-height);
width: 100%;
max-width: 100vw;
position: relative;
overflow: hidden; /* Prevent content from overflowing */
}
/* Header */
@@ -43,10 +59,13 @@ body {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 20px;
padding: 0 var(--content-padding);
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
z-index: 10001; /* Increase from 1000 to be higher than map controls */
position: relative;
width: 100%;
min-width: 0; /* Allow flex items to shrink */
flex-shrink: 0; /* Don't shrink the header */
}
.header h1 {
@@ -86,7 +105,11 @@ body {
#map-container {
position: relative;
width: 100%;
max-width: 100vw;
height: calc(100vh - var(--header-height));
height: calc(var(--app-height) - var(--header-height));
flex: 1;
overflow: hidden;
}
#map {
@@ -97,6 +120,7 @@ body {
bottom: 0;
width: 100%;
height: 100%;
max-width: 100%;
background-color: #f0f0f0;
}
@@ -1185,8 +1209,26 @@ body {
/* Hide desktop elements on mobile */
@media (max-width: 768px) {
/* Update root variables for mobile */
:root {
--content-padding: var(--mobile-padding);
--header-height: 50px; /* Smaller header on mobile */
}
.header {
padding: 0 var(--mobile-padding);
height: var(--header-height);
min-height: 50px;
flex-wrap: nowrap;
}
.header h1 {
font-size: 18px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
.header-actions {
@@ -1200,10 +1242,19 @@ body {
.mobile-dropdown {
display: block;
flex-shrink: 0;
}
.mobile-sidebar {
display: flex;
position: fixed;
right: 10px;
top: 50%;
transform: translateY(-50%);
width: auto;
max-width: 60px;
flex-direction: column;
box-sizing: border-box;
}
.map-controls {
@@ -1219,7 +1270,9 @@ body {
/* Adjust modal for mobile */
.modal-content {
width: 95%;
max-width: calc(100vw - 20px);
margin: 10px;
box-sizing: border-box;
}
.form-row {
@@ -1416,3 +1469,117 @@ path.leaflet-interactive {
min-height: 44px;
}
}
/* Cache Busting Update Notification Styles */
.update-notification {
position: fixed !important;
top: 20px !important;
right: 20px !important;
background: linear-gradient(135deg, #4CAF50, #45a049) !important;
color: white !important;
padding: 15px !important;
border-radius: 8px !important;
box-shadow: 0 4px 20px rgba(0,0,0,0.3) !important;
z-index: 10000 !important;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
animation: slideInFromRight 0.3s ease-out !important;
max-width: 350px !important;
border: 1px solid rgba(255,255,255,0.2) !important;
}
@keyframes slideInFromRight {
from {
transform: translateX(100%);
opacity: 0;
}
to {
transform: translateX(0);
opacity: 1;
}
}
.update-notification-content {
display: flex !important;
align-items: center !important;
gap: 10px !important;
flex-wrap: wrap !important;
}
.update-message {
font-size: 14px !important;
font-weight: 500 !important;
flex: 1 !important;
min-width: 150px !important;
}
.update-button {
background: rgba(255,255,255,0.2) !important;
border: 1px solid rgba(255,255,255,0.3) !important;
color: white !important;
padding: 8px 16px !important;
border-radius: 4px !important;
cursor: pointer !important;
font-size: 12px !important;
font-weight: 500 !important;
transition: background-color 0.2s ease !important;
white-space: nowrap !important;
}
.update-button:hover {
background: rgba(255,255,255,0.3) !important;
}
.update-dismiss {
background: none !important;
border: none !important;
color: white !important;
cursor: pointer !important;
font-size: 18px !important;
padding: 0 !important;
margin-left: 5px !important;
width: 24px !important;
height: 24px !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
border-radius: 50% !important;
transition: background-color 0.2s ease !important;
}
.update-dismiss:hover {
background: rgba(255,255,255,0.2) !important;
}
/* Mobile responsive styles for update notification */
@media (max-width: 768px) {
.update-notification {
top: 10px !important;
right: 10px !important;
left: 10px !important;
max-width: none !important;
padding: 12px !important;
}
.update-notification-content {
flex-direction: column !important;
align-items: stretch !important;
gap: 8px !important;
}
.update-message {
text-align: center !important;
min-width: auto !important;
}
.update-button {
align-self: center !important;
min-width: 120px !important;
}
.update-dismiss {
position: absolute !important;
top: 8px !important;
right: 8px !important;
margin: 0 !important;
}
}

View File

@@ -4,6 +4,8 @@
max-width: 800px;
margin: 0 auto;
padding: 2rem;
width: 100%;
box-sizing: border-box;
}
.user-profile {
@@ -12,6 +14,9 @@
padding: 2rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border: 1px solid #e0e0e0;
width: 100%;
max-width: 100%;
box-sizing: border-box;
}
.user-profile h2 {
@@ -65,6 +70,10 @@
padding: 1.5rem;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
border: 1px solid #e0e0e0;
width: 100%;
box-sizing: border-box;
overflow-x: auto;
min-width: 0;
}
.user-form h3,
@@ -79,6 +88,8 @@
width: 100%;
border-collapse: collapse;
margin-top: 1rem;
table-layout: auto;
word-wrap: break-word;
}
.users-table th,
@@ -86,6 +97,10 @@
padding: 0.75rem;
text-align: left;
border-bottom: 1px solid #e0e0e0;
vertical-align: top;
word-wrap: break-word;
overflow-wrap: break-word;
line-height: 1.4;
}
.users-table th {
@@ -103,6 +118,10 @@
border-radius: 4px;
font-size: 0.8rem;
font-weight: 600;
display: inline-block;
text-align: center;
min-width: 50px;
line-height: 1.2;
}
.user-role.admin {
@@ -118,11 +137,19 @@
.user-actions {
display: flex;
gap: 0.5rem;
align-items: center;
justify-content: center;
}
.user-actions .btn {
padding: 0.25rem 0.5rem;
font-size: 0.8rem;
min-height: 32px;
display: inline-flex;
align-items: center;
justify-content: center;
line-height: 1.2;
white-space: nowrap;
}
.btn-danger {
@@ -176,16 +203,36 @@
@media (max-width: 768px) {
.users-admin-container {
grid-template-columns: 1fr;
gap: 1rem;
gap: 1.5rem;
width: 100%;
box-sizing: border-box;
}
.user-form,
.users-list {
width: 100%;
box-sizing: border-box;
padding: 1.25rem;
}
.users-table {
font-size: 0.9rem;
font-size: 0.85rem;
width: 100%;
table-layout: auto;
min-width: auto;
}
.users-table th,
.users-table td {
padding: 0.5rem;
padding: 0.6rem 0.4rem;
vertical-align: top;
word-wrap: break-word;
line-height: 1.3;
}
.users-table th {
font-size: 0.8rem;
padding: 0.7rem 0.4rem;
}
.user-container {
@@ -266,21 +313,83 @@
}
@media (max-width: 480px) {
.users-admin-container {
gap: 1rem;
margin-top: 0.5rem;
}
.user-form,
.users-list {
padding: 1rem;
}
.users-table {
font-size: 0.8rem;
width: 100%;
table-layout: fixed;
min-width: auto;
}
.users-table th,
.users-table td {
padding: 0.5rem 0.3rem;
line-height: 1.4;
word-wrap: break-word;
overflow-wrap: break-word;
}
/* Optimize column widths for small screens */
.users-table th:nth-child(1),
.users-table td:nth-child(1) { /* Email */
width: 35%;
}
.users-table th:nth-child(2),
.users-table td:nth-child(2) { /* Name */
width: 25%;
}
.users-table th:nth-child(3),
.users-table td:nth-child(3) { /* Role */
width: 20%;
}
.users-table th:nth-child(4),
.users-table td:nth-child(4) { /* Actions */
width: 20%;
}
.user-role {
font-size: 0.65rem;
padding: 0.2rem 0.4rem;
border-radius: 3px;
display: inline-block;
line-height: 1.2;
}
.user-actions {
flex-direction: column;
gap: 0.25rem;
gap: 0.3rem;
width: 100%;
}
.user-actions .btn {
font-size: 0.7rem;
padding: 0.4rem 0.6rem;
width: 100%;
text-align: center;
min-height: 32px;
line-height: 1.2;
}
.user-container {
padding: 0.5rem;
padding: 0.75rem;
}
.user-form h3,
.users-list h3 {
font-size: 1.1rem;
margin-bottom: 0.8rem;
}
/* Very small screen adjustments */
@@ -322,3 +431,16 @@
padding: 10px 16px;
}
}
/* User Page Specific Overrides */
body {
height: auto;
min-height: 100vh;
min-height: var(--app-height);
}
#app {
height: auto;
min-height: 100vh;
min-height: var(--app-height);
}