Skip to content

feat(ui): shared Green Button Alliance theme and Third Party layout (prototype) - #244

Merged
dfcoffin merged 2 commits into
mainfrom
feat/gba-theme-prototype
Nov 14, 2026
Merged

dfcoffin merged 2 commits into
mainfrom
feat/gba-theme-prototype

Conversation

@dfcoffin

@dfcoffin dfcoffin commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Prototype of the shared Green Button Alliance look for the Data Custodian and Third Party, based on a side-by-side review against greenbuttonalliance.org. Stacked on #242 (copyright notices); GitHub retargets it to main when #242 merges.

Shared theme: openespi-common/src/main/resources/META-INF/resources/css/gba-theme.css

Served by Spring Boot at /css/gba-theme.css in each app. Unlike the jar's application.properties, a static file cannot override an app's settings.

  • Palette from the GBA site: dark green #2C4C3B (chrome, card headers), #3F6C54 (links), orange #F99742 (rules and accent borders only), blue #005B96 (section titles), slate #264653 (TP hero, DC admin portal), text #333 on #F8F8F8.
  • Type and shape: Roboto 400/500/700, square corners, 2 px outlined buttons, white cards with a solid green header strip.
  • Header: as on greenbuttonalliance.org, a dark-green top bar (slate for the DC custodian portal), a white band with the official GBA logo and green navigation links, and an orange rule. The logo and its ™ mark need the white background to stay legible.
  • Footer: dark green with an orange rule, and links to greenbuttonalliance.org, the API docs and the source.
  • Logo and favicon: META-INF/resources/images/gba-logo.png (120 px, 2× for 60 px display, 17 KB) and gba-favicon.png (64 px), resized from the logo on greenbuttonalliance.org. They are used with the GBA Technical Manager's authorization. Both apps now have a favicon.
  • Bootstrap 5.3 variables and the DC's existing --gb-* tokens are remapped, so pages adopt the theme without markup changes.
  • Contrast (WCAG): white on green 9.5:1, white on slate 10.1:1. Orange (2.2:1 on white) is never used for text.

Third Party

Data Custodian

  • The theme and Roboto load in the shared head. The GBA header is on the main and customer navbars, a slate variant on the custodian (admin) portal, and the GBA footer is used throughout.
  • The home page cards use the GBA card style.
  • Fixes the custodian dashboard hero: it was dark text on the new dark background (1.6:1); it is now white on slate (10.1:1).
  • Duplicate Bootstrap JS removed from 4 pages; layout :: head already loads it, and double-loading breaks dropdowns.
  • /css/** also serves the theme from the common jar, because @EnableWebMvc disables Boot's default static mappings.

Build fix: binary resources were never packaged (root pom.xml)

The root <resources> entry only included filtered text types (yml, properties, xml, sql, html, js, css), so every other resource was silently dropped from the jars:

  • the 4 ESPI XSDs in openespi-common/schema/ (the certification validation target);
  • the DC favicon, which always 404ed;
  • the new logo.

A second, unfiltered <resource> now copies everything else as-is, and *.disabled files stay out. Verified: the PNGs and XSDs are in the common jar, the logo is byte-identical (no filtering corruption), and the AS/TP jars contain no .disabled files. Nothing loads the XSDs at runtime today, so packaging them changes no behaviour.

Both apps

Bootstrap CSS/JS and Bootstrap Icons are pinned with SRI integrity hashes, computed from the CDN files (they match Bootstrap's published 5.3.0 values).

Not in this prototype (follow-ups)

  • The DC admin dashboard's action buttons still use Bootstrap's mixed colours (green/cyan/red/yellow) from the template itself; the other custodian pages need the same per-page pass.
  • DC templates put the footer inside the page .container; the theme makes it full-width with CSS. Moving it out in the 20 templates is the cleaner fix.

Test plan

  • mvn install -DskipTests for the full reactor; mvn verify DC: 172 tests pass; TP: 44 pass (2 skipped, pre-existing)
  • Logo and favicon served (200) under /DataCustodian/images/ and /ThirdParty/images/; the old DC favicon now serves too
  • Live on the local profile: theme served at /DataCustodian/css/gba-theme.css and /ThirdParty/css/gba-theme.css (200); TP /, /login, /TermsOfService, /UsagePolicy → 200 anonymously
  • Screenshots checked: DC home, DC custodian dashboard (logged in), TP home at 1366 px and 390 px (no horizontal scroll at either width)

🤖 Generated with Claude Code

Base automatically changed from chore/copyright-2026 to main November 14, 2026 18:00
dfcoffin and others added 2 commits November 14, 2026 13:00
…ut (prototype)

Prototype that makes the Data Custodian and Third Party look like part of
greenbuttonalliance.org.

- openespi-common ships META-INF/resources/css/gba-theme.css (served at
  /css/gba-theme.css in each app). Static resources cannot override
  application settings the way the jar's application.properties did. GBA
  palette (#2C4C3B, #3F6C54, #F99742, #005B96, #264653), Roboto, square
  outlined buttons, solid green card headers, dark-green header and footer
  with an orange rule. Bootstrap 5.3 variables plus the DC's --gb-* tokens are
  remapped, so existing pages adopt it without markup changes.
- Third Party: new fragments/layout.html (head, header, footer). All five pages
  use it, all links are context-relative (th:href), and the footer year is
  computed. Terms of Service, Usage Policy and /error are now public, because
  the navbar links to them.
- Data Custodian: theme and Roboto in the shared head; GBA header on the main,
  customer and custodian navbars (slate for the admin portal); GBA footer; home
  cards use the GBA card style; the custodian hero is now readable; duplicate
  Bootstrap JS removed from 4 pages; /css/** also serves the theme from the
  common jar (@EnableWebMvc disables Boot's default static mappings).
- Bootstrap CSS/JS and Bootstrap Icons are pinned with SRI hashes, computed
  from the CDN files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sources

- Official Green Button Alliance logo (from greenbuttonalliance.org, used with
  the GBA Technical Manager's authorization) in openespi-common
  META-INF/resources/images: a 120 px header logo (2x for 60 px) and a 64 px
  favicon for both apps.
- Header now follows greenbuttonalliance.org: dark-green top bar (slate for
  the DC custodian portal), white band with the logo and green navigation
  links, orange rule. The logo and its TM mark need the white background.
- Root pom: add an unfiltered <resource> for everything the filtered include
  list skipped. Until now no binary resource was packaged: the 4 ESPI XSDs in
  openespi-common, the DC favicon (it 404ed) and the new logo. *.disabled files
  stay excluded.
- DC /images/** also serves META-INF/resources/images (as /css/** does).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dfcoffin
dfcoffin force-pushed the feat/gba-theme-prototype branch from 1cd2ca1 to 761ccdf Compare November 14, 2026 18:00
@dfcoffin
dfcoffin merged commit 5a2707a into main Nov 14, 2026
11 checks passed
@dfcoffin
dfcoffin deleted the feat/gba-theme-prototype branch November 14, 2026 18:07
dfcoffin added a commit that referenced this pull request Nov 14, 2026
#246)

Follow-up to #244.

- Data Custodian admin dashboard: GBA-green action buttons and icons (the
  rainbow btn-success/info/danger/warning are gone) and white "stat" tiles in
  place of the coloured cards. Login icons and the error pages' "Try Again"
  button use the palette; the error icon size moves from inline styles to a
  theme class. Semantic colours stay: status badges, Delete/Revoke, warning
  and danger error icons, neutral Cancel/Go Back.
- Footer moved out of the page container in 18 templates (and the leftover
  <hr> separators removed), so it is a full-width child of <body> pinned to the
  bottom of short pages. The two legacy customer pages (#245) are untouched;
  the theme keeps a full-bleed rule for them until #245.
- application.css reduced to the rules still used that the theme does not
  cover (table header, focus outline, print). The old Material palette, radii,
  hover lifts, gradients and light footer were fighting the theme, so the
  theme drops most of its !important overrides and the --gb-* bridge.
- Theme: white inputs and tables (Bootstrap fills them with the grey body
  colour), stat-tile and status-icon classes, page content grows so the
  footer sits at the bottom.
- Retail customers list: the Delete button is btn-sm like View/Edit
  (btn-group-sm does not reach a button nested in a form).
- Tests: GbaThemeResourcesTest (DC) and GbaLayoutPagesTest (TP, the first TP
  test with a full Spring context) check that the theme, logo and favicons are
  served anonymously (the logo byte-for-byte, so resource filtering cannot
  corrupt it), that pages render the GBA layout with SRI-pinned assets, and
  that the TP public pages are reachable without login.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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