Skip to content

feat(banner): rework the site banner and make the public pages consistent - #367

Merged
yasinmiran merged 10 commits into
mainfrom
fix/site-consistency
Nov 17, 2026
Merged

yasinmiran merged 10 commits into
mainfrom
fix/site-consistency

Conversation

@yasinmiran

@yasinmiran yasinmiran commented Nov 17, 2026 •

Copy link
Copy Markdown
Collaborator

What

Two things that touch how the site looks and behaves everywhere, kept apart from the workshop content in #368.

Site banner rework

banner.json gets three optional keys next to visible and message:

Key What it does
label Short tag before the message, for example "Event"
link { label, href }, shown as a button
expires The moment the banner hides itself, as an ISO date with a time zone

The deadline is checked at build time and again in the browser on every visit. GitHub Pages only rebuilds on push, so without the second check an expired banner would stay up until the next deploy.

Other changes:

  • Full width, in the ELIXIR navy in both themes, with the close button at the right edge and a 44px target on phones.
  • The megaphone icon pulsed forever, which WCAG 2.2.2 doesn't allow without a pause control. It's gone.
  • Dismissing used to hide every future banner for the rest of the tab's life. It now hides that one announcement, so a new or edited one shows again.
  • The message was injected as raw HTML. It is now escaped first, and a markdown link whose target fails the same rules as site.json links (javascript:, //host, plain http) renders as text.
  • The banner is left out of the Pagefind index, so its words do not match every page in search.
  • src/lib/banner.ts holds a strict schema, so a misspelt key or an unreadable deadline fails the build instead of shipping a banner that never ends.
  • The admin editor has fields for the label, link and deadline, validates with the same schema before it lets you publish, saves keys in one order and previews the real look.

banner.json is untouched here, so merging this shows no banner. #368 switches it on.

Consistency fixes across the site

I went through the public pages looking for places where one page does the same job differently from the rest. Each of these was checked against the rest of the site before I changed it.

Wrong, not only inconsistent

  • /about/everyone looked organisations up by the wrong key, so the lookup never matched. The quick links read "UIB" where the rest of the site says "UiB", and each university's logo, node name and "View node" link never rendered. They do now, so that page gains visible elements.
  • The About page said "70+ researchers" while the people page counts 65 from people.json. Both now count.
  • On the node pages, a person without a profile page got a link with no target. They now get a plain card, as on the people page.
  • Card summaries on the news, events, services and funding pages showed a further line of text after their ellipsis on wide screens. They now stop at the ellipsis.
  • On /news, a year and a topic can match nothing, which left a blank grid. It now says "No articles match the selected filters", as the funding page does.

Wording and dates

  • Article and event pages printed "December 9, 2026" while every card linking to them printed "9 December 2026". Day first everywhere now.
  • Eight hard-coded headings and labels were in title case ("Latest News", "Our People", "Get in Touch") where the rest of the site uses sentence case.
  • The remaining dashes in hard-coded copy and meta descriptions are replaced, and two About pages no longer append the site name to their title by hand (the layout already does).
  • Training's lists are now "Upcoming training events" and "Past training events".

Accessibility

  • Links inside the Training page's text blocks were navy with no underline in body text, so only colour set them apart. They are underlined now, like article links.
  • Site focus ring on the training resource cards, the footer links, the hero tagline and the links in article headers, which fell back to the browser outline.
  • Two offset focus rings named no offset colour, leaving a white gap in the dark theme.
  • aria-hidden on three decorative status squares, and a name for the project search box.

Small visual stragglers

  • The Highlights eyebrow gets the marker dot, Training's first section sits as close to the intro as on other index pages, the "Meet the team" arrow and the funding status square match their siblings, and the home service cards underline their title on hover. The project page shows a calendar beside the period, as the card does, and "View node" uses the shared link button.

Events page

  • "Upcoming events" had a green "Upcoming" chip to its left. No other section heading carries one, "Past events" right below it included, and it only repeated the heading's first word.
  • The intro still had a dash in it. refactor(copy): move editor-facing copy into site.json and content blocks #356 cleaned the other page intros, but this sentence is hard-coded in the page rather than in site.json, so it was missed.

Known gap

With a label, a message and a button, the banner wraps to three rows on a phone. Together with the fixed navigation that leaves little room at 200% zoom or in landscape. I'd like to settle that separately: either stop pinning the banner on small screens or keep it to fewer rows.

Testing

  • pnpm build (0 errors), pnpm test (49 tests, 24 of them new for the banner), pnpm test:slugs, pnpm test:pages (185 pages).
  • Looked at /about/everyone at 1440px and 390px after the lookup fix.
  • Built with the banner off: no banner markup on the home page.
  • With feat(events): add the Federated EGA workshop with its cover and banner #368 on top: looked at the banner, /events and the event page at 1440px and 390px.

No other section heading on the site carries a chip, and this one only repeated the heading's first word.
The other page intros were cleaned of dashes in #356; this one was hard-coded in the page and got missed.
Copilot AI balanced review requested due to automatic review settings November 17, 2026 13:39

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

The banner now ends by itself at an optional deadline, checked at build and again on each visit because GitHub Pages only rebuilds on push. It is full width in the ELIXIR navy in both themes, with an optional label and a button link, and the close button sits at the right edge with a 44px target on phones.

I dropped the endlessly pulsing icon (WCAG 2.2.2), keyed dismissal to the announcement so a new one shows again, and left the banner out of the Pagefind index so its words do not match every page. Parsing moved into src/lib/banner.ts with a strict schema, so a bad deadline or link fails the build. The message is now HTML-escaped and unsafe link targets render as text.

The admin editor gains the new fields, validates before publishing, saves keys in one order and previews the real look. banner.json itself is unchanged, so no banner shows until one is switched on.
@yasinmiran yasinmiran changed the title fix(events): bring the events page in line with the other index pages feat(banner): rework the site banner and tidy the events page Nov 17, 2026
… self-link

A screen reader's list of links showed only "Read more"; the link's name now includes the message. The link was 28px tall on phones, below the site's 44px rule, so its tap area is stretched without making the banner taller. On the page the banner points to, the link is left out, since it would only reload that page.
Article and event pages printed the date month first while every card that links to them printed it day first. A handful of hard-coded headings were in title case where the rest of the site uses sentence case, and the last dashes in hard-coded copy and meta descriptions are replaced.

Two About pages appended the site name to their title by hand, with a dash, although the layout already appends it. Training called its two lists "Upcoming training" and "Past training events"; both now say events.
The people page indexed the organisations table with people.json keys (uib) although the table is keyed by slug (bergen). The lookup never matched, so the quick links read UIB instead of UiB and each university's logo, node name and "View node" link never rendered.

The team card on the About page hard-coded 70+ people while the people page counts 65 from people.json; both now count. A person without a profile page got a link with no target on the node pages and now gets a plain card, as on the people page.
The training resource cards and the article back link fell back to the browser outline; they now use the site ring. Two offset rings named no offset colour, which left a white gap in the dark theme. Three decorative status squares lacked aria-hidden, and the one on the funding cards was larger than the same chip's square everywhere else. The project search box had only a placeholder for a name.

On the news page a year and a topic can match nothing, which left a blank grid. It now says so, as the funding page does.
The Highlights eyebrow gets the marker dot every other eyebrow has, Training's first section sits as close to the intro as on the other index pages, the "Meet the team" arrow matches the other card arrows, and the home service cards underline their title on hover like every other card with an arrow row.
@yasinmiran yasinmiran changed the title feat(banner): rework the site banner and tidy the events page feat(banner): rework the site banner and make the public pages consistent Nov 17, 2026
The clamped summary on the news, events, services and funding cards also had flex-1, which stretched the paragraph taller than its clamp, so a further line of text showed after the ellipsis on wide screens. An auto margin now takes the free space and the card footers stay aligned.

The project period showed a calendar on the card and a clock on the project page, and the "View node" link on the people page was hand-rolled where the same role elsewhere uses the shared link button.
…e site focus ring

Links inside the Training page's text blocks were navy without an underline in body text, so only colour set them apart. They and the links inside the home service cards now use the same style as article links.

The footer links, the hero tagline, the author, funder and project links on article pages, and two standalone links fell back to the browser outline on focus.
@yasinmiran
yasinmiran merged commit de7a865 into main Nov 17, 2026
1 check passed
@yasinmiran
yasinmiran deleted the fix/site-consistency branch November 17, 2026 14:19
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