Present: people roles picked on setup, an events list that fits
- Setup, per people block: each one's role or title under their name (`titles`) - An events list slide: presenters under the titles, columns that flow, shrunk to fit rather than scrolled (Fit) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
d58f630a8f
commit
afa95179ef
4 changed files with 79 additions and 22 deletions
|
|
@ -167,6 +167,8 @@ export interface PeopleTilesProps
|
|||
headingLevel?: 3 | 4 | 5;
|
||||
/** Just round photos and names in a row, as presented (095). */
|
||||
row?: boolean;
|
||||
/** In the row, each one's role or title under their name. */
|
||||
titles?: boolean;
|
||||
/** How long a fetched team or person is reused, in ms. */
|
||||
ttl?: number;
|
||||
emptyMessage?: string;
|
||||
|
|
@ -198,9 +200,13 @@ export default function PeopleTiles({
|
|||
loadingMessage = "Loading…",
|
||||
errorMessage = "Couldn't load this list right now.",
|
||||
row = false,
|
||||
titles = false,
|
||||
...view
|
||||
}: PeopleTilesProps) {
|
||||
const View = row ? PeopleRow : PeopleTilesView;
|
||||
const View = useMemo(
|
||||
() => (row ? (props) => <PeopleRow {...props} titles={titles} /> : PeopleTilesView),
|
||||
[row, titles],
|
||||
);
|
||||
const specs = useMemo(() => normalizeTeams(teams), [teams]);
|
||||
const teamKey = specs.map((spec) => spec.id).join(",");
|
||||
|
||||
|
|
@ -774,7 +780,7 @@ function Tile({
|
|||
|
||||
/* Everyone in the groups, then the people, as round photos over
|
||||
their names, left to right: a people block presented (095). */
|
||||
function PeopleRow({ groups, people }: { groups?: PeopleGroup[]; people?: Person[] }) {
|
||||
function PeopleRow({ groups, people, titles = false }: { groups?: PeopleGroup[]; people?: Person[]; titles?: boolean }) {
|
||||
const everyone = [...(groups ?? []).flatMap((group) => group.people), ...(people ?? [])];
|
||||
return (
|
||||
<ul className="flex flex-wrap justify-center gap-6">
|
||||
|
|
@ -784,6 +790,7 @@ function PeopleRow({ groups, people }: { groups?: PeopleGroup[]; people?: Person
|
|||
<Photo src={mediaUrl(person.photo)} name={person.name} />
|
||||
</span>
|
||||
<span className="mt-2 text-sm font-semibold leading-tight text-ink">{person.name}</span>
|
||||
{titles && person.title && <span className="mt-0.5 text-xs leading-tight text-muted">{person.title}</span>}
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue