Skip to content

feat(footer): support progressive enhancement and server consumers - #185

Merged
dbarlag merged 4 commits into
mainfrom
feat/footer-html-baseline
Sep 28, 2026
Merged

dbarlag merged 4 commits into
mainfrom
feat/footer-html-baseline

Conversation

@dbarlag

@dbarlag dbarlag commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

Footer newsletter submission currently requires a client callback, has no native endpoint or named email field, and can lose text entered before hydration. Add an HTML form baseline so applications can offer newsletter signup without JavaScript and use Footer directly from Next.js server pages and layouts.

  • Add newsletterAction, newsletterMethod (POST by default) and newsletterInputName (email by default). Keep onNewsletterSubmit as an optional client enhancement. The application owns the endpoint and subscription response.
  • Preserve typed email and focus through hydration and rerenders. Keep callback-only forms disabled until hydration, and unconfigured forms disabled. Require a valid, non-empty email.
  • Remove duplicated runtime Footer CSS, guard motion and hover effects, allow root DOM props/refs, and keep the newsletter usable in narrow viewports.
  • Fix contact-link remounting during hydration. Add 60 browser checks across Chromium, Firefox and WebKit and a packed-library Next.js production consumer with server-only pages/layouts, server-rendered slot content and native form submission.
  • Document the API in the workbench and regenerate metadata/guide outputs. Install the required browsers in CI.

This PR targets main independently and contains no Header or Carousel implementation changes.

Validation on this branch:

  • Full suite: 154 files, 1,366 passed and 5 existing conditional tests skipped; all 60 Footer checks passed.
  • Lint, typecheck, token checks, package build and Storybook build passed. Generated artifacts are fresh.
  • Standards and requirements reviews found no remaining actionable issues after the contact-focus fix.
  • React 18.3/19 packaging and the isolated Next.js consumer pass with normal npm run test:packaging, using the explicitly reported dependency exception below. No date cutoff is needed.
  • Production dependency audit: zero vulnerabilities.

Consumer dependency exception: Aksel icons 8.17.1, published on 2026-09-25, omits compiled icon modules. Fresh consumer test apps apply a root npm override with the replacement range ^8.16.1 <8.17.1 || ^8.17.2, excluding the broken release while permitting compatible future fixes. The README documents the same workaround for affected consuming applications, including applications that depend on the icons directly. Test output reports the exception. Library dependency constraints and lockfiles are unchanged; root overrides do not propagate from a library to its consumers. This works around the upstream defect rather than claiming unrestricted installation succeeds.

The first Linux visual run passed 28/30 screenshots. The two Footer differences were reviewed: the unconfigured newsletter form is disabled and the placeholder unsubscribe link is plain text. Updated only those light/dark baselines using the Linux CI screenshots. CI checks all 30 screenshots against the updated baselines. Full manual screen-reader testing remains outstanding. Actual designportal and rodekors.no applications were not tested. Existing logo-policy documentation and guide-terminology conflicts are unchanged.

AlonaDushyn
AlonaDushyn previously approved these changes Sep 28, 2026
@dbarlag
dbarlag merged commit e027438 into main Sep 28, 2026
4 checks passed
@dbarlag
dbarlag deleted the feat/footer-html-baseline branch September 28, 2026 11:27
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.

2 participants