Repository navigation
feat(banner): rework the site banner and make the public pages consistent - #367
Merged
Merged
Conversation
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.
Contributor
There was a problem hiding this comment.
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.
… 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.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two things that touch how the site looks and behaves everywhere, kept apart from the workshop content in #368.
Site banner rework
banner.jsongets three optional keys next tovisibleandmessage:labellink{ label, href }, shown as a buttonexpiresThe 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:
site.jsonlinks (javascript:,//host, plainhttp) renders as text.src/lib/banner.tsholds a strict schema, so a misspelt key or an unreadable deadline fails the build instead of shipping a banner that never ends.banner.jsonis 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/everyonelooked 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.people.json. Both now count./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
Accessibility
aria-hiddenon three decorative status squares, and a name for the project search box.Small visual stragglers
Events page
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)./about/everyoneat 1440px and 390px after the lookup fix./eventsand the event page at 1440px and 390px.