From 0b59096162b8a06880e18c02f5d6db3fd3f0683c Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 20:54:58 -0400 Subject: [PATCH 1/3] Ignore local responsive screenshots. The before and after captures stay on disk for review and are not part of the app. --- frontend/.gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/frontend/.gitignore b/frontend/.gitignore index cc7b141..771a7bd 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -40,3 +40,6 @@ testem.log # System files .DS_Store Thumbs.db + +# Local responsive audit screenshots (before/after). Not part of the app. +/responsive-screenshots From 8d80a9eaa1e172f002aca3ffcba320181c7be7fa Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 20:54:58 -0400 Subject: [PATCH 2/3] Reflow CRM screens from phone through desktop. Keep the current look, and let the header, tables, forms, and timeline wrap instead of overflowing at phone widths and 200% zoom. --- frontend/src/app/app.component.css | 43 ++++- .../customers/customer-form-page.component.ts | 10 +- .../customer-lookup-page.component.html | 26 +-- .../customers/customer-pages.component.css | 42 ++--- .../interaction-list-page.component.css | 43 +++-- .../features/login/login-page.component.css | 23 ++- frontend/src/styles.css | 176 +++++++++++++++++- 7 files changed, 285 insertions(+), 78 deletions(-) diff --git a/frontend/src/app/app.component.css b/frontend/src/app/app.component.css index 4dc4ff0..da12b81 100644 --- a/frontend/src/app/app.component.css +++ b/frontend/src/app/app.component.css @@ -1,25 +1,31 @@ header { display: flex; + flex-wrap: wrap; align-items: center; justify-content: space-between; - gap: 1rem; - padding: 1rem max(1.25rem, calc((100% - 1100px) / 2)); + gap: 0.75rem 1.25rem; + padding: 0.75rem max(var(--page-gutter), calc((100% - 1100px) / 2)); border-bottom: 1px solid #dce3ec; background: #fff; } .brand { + flex: 0 0 auto; color: #142b49; font-size: 1.15rem; font-weight: 700; + white-space: nowrap; text-decoration: none; } header nav { display: flex; - align-items: center; + flex: 1 1 28rem; flex-wrap: wrap; - gap: 1rem; + align-items: center; + justify-content: flex-end; + gap: 0.25rem 1rem; + min-width: min(100%, 18rem); } header nav a { @@ -28,8 +34,12 @@ header nav a { text-decoration: none; } +header nav span { + overflow-wrap: anywhere; +} + main { - padding: 0 1.25rem; + padding-inline: var(--page-gutter); } button { @@ -46,3 +56,26 @@ button { button:hover { background: #f3f6fa; } + +@media (max-width: 64rem) { + header { + align-items: flex-start; + } + + .brand, + header nav a { + display: inline-flex; + align-items: center; + min-height: var(--tap-min); + } + + header nav a { + padding-inline: 0.2rem; + } +} + +@media (max-width: 40rem) { + header nav { + justify-content: flex-start; + } +} diff --git a/frontend/src/app/features/customers/customer-form-page.component.ts b/frontend/src/app/features/customers/customer-form-page.component.ts index 5f317c3..15ba588 100644 --- a/frontend/src/app/features/customers/customer-form-page.component.ts +++ b/frontend/src/app/features/customers/customer-form-page.component.ts @@ -30,13 +30,9 @@ import { CustomerStatus } from './customer.model'; } @else {
- +

+ {{ customerId || 'Assigned automatically when created' }} +

This ID is assigned by the system and cannot be changed. diff --git a/frontend/src/app/features/customers/customer-lookup-page.component.html b/frontend/src/app/features/customers/customer-lookup-page.component.html index dc46ebd..b94cc87 100644 --- a/frontend/src/app/features/customers/customer-lookup-page.component.html +++ b/frontend/src/app/features/customers/customer-lookup-page.component.html @@ -41,22 +41,22 @@

Look up a customer

No customers match this search and status.

} @else {
- - - - - - - +
Customer IDCustomer nameStatusActions
+ + + + + + - + @for (customer of visibleCustomers(); track customer.customerId) { - - - - - + + + + diff --git a/frontend/src/app/features/customers/customer-pages.component.css b/frontend/src/app/features/customers/customer-pages.component.css index b75be68..d3571cb 100644 --- a/frontend/src/app/features/customers/customer-pages.component.css +++ b/frontend/src/app/features/customers/customer-pages.component.css @@ -1,12 +1,12 @@ :host { display: block; - max-width: 1000px; + max-width: var(--content-max); margin: 2rem auto; - padding: 0 1.25rem; + padding-inline: var(--page-gutter); } .page-card { - padding: 2rem; + padding: var(--card-padding); border: 1px solid #dce3ec; border-radius: 16px; background: #fff; @@ -42,13 +42,14 @@ h2 { .choice-grid { display: grid; - grid-template-columns: repeat(3, minmax(0, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin-top: 2rem; } .choice-card { display: flex; + min-width: 0; min-height: 220px; flex-direction: column; padding: 1.25rem; @@ -96,11 +97,17 @@ h2 { .page-heading, .filters { display: flex; + flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; } +.page-heading > div { + flex: 1 1 16rem; + min-width: 0; +} + .page-heading { margin-bottom: 1.5rem; } @@ -128,7 +135,7 @@ h2 { } select { - min-width: 180px; + min-width: min(100%, 11.25rem); padding: 0.65rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 8px; @@ -317,28 +324,3 @@ button:disabled { background: #e6f5ed; color: #17653b; } -@media (max-width: 720px) { - .choice-grid { - grid-template-columns: 1fr; - } - - .choice-card { - min-height: auto; - } -} - -@media (max-width: 520px) { - .page-card { - padding: 1.25rem; - } - - .page-heading, - .filters { - align-items: stretch; - flex-direction: column; - } - - select { - width: 100%; - } -} diff --git a/frontend/src/app/features/interactions/interaction-list-page.component.css b/frontend/src/app/features/interactions/interaction-list-page.component.css index 3c182df..4c02d8f 100644 --- a/frontend/src/app/features/interactions/interaction-list-page.component.css +++ b/frontend/src/app/features/interactions/interaction-list-page.component.css @@ -1,12 +1,12 @@ :host { display: block; - max-width: 900px; + max-width: 56.25rem; margin: 2rem auto; - padding: 0 1.25rem; + padding-inline: var(--page-gutter); } .interactions { - padding: 2rem; + padding: var(--card-padding); border: 1px solid #dce3ec; border-radius: 16px; background: #fff; @@ -17,9 +17,17 @@ .activity-heading, .entry-controls { display: flex; + flex-wrap: wrap; align-items: center; justify-content: space-between; - gap: 1rem; + gap: 0.75rem 1rem; +} + +.page-heading > div, +.customer { + flex: 1 1 18rem; + min-width: 0; + max-width: 100%; } .page-heading { @@ -51,6 +59,7 @@ h2 { time { color: #536987; font-size: 0.875rem; + overflow-wrap: anywhere; } code { @@ -84,6 +93,7 @@ code { input { width: 100%; min-width: 0; + flex: 1 1 14rem; padding: 0.75rem 0.85rem; border: 1px solid #cbd5e1; border-radius: 8px; @@ -128,6 +138,7 @@ button:hover { grid-template-columns: 6rem minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; + min-width: 0; padding: 0.9rem 1rem; border: 1px solid #e5eaf0; border-radius: 10px; @@ -168,7 +179,7 @@ button:hover { .interaction-facts { display: grid; - grid-template-columns: minmax(120px, 0.35fr) 1fr; + grid-template-columns: minmax(7.5rem, 0.35fr) minmax(0, 1fr); gap: 0.7rem 1rem; margin: 1.5rem 0; } @@ -206,7 +217,9 @@ button:hover { } .summary { + min-width: 0; color: #253b57; + overflow-wrap: anywhere; } .empty-state { @@ -227,7 +240,9 @@ button:hover { .page-actions { display: flex; + flex-wrap: wrap; justify-content: flex-end; + gap: 0.75rem; margin-top: 1.5rem; } @@ -246,20 +261,26 @@ button:hover { background: #f3f6fa; } -@media (max-width: 600px) { - .interactions { - padding: 1.25rem; +@media (max-width: 48rem) { + .activity-list li { + grid-template-columns: 1fr; + gap: 0.35rem; } +} +@media (max-width: 40rem) { .page-heading, .entry-controls { align-items: stretch; flex-direction: column; } - .activity-list li { - grid-template-columns: 1fr; - gap: 0.35rem; + .page-heading > div, + .customer, + .entry-controls input, + .entry-controls button { + flex: 0 1 auto; + width: 100%; } } diff --git a/frontend/src/app/features/login/login-page.component.css b/frontend/src/app/features/login/login-page.component.css index c632b45..3462ab7 100644 --- a/frontend/src/app/features/login/login-page.component.css +++ b/frontend/src/app/features/login/login-page.component.css @@ -1,8 +1,8 @@ :host { display: block; - max-width: 440px; + max-width: 27.5rem; margin: 5rem auto; - padding: 0 1.25rem; + padding-inline: var(--page-gutter); } /* .login-card { @@ -94,16 +94,19 @@ button:disabled { } .password-field input { - padding-right: 4.5rem; + min-height: 3rem; + padding-right: 5.25rem; } .password-field .password-toggle { position: absolute; top: 50%; - right: 0.4rem; + right: 0.35rem; width: auto; + min-width: var(--tap-min); + min-height: var(--tap-min); margin: 0; - padding: 0.35rem 0.65rem; + padding: 0.35rem 0.75rem; transform: translateY(-50%); border-radius: 6px; background: transparent; @@ -126,3 +129,13 @@ button:disabled { background: #fff0ef; color: #a32922; } + +@media (max-width: 40rem) { + :host { + margin-block: 1.25rem; + } + + .login-card { + padding: var(--card-padding); + } +} diff --git a/frontend/src/styles.css b/frontend/src/styles.css index 620a072..d966801 100644 --- a/frontend/src/styles.css +++ b/frontend/src/styles.css @@ -1,3 +1,27 @@ +/* + Shared layout tokens. Media queries cannot read custom properties, so the + same widths are repeated in component styles: + --bp-narrow 40rem (640px) phone and 200% zoom on a laptop + --bp-tablet 48rem (768px) tablet portrait + --bp-laptop 64rem (1024px) tablet landscape / small laptop +*/ +:root { + --page-gutter: 1.25rem; + --card-padding: 2rem; + --tap-min: 2.75rem; + --bp-narrow: 40rem; + --bp-tablet: 48rem; + --bp-laptop: 64rem; + --content-max: 62.5rem; +} + +@media (max-width: 40rem) { + :root { + --page-gutter: 0.75rem; + --card-padding: 1.25rem; + } +} + body { margin: 0; font-family: system-ui, sans-serif; @@ -9,16 +33,37 @@ body { box-sizing: border-box; } -.customer-search { - align-items: end; +button, +input, +select, +textarea { + min-height: var(--tap-min); + max-width: 100%; } -.customer-search label { - align-self: center; +code, +dd { + overflow-wrap: anywhere; +} + +.readonly-value { + margin: 0; + padding: 0.75rem 0.85rem; + border: 1px solid #cbd5e1; + border-radius: 8px; + background: #f3f6fa; + color: #536987; + overflow-wrap: anywhere; +} + +.customer-search { + align-items: end; } .customer-search input { - min-width: 220px; + flex: 1 1 12rem; + width: auto; + min-width: 0; padding: 0.65rem 0.75rem; border: 1px solid #cbd5e1; border-radius: 8px; @@ -28,12 +73,14 @@ body { .customer-actions { display: flex; - gap: 1rem; + flex-wrap: nowrap; + align-items: center; + gap: 0.75rem; } .profile-facts { display: grid; - grid-template-columns: minmax(130px, 0.35fr) 1fr; + grid-template-columns: minmax(7.5rem, 0.35fr) minmax(0, 1fr); gap: 0.8rem 1rem; margin: 1.5rem 0; } @@ -52,3 +99,118 @@ body { flex-wrap: wrap; gap: 0.75rem; } + +@media (max-width: 64rem) { + a.table-action, + .profile-actions a, + .row-actions a { + display: inline-flex; + align-items: center; + min-height: var(--tap-min); + } +} + +body > canvas { + max-width: 100%; + pointer-events: none; +} + +@media (max-width: 48rem) { + .customer-search label { + flex: 1 0 100%; + } +} + +@media (max-width: 40rem) { + .page-card .choice-grid .choice-card { + min-height: auto; + } + + .page-card > .page-heading, + .page-card > .filters, + .page-card > form.filters { + align-items: stretch; + flex-direction: column; + } + + .page-heading > div, + .customer-search input, + .customer-search button { + flex: 0 1 auto; + width: 100%; + } + + .page-card .filters label, + .page-card select { + width: 100%; + max-width: none; + } + + .page-card .table-wrap { + overflow: visible; + } + + .page-card table, + .page-card tbody, + .page-card tr, + .page-card td { + display: block; + } + + .page-card thead, + .page-card thead tr, + .page-card thead th { + display: block; + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip-path: inset(50%); + white-space: nowrap; + border: 0; + } + + .page-card tr { + margin-bottom: 0.75rem; + padding-block: 0.35rem; + border: 1px solid #e5eaf0; + border-radius: 10px; + } + + .page-card td { + display: grid; + grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr); + gap: 0.5rem 0.75rem; + align-items: center; + justify-items: start; + border: 0; + padding: 0.45rem 0.85rem; + overflow-wrap: break-word; + } + + .page-card td .status { + width: fit-content; + max-width: 100%; + } + + .page-card td::before { + content: attr(data-label); + color: #536987; + font-size: 0.75rem; + font-weight: 700; + letter-spacing: 0.04em; + text-transform: uppercase; + } + + .page-card td.customer-actions { + display: flex; + flex-wrap: wrap; + align-items: center; + } + + .page-card td.customer-actions::before { + margin-inline-end: auto; + } +} From 946797d6e56dd5f0d19773caedc3c598496f8a1c Mon Sep 17 00:00:00 2001 From: Will Date: Wed, 21 Oct 2026 20:54:58 -0400 Subject: [PATCH 3/3] Document the responsive layout checks. Record the widths, breakpoints, page changes, and the leftover tight spots. --- docs/responsive-ui.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docs/responsive-ui.md diff --git a/docs/responsive-ui.md b/docs/responsive-ui.md new file mode 100644 index 0000000..a07add2 --- /dev/null +++ b/docs/responsive-ui.md @@ -0,0 +1,9 @@ +# Responsive layout + +The Angular UI was checked in headless Chrome, signed in as `agent`, at 360, 414, 768, 1024, 1280, 1440, and 1920 CSS pixels, plus phone landscape (740×360 and 896×414), tablet portrait and landscape, and a 640px-wide viewport standing in for 200% browser zoom on a 1280px laptop. Colors, type, copy, routes, and `data-testid` values are unchanged. + +Shared tokens live in `frontend/src/styles.css`: `--page-gutter`, `--card-padding`, `--tap-min` (2.75rem), and `--content-max` (62.5rem). Media queries repeat three widths because they cannot read variables: 40rem (640px), 48rem (768px), and 64rem (1024px). Below 40rem the page gutter and card padding shrink. Below 64rem, nav links, profile links, and table actions are at least 44px tall. Buttons and fields are at least 44px at every width. + +The header keeps “Northstar CRM” on one line and lets the nav wrap under it on a phone. Home choice cards use `repeat(auto-fit, minmax(min(100%, 17rem), 1fr))`, so a phone shows one column, a 768px tablet shows two, and a laptop shows the original three. Customer lookup keeps the table from 640px up. Below that, each row is a stacked card with the same Profile and Edit links. The create form shows the public-ID sentence in a wrapping field instead of a single-line input that was clipping it. Interaction headings and timeline rows wrap instead of overlapping around 640px, and rows stack below 768px. Login’s show/hide control is a 44px target. The viewport meta tag was already `width=device-width, initial-scale=1`. + +Still not ideal: above 1024px the nav stays the original compact text so a projector view matches the old header. At 768px the third home card sits alone on the next row, and the interaction timeline stacks each field rather than keeping one tight row. A 360px header wraps Log out onto its own line. Wide screens stay centered (1000px, 900px, and 440px) instead of stretching to 1920px. Screenshots are in `frontend/responsive-screenshots/` and are gitignored.
Customer IDCustomer nameStatusActions
{{ customer.customerId }}{{ customer.fullName }}{{ customer.status }} +
{{ customer.customerId }}{{ customer.fullName }}{{ customer.status }} Profile Edit