Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
cd933d0
refactor(challenges): share the expert field resolution with other pages
wab Nov 16, 2026
6bf840b
refactor(member): extract MemberAvatar and getFirstName
wab Nov 16, 2026
af07a4b
feat(studio): rebuild the studio page with a person card per member
wab Nov 16, 2026
c086d8a
test(studio): cover cards with and without expert fields
wab Nov 16, 2026
ca0fae5
docs(inventory): list MemberAvatar and the studio sections
wab Nov 16, 2026
6fd5faa
refactor(challenges): extract buildExpertCard
wab Nov 16, 2026
f118720
feat(studio): expertise cards with a challenge pill and the promise
wab Nov 16, 2026
e49868d
style(studio): centre the team heading
wab Nov 16, 2026
5cf6fd5
feat(studio): tinted share cards
wab Nov 16, 2026
8d85c46
fix(studio): drop LinkedIn from the blog card label
wab Nov 16, 2026
c8fcbb7
style(studio): closing doors side by side from tablet
wab Nov 16, 2026
eef02c3
feat(studio): two-row hero marquee with a pause control
wab Nov 16, 2026
ad32c8c
feat(studio): companies strip as a single-line marquee
wab Nov 16, 2026
e6122fe
feat(studio): offices map, city rows and photo gallery
wab Nov 16, 2026
01a9220
feat(studio): hero copy from the mockup
wab Nov 16, 2026
05ac3e1
feat(studio): squad roles and sprint timeline from the mockup
wab Nov 16, 2026
15980b2
fix(studio): decorative offices map and distinct photo alts
wab Nov 16, 2026
03f7b66
fix(studio): marquees readable without motion, named apart
wab Nov 16, 2026
add840c
fix(studio): white podcast card title
wab Nov 16, 2026
c8f0d28
style(studio): offices map beside the list from tablet
wab Nov 16, 2026
2829cea
feat(preset): dark tone on the card recipe
wab Nov 17, 2026
8552ed0
refactor(studio): dark cards through the card tone
wab Nov 17, 2026
ee69068
feat(studio): office photos zoom on hover, mockup gallery rows
wab Nov 17, 2026
f7cf3b1
fix(studio): unlocalised blog link in the share section
wab Nov 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions app/components/design-system/card-recipe-section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ export function CardRecipeSection() {
<p className={cardTitle}>Tinted card</p>
<p className={cardCaption}>tone tinted (gray.50 bg)</p>
</li>
<li className={card({ tone: 'dark', border: false })}>
<p className={cardTitle}>Dark card</p>
<p className={css({ color: 'gray.300', fontSize: 'sm', mt: '2' })}>
tone dark (dark bg, white text)
</p>
</li>
<li className={card({ border: false })}>
<p className={cardTitle}>No-border card</p>
<p className={cardCaption}>border false · shadow only</p>
Expand Down
138 changes: 138 additions & 0 deletions app/components/member/member-avatar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
import * as React from 'react';

import { css, cx } from '@ocobo/styled-system/css';
import { text } from '@ocobo/styled-system/recipes';

import type { ChallengeKey } from '~/modules/challenge-schema';

// One static class per challenge: Panda only ships literal values.
const ringColour: Record<ChallengeKey, string> = {
rp: css({ bg: 'challenge.rp' }),
se: css({ bg: 'challenge.se' }),
sc: css({ bg: 'challenge.sc' }),
cx: css({ bg: 'challenge.cx' }),
sy: css({ bg: 'challenge.sy' }),
ai: css({ bg: 'challenge.ai' }),
};

const avatarColour: Record<ChallengeKey, string> = {
rp: css({ bg: 'challenge.rp.light' }),
se: css({ bg: 'challenge.se.light' }),
sc: css({ bg: 'challenge.sc.light' }),
cx: css({ bg: 'challenge.cx.light' }),
sy: css({ bg: 'challenge.sy.light' }),
ai: css({ bg: 'challenge.ai.light' }),
};

const ring = css({ display: 'flex', flexShrink: '0', borderRadius: 'full' });
const ringSize = {
lg: css({ w: '24', h: '24', p: '1' }),
sm: css({ w: '11', h: '11', p: '0.5' }),
};
const ringGrey = css({ bg: 'gray.200' });
const avatar = css({
position: 'relative',
flex: '1',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
overflow: 'hidden',
borderRadius: 'full',
borderStyle: 'solid',
borderColor: 'white',
});
const avatarSize = {
lg: cx(text({ variant: 'display-md-bold' }), css({ borderWidth: '3px' })),
sm: cx(
text({ variant: 'small' }),
css({ fontWeight: 'bold', borderWidth: '2px' }),
),
};
const avatarGrey = css({ bg: 'gray.50' });
const photoStyle = css({
position: 'absolute',
inset: '0',
w: 'full',
h: 'full',
objectFit: 'cover',
});

const pixels = { lg: 96, sm: 44 } as const;

function getInitials(name: string) {
return name
.split(' ')
.filter(Boolean)
.map((part) => part[0])
.join('')
.toUpperCase()
.slice(0, 2);
}

type MemberAvatarProps = {
name: string;
/** Photo URL. Without it, or when it fails to load, initials show. */
photo?: string;
/** Colours the ring. Without it, the ring is grey. */
challenge?: ChallengeKey | null;
/** `lg` (96px) on person cards, `sm` (44px) in a row of faces. */
size?: 'lg' | 'sm';
/** `eager` for a photo above the fold. */
loading?: 'lazy' | 'eager';
className?: string;
};

/**
* Round photo in a ring of the member's challenge colour, initials behind it.
* Decorative: the name always follows as text, so the photo has no alt.
*/
export function MemberAvatar({
name,
photo,
challenge,
size = 'lg',
loading = 'lazy',
className,
}: MemberAvatarProps) {
const [photoFailed, setPhotoFailed] = React.useState(false);
const photoRef = React.useRef<HTMLImageElement>(null);

// A photo that fails before hydration never fires `onError`.
React.useEffect(() => {
const image = photoRef.current;
if (image?.complete && image.naturalWidth === 0) setPhotoFailed(true);
}, []);

return (
<span
className={cx(
ring,
ringSize[size],
challenge ? ringColour[challenge] : ringGrey,
className,
)}
>
<span
className={cx(
avatar,
avatarSize[size],
challenge ? avatarColour[challenge] : avatarGrey,
)}
>
<span aria-hidden="true">{getInitials(name)}</span>
{photo && !photoFailed && (
<img
ref={photoRef}
src={photo}
alt=""
width={pixels[size]}
height={pixels[size]}
loading={loading}
className={photoStyle}
onError={() => setPhotoFailed(true)}
/>
)}
</span>
</span>
);
}
100 changes: 5 additions & 95 deletions app/components/member/person-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import { text } from '@ocobo/styled-system/recipes';

import { challengeFill } from '~/components/challenges/challenge-palette';
import { FlipCard } from '~/components/ui/flip-card';
import { getFirstName } from '~/utils/first-name';

import { MemberAvatar } from './member-avatar';

/** Challenge keys, as in the posts frontmatter and the `challenge` tokens. */
export type ChallengeKey = 'rp' | 'se' | 'sc' | 'cx' | 'sy' | 'ai';
Expand Down Expand Up @@ -35,57 +38,6 @@ type PersonCardProps = {
className?: string;
};

// One static class per challenge: Panda only ships literal values.
const ringColour: Record<ChallengeKey, string> = {
rp: css({ bg: 'challenge.rp' }),
se: css({ bg: 'challenge.se' }),
sc: css({ bg: 'challenge.sc' }),
cx: css({ bg: 'challenge.cx' }),
sy: css({ bg: 'challenge.sy' }),
ai: css({ bg: 'challenge.ai' }),
};

const avatarColour: Record<ChallengeKey, string> = {
rp: css({ bg: 'challenge.rp.light' }),
se: css({ bg: 'challenge.se.light' }),
sc: css({ bg: 'challenge.sc.light' }),
cx: css({ bg: 'challenge.cx.light' }),
sy: css({ bg: 'challenge.sy.light' }),
ai: css({ bg: 'challenge.ai.light' }),
};

const ring = css({
display: 'flex',
flexShrink: '0',
w: '24',
h: '24',
p: '1',
borderRadius: 'full',
});
const ringGrey = css({ bg: 'gray.200' });
const avatar = cx(
text({ variant: 'display-md-bold' }),
css({
position: 'relative',
flex: '1',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
overflow: 'hidden',
borderRadius: 'full',
borderWidth: '3px',
borderStyle: 'solid',
borderColor: 'white',
}),
);
const avatarGrey = css({ bg: 'gray.50' });
const photoStyle = css({
position: 'absolute',
inset: '0',
w: 'full',
h: 'full',
objectFit: 'cover',
});
const identity = css({
display: 'flex',
flexDirection: 'column',
Expand Down Expand Up @@ -132,16 +84,6 @@ const footer = cx(
css({ mt: 'auto', fontWeight: 'bold' }),
);

function getInitials(name: string) {
return name
.split(' ')
.filter(Boolean)
.map((part) => part[0])
.join('')
.toUpperCase()
.slice(0, 2);
}

/**
* Person variant of `FlipCard` (ADR 0002), for the team, challenge and
* about-us pages. Front: photo, name, role and challenge label. Back: first
Expand All @@ -165,22 +107,14 @@ export function PersonCard({
className,
}: PersonCardProps) {
const { t } = useTranslation();
const [photoFailed, setPhotoFailed] = React.useState(false);
const photoRef = React.useRef<HTMLImageElement>(null);
const toolsId = React.useId();
const summaryId = React.useId();
const firstName = name.trim().split(/\s+/)[0];
const firstName = getFirstName(name);
const summary = showBio ? bio : contribution;
const visibleTools =
toolLimit === undefined ? tools : tools.slice(0, Math.max(0, toolLimit));
const companies = hidePreviousCompanies ? [] : previousCompanies;

// A photo that fails before hydration never fires `onError`.
React.useEffect(() => {
const image = photoRef.current;
if (image?.complete && image.naturalWidth === 0) setPhotoFailed(true);
}, []);

return (
<FlipCard
variant="person"
Expand All @@ -189,31 +123,7 @@ export function PersonCard({
backClassName={challenge ? challengeFill[challenge] : undefined}
front={
<>
<span
className={cx(ring, challenge ? ringColour[challenge] : ringGrey)}
>
<span
className={cx(
avatar,
challenge ? avatarColour[challenge] : avatarGrey,
)}
>
<span aria-hidden="true">{getInitials(name)}</span>
{photo && !photoFailed && (
<img
ref={photoRef}
src={photo}
// The name follows as text: the photo adds nothing to read.
alt=""
width={96}
height={96}
loading="lazy"
className={photoStyle}
onError={() => setPhotoFailed(true)}
/>
)}
</span>
</span>
<MemberAvatar name={name} photo={photo} challenge={challenge} />
<div className={identity}>
<Heading className={nameStyle}>{name}</Heading>
<p className={roleStyle}>{role}</p>
Expand Down
78 changes: 78 additions & 0 deletions app/components/studio/closing-section.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import { useTranslation } from 'react-i18next';

import { css, cx } from '@ocobo/styled-system/css';
import { card, section, text } from '@ocobo/styled-system/recipes';

import { Container } from '~/components/ui/Container';
import { ButtonLink } from '~/components/ui/button-link';
import { ContactCta } from '~/components/ui/contact-cta';
import { useLocalizedPathname } from '~/hooks/useLocalizedPathname';
import { url } from '~/utils/url';

type ClosingSectionProps = {
/** Shows the "Join us" card, which links to the jobs page. */
jobsEnabled: boolean;
};

// Static literals per layout: Panda drops a value computed at runtime.
const oneDoor = css({ display: 'grid', gap: '6' });
const twoDoors = css({
display: 'grid',
gridTemplateColumns: { base: '1fr', md: 'repeat(2, minmax(0, 1fr))' },
gap: '6',
});
const column = css({ gap: '5', alignItems: 'flex-start' });
// Flat cards on the yellow band, as in the mockup.
const door = card({ padding: 'xl', border: false, shadow: 'none' });
const darkDoor = card({
padding: 'xl',
border: false,
shadow: 'none',
tone: 'dark',
});

/** Two closing doors: work with the Studio, or join it. */
export function ClosingSection({ jobsEnabled }: ClosingSectionProps) {
const { t } = useTranslation('studio');
const getLocalizedPath = useLocalizedPathname();

return (
<section className={section({ bg: 'yellow' })}>
<Container className={jobsEnabled ? twoDoors : oneDoor}>
<div className={cx(door, column)}>
<p className={text({ variant: 'label', color: 'muted' })}>
{t('closing.work.eyebrow')}
</p>
<h2 className={text({ variant: 'display-lg' })}>{t('cta.title')}</h2>
<p className={text({ variant: 'body', color: 'muted' })}>
{t('cta.subtitle')}
</p>
<ContactCta className={css({ mt: 'auto' })}>
{t('cta.button')}
</ContactCta>
</div>

{jobsEnabled && (
<div className={cx(darkDoor, column)}>
<p className={text({ variant: 'label', color: 'yellow' })}>
{t('closing.join.eyebrow')}
</p>
<h2 className={text({ variant: 'display-lg', color: 'white' })}>
{t('closing.join.title')}
</h2>
<p className={text({ variant: 'body', color: 'muted-light' })}>
{t('closing.join.text')}
</p>
<ButtonLink
to={getLocalizedPath(url.jobs)}
variant="yellow"
className={css({ mt: 'auto' })}
>
{t('closing.join.cta')}
</ButtonLink>
</div>
)}
</Container>
</section>
);
}
Loading
Loading