Skip to content

[Product Homepage Design] Implementation - #150

Open
yetone wants to merge 21 commits into
masterfrom
feature/product-homepage-design-ow0h-7acb2e6
Open

[Product Homepage Design] Implementation#150
yetone wants to merge 21 commits into
masterfrom
feature/product-homepage-design-ow0h-7acb2e6

Conversation

@yetone

@yetone yetone commented May 16, 2026

Copy link
Copy Markdown
Owner

Summary

This PR implements the requirements for Product Homepage Design.


Generated by Something

Yansu added 21 commits May 16, 2026 03:29
Sets up the static homepage skeleton (index.html, base CSS, JS loader, test
harness) and implements the primary Sign-Up call-to-action: an anchor at
/register with accessible labeling, focus-visible styling, telemetry on
click, optional pushState SPA navigation, and a no-JS anchor fallback.

Vitest + jsdom unit/integration suite for cta-signup added; 8 tests pass.
Implement Scenario 2 — Features Section Renders 3 to 5 Cards.

* features.data.js: exports 4 MirDB-themed features (speed,
  durability, protocol, rust) with id, icon, title, description.
* features.html: semantic section with H2 heading and empty
  .features__grid UL for JS injection.
* features.css: responsive grid (1→2→3 columns) with card
  hover/focus states, icon wrapper, and CSS custom property
  fallbacks.
* features.js: renderFeatures() builds <li class="feature-card">
  elements; dedupeFeatures() warns on duplicate ids.
* features.test.js: 10 Vitest cases covering data shape, DOM
  render structure, duplicate-id handling, and CSS grid
  declaration.
* index.html + main.js: wire up features.css link and
  renderFeatures() bootstrap.
- Add cta-login HTML, CSS, and JS component files
- Implement attachLoginHandler with SPA navigation and telemetry
- Add comprehensive unit, integration, and visual hierarchy tests
- Wire component into main.js and index.html placeholders
…hamburger menu

- Add navigation component (HTML, CSS, JS) with sticky header
- Implement mobile hamburger toggle with aria-expanded support
- Add keyboard (Escape) and outside-click handlers for accessibility
- Integrate navigation into main.js and index.html
- Add comprehensive unit and e2e-like tests
Implements PRD REQ-6: mobile-first responsive layout with breakpoints at
600px (tablet) and 1024px (desktop). Defines grid-template-columns for
.features__grid (1 -> 2 -> 3 columns) and toggles .site-header__burger
versus inline #primary-nav around the 1024px boundary.

Adds tests/responsive/responsive.test.js covering all six PRD test cases
including viewport resize re-flow without JS errors.
…ow0h-7acb2e6' into feature/product-homepage-design-ow0h-7acb2e6
- Implement theme-toggle component (HTML, CSS, JS) with sun/moon icons
- Add CSS custom properties for light and dark themes in theme.css
- Honor prefers-color-scheme on first paint via CSS media query
- Persist user theme choice in localStorage
- Handle invalid/corrupt localStorage values gracefully
- Support keyboard navigation (Enter/Space) with mouse-click parity
- Add aria-pressed state and aria-label for accessibility
- Integrate theme toggle into main.js bootstrap flow
- Add 18 comprehensive unit/integration tests
Renders testimonials, badges, and a user-count line when populated, and
gracefully hides the section via the [hidden] attribute when the supplied
data is fully empty (PRD REQ-8). Badges fall back to a default alt when
missing alt text and emit a console.warn, so trust imagery stays
accessible. Dark-mode styling is provided via both prefers-color-scheme
and [data-theme="dark"] selectors so the section keeps WCAG-grade
contrast regardless of theme.
Validates homepage performance characteristics that drive Lighthouse
score >= 0.9 and sub-2-second page load (PRD REQ-11, NFR-4):
  - Page-weight budget under 200 KB raw / 30 KB critical CSS
  - <head> has no synchronous render-blocking scripts
  - meta description / charset / viewport / <html lang> declared
  - every <img> declares a loading attribute
  - below-the-fold images use loading="lazy"
  - <link rel="stylesheet"> tag count is bounded and same-origin

Validation-only scenario per scaffold.md rule 4: no source files outside
homepage/tests/performance/ are modified.
…ow0h-7acb2e6' into feature/product-homepage-design-ow0h-7acb2e6
- Expand homepage/css/accessibility.css with a focus-visible safety-net
  outline, a visible-on-focus skip-link, and a prefers-reduced-motion
  override that zeroes animation/transition durations globally.
- Add a "Skip to main content" link as the first focusable element in
  index.html and an id="main" + tabindex="-1" target on <main> so the
  link can move focus into the primary landmark (WCAG 2.4.1).
- Provide a visually-hidden <h1> in <main> so the page has exactly one
  H1 even before the (future) hero component ships.
- Add tests/accessibility/accessibility.test.js running axe-core in
  vitest+jsdom across light and dark themes, plus structural assertions
  for heading hierarchy, focus order, skip-link behaviour, reduced-motion
  CSS contract, and image alt-text coverage.
- Add axe-core@^4.11.4 as a devDependency.
…irefox)

Scenario 12: validates the homepage's NFR-2 cross-browser contract
across Chromium (Chrome+Edge), WebKit (Safari), and Firefox engines.

- Configure Playwright with three browser projects + http-server boot
- Add self-contained fixture page that mounts the real cta-signup,
  cta-login, and theme-toggle components for engine-parity tests
- Smoke flow per engine: hero renders, sign-up CTA routes to /register,
  no console / page errors
- Theme toggle parity: dataset.theme flips and persists via localStorage
  in every engine, surviving a reload
- Visual diff per engine with 2% pixel-ratio tolerance and baseline
  snapshots checked in
- Exclude tests/cross-browser/** from the Vitest runner so the two test
  frameworks coexist
…ow0h-7acb2e6' into feature/product-homepage-design-ow0h-7acb2e6
- main.js: invoke renderSocialProof with SOCIAL_PROOF_DATA after components load
- social-proof.data.js: align badge paths with scaffold convention
  (images/social-proof/ per rule 7) and ship real SVG trust badges
- preview.html: standalone demo page toggling populated / empty / theme

Completes Scenario 9 (PRD REQ-8) and provides assets needed for the
e2e/recording flow.
Adds an axe-core based WCAG 2.1 A/AA audit suite for the social-proof
section, translating Scenario 9's Playwright e2e (TC 4) into the
existing vitest+jsdom pipeline. The block:

  - asserts the section is visible (no [hidden]) in dark mode when
    populated with default data
  - runs axe.run on the rendered DOM with wcag2a + wcag2aa rules
    enabled, color-contrast and target-size disabled (jsdom has no
    layout, per the axe-jsdom-homepage-audit playbook)
  - covers both data-theme="dark" and data-theme="light"
  - asserts the :root[data-theme="dark"] .social-proof selector
    exists in source CSS so the theme contract holds even though
    jsdom cannot compute contrast at runtime
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant