Skip to content

💄 Make homepage people cards clickable + fix console errors#4869

Open
wicksipedia wants to merge 12 commits into
mainfrom
fix/people-card-clickable
Open

💄 Make homepage people cards clickable + fix console errors#4869
wicksipedia wants to merge 12 commits into
mainfrom
fix/people-card-clickable

Conversation

@wicksipedia

Copy link
Copy Markdown
Member

Why

The people cards on the homepage ("We work together to form an amazing collective brain") weren't clickable — you had to hit the small SSW logo icon to reach someone's profile. Making the whole card a link surfaced a pre-existing hydration error that was killing the block, and chasing that turned up a handful of other console/build warnings worth clearing while we were in here.

What changed

Each fix is a separate commit.

The feature

  • Clicking anywhere on a person's card opens their SSW People profile. The card-wide link is an overlay rather than a wrapper, so the LinkedIn, X and SSW People icons stay separately clickable instead of nesting anchors inside one another. Cards with no SSW People URL stay non-clickable, and icons already hid themselves when their URL was missing.

The bug that broke the clicks

  • Hydration mismatch in the person card textures. personCardTexture.tsx used useId() to namespace its SVG <defs>; server and client generated different ids, so React bailed out of hydrating the whole block and the card went dead. The texture is already chosen deterministically from the card's index, so the id is now derived the same way. A scope keeps the mobile-carousel and desktop-grid copies unique.

Console + build noise

  • url(null)GET /null. v2ComponentWrapper always set background-image, so any block without one rendered url(null). The browser dutifully fetched /null, which hit the [filename] catch-all and logged Unable to find record content/pages/null.mdx on every page load. One guard, both symptoms gone.
  • collapsible leaking to the DOM. Radix's Accordion only accepts collapsible with type="single". With type="multiple" it fell through to the DOM and React logged Received `true` for a non-boolean attribute `collapsible` on every page using the block.
  • Legacy objectFit prop on both logo carousels — dropped by next/image in v13, so it did nothing and warned on every logo. Replaced with object-contain.
  • Undeclared image quality. The hero and event banners render at quality={100}, which Next 16 will refuse to serve unless it's listed. Added images.qualities to next.config.mjs.
  • Ambiguous z-[2]. The arbitrary value matched both the core z utility and the zIndexStack plugin's, so Tailwind warned and the class was unreliable. Added 2 to the zIndex scale; the hero uses the named z-2.
  • Stale browserslist data (14 months old). Ran update-browserslist-db, which also deduped caniuse-lite from three copies to one and patch-bumped two transitive deps (crelt, uuid). No target browser changes.

Verification

Driven in a real browser against a dev server:

  • Clicking the photo navigates to ssw.com.au/people/adam-cogan/; clicking the LinkedIn icon on the same card navigates to linkedin.com/in/adamcogan — the overlay and the icons each win their own clicks.
  • Homepage: zero console errors, zero /null requests, no duplicate texture ids in the DOM.
  • Consulting page (which uses the accordion block): the collapsible error is gone.
  • tsc --noEmit clean.

Not fixed (out of scope, flagging them)

  • The "More SSW People" button 404s in dev. /people is a separate app served at ssw.com.au/people in production — nothing in this repo serves that route, so this is expected locally and fine in prod.
  • /api/tina/query/with-fallbacks 404s on the consulting page. That's Tina's own dev-only endpoint, unrelated to anything here.

🤖 Generated with Claude Code

wicksipedia and others added 8 commits July 14, 2026 11:31
The texture SVGs used useId() to namespace their <defs>, and the server and
client generated different ids, so React bailed out of hydrating the block.
The texture is already picked deterministically from the card's index, so the
id can be derived the same way. A scope distinguishes the mobile-carousel and
desktop-grid copies of each card, keeping the ids unique.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Clicking anywhere on a person's card now opens their SSW People profile. The
card-wide link is an overlay rather than a wrapper so the LinkedIn, X and SSW
People icons stay separately clickable instead of nesting anchors inside one
another. Cards without an SSW People URL stay non-clickable.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Next 16 only serves qualities listed in images.qualities. The hero and event
banners already render at quality 100, which currently logs a warning.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
next/image dropped objectFit in v13; it does nothing today and logs a warning
on every logo. The equivalent is the object-contain class.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The arbitrary value matched both the core z utility and the zIndexStack
plugin's, so Tailwind warned and the class was unreliable. Adding 2 to the
zIndex scale lets the hero use the named z-2 instead.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The wrapper always set background-image, so blocks without one rendered
url(null) and the browser fetched /null. That hit the [filename] catch-all and
logged "Unable to find record content/pages/null.mdx" on every page load.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The browsers data was 14 months old, so every build logged a browserslist
warning. Ran update-browserslist-db, which also deduped caniuse-lite down to a
single version and patch-bumped two transitive deps (crelt, uuid). No target
browser changes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Radix only accepts collapsible when type is "single". With type="multiple" the
prop fell through to the DOM, so React logged "Received `true` for a
non-boolean attribute `collapsible`" on every page using the block.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 14, 2026 02:13
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 0.18% 84/45963
🔴 Branches 5.09% 25/491
🔴 Functions 0.85% 4/469
🔴 Lines 0.18% 84/45963

Test suite run success

13 tests passing in 1 suite.

Report generated by 🧪jest coverage report action from 08688e8

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.

Pull request overview

This PR improves the homepage “People” UX by making each person card fully clickable (without nesting anchors) and resolves several console/build warnings uncovered while addressing a hydration issue.

Changes:

  • Make person cards clickable via a full-card link overlay while keeping individual social icons separately clickable.
  • Fix hydration mismatch in PersonCardTexture by replacing useId() with deterministic, scoped SVG <defs> ids.
  • Remove/guard sources of console/build warnings (e.g., url(null) requests, Radix collapsible prop leak, deprecated next/image props, Tailwind z-index ambiguity, Next image quality allowlist) and refresh lockfile browserslist data.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
tailwind.config.js Adds zIndex: { 2: 2 } so z-2 is a stable, non-ambiguous utility.
pnpm-lock.yaml Updates browserslist/caniuse-lite and a few transitive deps after update-browserslist-db.
next.config.mjs Adds images.qualities allowlist to support quality={100} usage.
components/layout/v2ComponentWrapper.tsx Guards backgroundImage style to avoid url(null)/null requests/log spam.
components/blocks/v3/peopleCarousel/personCardTexture.tsx Removes useId() and introduces deterministic, scoped SVG ids to prevent hydration mismatch.
components/blocks/v3/peopleCarousel/peopleCarousel.tsx Adds full-card link overlay and passes texture scope to keep ids unique across render variants.
components/blocks/v3/logoCarousel/logoCarousel.tsx Replaces deprecated objectFit prop with object-contain class.
components/blocks/v3/heroBox/heroBox.tsx Replaces ambiguous z-[2] with z-2.
components/blocks/logoCarousel/logoCarousel.tsx Replaces deprecated objectFit prop with object-contain class (and keeps conditional invert styling).
components/blocks/imageComponents/accordionBlock/accordionBlock.tsx Avoids passing collapsible when type="multiple" to prevent DOM attribute warnings.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/blocks/v3/peopleCarousel/peopleCarousel.tsx Outdated
The comment read as though the social links were z-10; that's the overlay.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@wicksipedia

Copy link
Copy Markdown
Member Author

Good catch — the comment read as though the social links were z-10, but that's the overlay; the icons are z-20. Reworded in ad2f801. No behaviour change.

@wicksipedia wicksipedia added the no-issue This label is used to bypass the PR-Lint check. Should be used for non-coding changes label Jul 14, 2026
Prettier's Tailwind plugin orders z-2 after the positioning utilities; the old
z-[2] arbitrary value sorted differently, so swapping to the named class left
the line unsorted and failed lint-code.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshbermanssw

Copy link
Copy Markdown
Member

/deploy

@github-actions

Copy link
Copy Markdown
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net

ℹ️ Staging slots are no longer created automatically - comment /deploy to deploy new commits.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Lighthouse Report

🌐 URL ⚡ Performance ♿ Accessibility ✅ Best Practices 🔍 SEO 📦 Bundle Size 🗑️ Unused Bundle
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/ 36 93 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/articles 89 97 59 57 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/about-us 63 97 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/clients 90 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/contact-us 56 92 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting 46 88 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/net-upgrade 64 92 56 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/web-applications 61 95 59 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/employment 64 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/angular-superpowers-tour 69 97 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop 90 91 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop-essentials 27 95 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/netug/sydney 75 94 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/training/internship-fullstack 79 91 56 61 0.00 MB 0.00 MB

Wrapping the card meant an overlay anchor sitting under the social icons, with
z-index juggling to keep the icons clickable. Linking just the photo and name
drops the overlay entirely: the icon row is a plain sibling and each icon links
out on its own. The card keeps its hover outline, and a person with no SSW
People URL renders a div instead of a link.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@joshbermanssw

Copy link
Copy Markdown
Member

/deploy

@github-actions

Copy link
Copy Markdown
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net

ℹ️ Staging slots are no longer created automatically - comment /deploy to deploy new commits.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Lighthouse Report

🌐 URL ⚡ Performance ♿ Accessibility ✅ Best Practices 🔍 SEO 📦 Bundle Size 🗑️ Unused Bundle
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/ 19 95 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/articles 88 97 59 57 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/about-us 61 97 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/clients 89 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/contact-us 70 92 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting 41 88 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/net-upgrade 55 92 56 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/web-applications 62 95 59 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/employment 47 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/angular-superpowers-tour 69 97 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop 92 91 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop-essentials 50 95 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/netug/sydney 70 94 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/training/internship-fullstack 79 91 56 61 0.00 MB 0.00 MB

@joshbermanssw

Copy link
Copy Markdown
Member

/deploy

@github-actions

Copy link
Copy Markdown
Contributor

Deployed changes to https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net

ℹ️ Staging slots are no longer created automatically - comment /deploy to deploy new commits.

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Lighthouse Report

🌐 URL ⚡ Performance ♿ Accessibility ✅ Best Practices 🔍 SEO 📦 Bundle Size 🗑️ Unused Bundle
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/ 16 93 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/articles 88 97 59 57 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/about-us 61 97 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/clients 88 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/company/contact-us 69 92 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting 42 88 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/net-upgrade 60 92 56 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/consulting/web-applications 56 95 59 54 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/employment 62 92 59 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/angular-superpowers-tour 68 97 56 69 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop 91 91 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/events/ai-workshop-essentials 53 95 59 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/netug/sydney 72 94 56 61 0.00 MB 0.00 MB
https://app-sswwebsite-9eb3-pr-4869.azurewebsites.net/training/internship-fullstack 76 91 56 61 0.00 MB 0.00 MB

@joshbermanssw

Copy link
Copy Markdown
Member

Border effect still on whole card during hover

The LinkedIn and X icons are react-icons that inherit the white→sswRed hover
from text colour; the SSW People icon was a colour PNG that couldn't. Swapping
it for an inline SVG in currentColor makes all three behave identically — white
at rest, sswRed on hover — and drops the PNG and the special-case image branch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-issue This label is used to bypass the PR-Lint check. Should be used for non-coding changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants