frontend
Technical notes on web development, DevOps, and AI integration.
173 articles
- 19:12frontend
5 Portals, 1 Commit: When a Design System Is Truly Data-Driven
One commit aligns 5 service portals with a data-driven design system — shared primitives, CMS-driven icons, color-mix accents, Server Components streaming, adaptive grid.
TL;DR: Five KotaPortal portals drifted into clashing heroes, card grids, and hardcoded icons despite sharing one component. Commit 788383b fixed this by extracting shared, data-driven primitives from the gateway page, so icons and tones now derive automatically from service data. Result: five portals, one accessible design language, zero drift.
#nextjs#design-system#server-components - 18:15frontend
Intro Panel Below Hero Slider: Component Order Changed by Owner
Changing component order in Next.js App Router: intro panel moved below HeroSlider following product owner directive. Data sections follow order, render streaming changes, but fetch stays on the same page.
TL;DR: Product owner moved KotaPortal's intro panel below the hero slider across three pillar pages, giving each a colored letterhead. The panel pulls its own settings data, so moving it changes render and streaming order even though fetches stay in one Promise.all. Client slider over server sections works fine in App Router; verify with tsc, tests, and a screenshot.
#nextjs#react#app-router - 12:45frontend
Shrinking a Sticky Admin Header from 180px to 70px
A sticky admin header sits 180px tall at 1440px. Two flex rows, a forced role-bar row, and meta ellipsis shrink it to 70px with no horizontal overflow.
TL;DR: A sticky header eating half the viewport is a layout problem, not a spacing one. Rebuilding it as two flex rows with a shared baseline, a truncated meta line, and a full-width role bar cut the height from 180px to about 70px. Measure the header in the DOM first, then trim padding and type after.
#css#sticky#flexbox - 11:52frontend
The Header That Would Not Reach the Edges
The “view as” bar scrolls away and the white header stops short of the column edges. The header had to leave the max-width wrapper, not its margin values.
TL;DR: The sticky manual header was fixed by moving it out of the content wrapper so it spans the full viewport width, using negative margins and matching padding to keep text aligned. The role bar now lives inside that sticky region so it stays reachable while scrolling. Sign-off blocks across three reports were unified into one definition.
#css#sticky#aria - 11:34frontend
Cluster Cards Without rowspan
A rowspan matrix breaks every time a row count changes. The cluster map moved to a two-column card grid: table names become chips, ERD arrows become a legend.
TL;DR: A three-column matrix kept misaligning because the container forced fixed row counts onto uneven cluster data. Switching to a two-column card grid with flex-wrap chips, plus grouped banded table rows instead of merged cells, fixed the drift in both the overview and the inventory. Before recalculating a layout that keeps shifting, check whether the container's shape actually matches the data.
#css#grid#layout - 07:42frontend
Per-Diagram Default Zoom, Stored in a Data Attribute
Each diagram carries its initial zoom in a data-zoom attribute; a generic toolbar reads it once at init, no per-diagram branches.
TL;DR: A module map SVG kept loading at 100% zoom, forcing manual resizing, but a shared 50% default would break other drawings. The fix: the generator emits a data-zoom attribute per diagram, and the toolbar reads it to apply the right scale and width. This keeps content-specific defaults in the generator, not shared code, and extends to other initial states.
#mermaid#javascript#css - 06:06frontend
Blank Boxes in an Offline Manual: Vendoring Mermaid, Adding Zoom
Manual diagrams opened via file:// came up blank because mermaid loaded from a CDN. The fix: vendor mermaid 11 locally plus a 50-300 percent zoom toolbar.
TL;DR: The manual's diagrams silently failed offline because Mermaid loaded from a CDN. The fix bundles Mermaid 11 locally, consolidates configuration into one site-level initialize call, and rewrites all nine diagrams as plain-text pre.mermaid blocks with a theme observer for re-rendering. A zoom toolbar (50–300 percent) with pan support makes wide diagrams readable, while PDF export keeps vector art.
#mermaid#javascript#css - 05:52frontend
Architecture Diagrams Move to HTML and CSS, Theming Comes Free
Ten architecture diagrams rebuilt from image files into pure HTML+CSS: diffable, searchable, and theme-aware through CSS custom properties.
TL;DR: After dark mode migration, ten diagram images couldn't be diffed or searched, since PNGs are binary and SVG exports rewrite element order. Converting formats didn't help; the real issue was rendering structured data as images, so the diagrams were rebuilt as HTML and CSS using custom properties for theming. PDFs keep vector art; spatial swimlanes remain images with alt text.
#css#html#diagram - 05:39frontend
Styling Generator Tables That Have No thead
Report tables emitted as bare tr>th rows never match a thead th selector. The diagnosis runs on computed style, and one dual-form rule fixes it.
TL;DR: Table headers across 30 KotaPortal tables rendered as plain text because the generator emitted rows without a thead wrapper, so the header selector never matched anything. The fix added dual selectors covering both canonical and bare markup shapes, keeping the generator untouched. Lesson learned: inspect the emitted DOM first, since a non-matching selector fails silently regardless of the cascade.
#css#html#selector