Skip to content

💄 Scope the people card name hover to the profile link - #5011

Draft
bradystroud wants to merge 1 commit into
mainfrom
fix/4875-people-icon-hover
Draft

💄 Scope the people card name hover to the profile link#5011
bradystroud wants to merge 1 commit into
mainfrom
fix/4875-people-icon-hover

Conversation

@bradystroud

Copy link
Copy Markdown
Member

Hovering a social icon on a homepage people card lit up the person's name as well, so the card promised the SSW People profile while the click under the pointer went to LinkedIn/X/GitHub. This scopes the name's hover to the profile link.

The failure

On main, resting the pointer on the LinkedIn icon of a people card turns two things red at once: the LinkedIn icon (correct) and the person's name (wrong — the name is the SSW People profile link, and that is not where this click goes). Same for the X and GitHub icons.

Measured with Playwright on main, hovering LinkedIn on Calum's card:

element computed colour
LinkedIn icon rgb(204, 65, 65) — sswRed
name "Calum Simpson" rgb(204, 65, 65)sswRed, and it should not be
X icon / GitHub icon rgba(0, 0, 0, 0.9) — foreground

The cause

components/blocks/v3/peopleCarousel/peopleCarousel.tsx. The card <div> carried Tailwind's group, and the name used group-hover:text-sswRed. The social icons live inside that card, so hovering any of them satisfied group-hover and reddened the name. The card is one group but it holds two different link destinations.

The fix

Three lines, one file. Move the group onto the profile link itself — group/profile — and change the name to group-hover/profile:text-sswRed. The card <div> no longer needs group.

This does not shrink the click target. The profile link stretches across the whole card via its after:absolute after:inset-0 overlay, and a pointer over that overlay is a pointer over the link, so hovering anywhere on the card (photo, name, role, corners, the gaps between icons) still reddens the name. The social icons sit above the overlay on z-10, so they — and only they — are excluded. The card's red border still comes from the card's own hover:border-sswRed, unchanged.

Verification

Driven with Playwright against next dev at 1280×720, light mode, Chromium. Same script, same viewport, same card, before and after.

before/after side by side

The pointer is resting on the LinkedIn icon in both. Before: name red. After: name neutral, LinkedIn red like its siblings.

all four hover targets after the fix

After the fix, each icon reddens alone and matches its siblings; the name reddens only for the profile link.

Computed colours re-measured after the fix — hovering LinkedIn: icon rgb(204,65,65), name rgba(0,0,0,0.9), card border rgb(204,65,65). Hovering the name, the photo, the role text, a card corner, or the gap between two icons: name rgb(204,65,65) and document.elementFromPoint resolves to https://www.ssw.com.au/people/calum-simpson/ — the stretched click target is intact.

Before — the bug, in motion

before-people-card-hover.webm

main: the pointer visits LinkedIn, X, GitHub, then the name. The name turns red for every one of them.

After — the fix, in motion

after-people-card-hover.webm

This branch: the same tour. Only the hovered icon reddens; the name waits its turn.

Also: pnpm lint clean, pnpm test 35/35 pass.

A note on #4875

#4875 reports that the SSW People icon hovers differently from the LinkedIn and X icons beside it. That icon no longer exists — #4985 (AC 5) deleted the SSW-squares icon and moved the profile link onto the photo and name, which is what the issue asked for. So the bug as filed is not reproducible on main, and I did not invent it: what I could reproduce, in the same hover system on the same cards, is the leftover above.

I have deliberately not written Fixed #4875 — closing it is Adam's and Tiago's call, since the thread also carries the still-open "All SSW People" wording debate.

Checklist

  • If adding a new page, I have followed the 📃 New Webpage issue template — n/a
  • If updating the livestream banner, I have tested and followed the steps in Wiki - Testing the live banner — n/a
  • Include Done Video or screenshots — above

🤖 Generated with Claude Code

https://claude.ai/code/session_01FEcohj2sV3u4MEgd3f3BTK

Hovering a social icon on a homepage people card turned the person's
name red as well as the icon, because the name's `group-hover:` was
anchored to the whole card. The card then advertised the SSW People
profile while the click under the pointer would open LinkedIn/X/GitHub.

Move the group to the profile link itself (`group/profile`) so the name
only reddens when the pointer is actually over the profile link — which
still includes the whole card, since the link's stretched ::after overlay
covers it. The card border keeps its card-level hover.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FEcohj2sV3u4MEgd3f3BTK
@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

No linked issues found. Please add the corresponding issues in the pull request description.
Use GitHub automation to close the issue when a PR is merged

@github-actions

github-actions Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Coverage report

St.
Category Percentage Covered / Total
🔴 Statements 1.87% 917/49118
🔴 Branches 17.94% 106/591
🔴 Functions 4.84% 24/496
🔴 Lines 1.87% 917/49118

Test suite run success

35 tests passing in 4 suites.

Report generated by 🧪jest coverage report action from 6a3b511

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