Skip to content

Commit

Permalink
feat: Update people.
Browse files Browse the repository at this point in the history
  • Loading branch information
jheer committed Apr 27, 2024
1 parent 78dd331 commit 1b00358
Show file tree
Hide file tree
Showing 10 changed files with 157 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/lib/app-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface Person {
email: string;
url?: string;
// status: '' | '0F' | '4A' | '3C' | '99' | '2S';
status: 'lab-lead' | 'alumni' | 'collaborator' | 'other' | 'current-student';
status: 'faculty' | 'alumni' | 'collaborator' | 'other' | 'member';
visible: boolean;
image: string | null;
nickname: string | null;
Expand Down
57 changes: 35 additions & 22 deletions src/routes/people/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,41 @@
export let data: { people: Person[] };
import ActiveMember from './active-member.svelte';
const sortPeople = (a : Person, b : Person) => {
const u = a.last_name, v = b.last_name;
return u < v ? -1 : u > v ? 1 : 0;
};
let hoveredPerson: Person | null = null;
const groupsByStatus = data.people.reduce(
(acc, person) => {
if (!acc[person.status]) {
acc[person.status] = [];
}
acc[person.status].push(person);
return acc;
},
{} as Record<Person['status'], Person[]>
);
const groupsByStatus = data.people.slice()
.sort(sortPeople)
.reduce(
(acc, person) => {
if (!acc[person.status]) {
acc[person.status] = [];
}
acc[person.status].push(person);
return acc;
},
{} as Record<Person['status'], Person[]>
);
const members = [
...groupsByStatus['faculty'],
...groupsByStatus['member']
];
function handleHover(person: Person | null) {
hoveredPerson = person;
}
function displayName(person: Person) {
return person.display_name || `${person.first_name} ${person.last_name}`;
}
</script>

<div class="members hidden md:block">
{#each groupsByStatus['lab-lead'] as person}
<ActiveMember {person} hoverPerson={handleHover} />
{/each}
{#each groupsByStatus['current-student'].slice(0, 4) as person}
{#each members.slice(0, 6) as person}
<ActiveMember {person} hoverPerson={handleHover} />
{/each}
<div class="group flex items-center justify-center">
Expand All @@ -41,21 +54,21 @@
<img src="images/logo/idl-290.png" alt="IDL logo" />
{/if}
</div>
{#each groupsByStatus['current-student'].slice(4) as person}
{#each members.slice(6) as person}
<ActiveMember {person} hoverPerson={handleHover} />
{/each}
</div>

<div class="visible md:hidden">
<div class="lead">current members</div>
{#each [...groupsByStatus['lab-lead'], ...groupsByStatus['current-student']] as person}
{#each members as person}
<div class="mt-8 w-full flex flex-col items-center">
<img
class="w-1/2"
src={person.image}
alt={`head shot of ${person.first_name} ${person.last_name}`}
alt={`head shot of ${displayName(person)}`}
/>
<div class="text-xl font-semibold">{person.first_name} {person.last_name}</div>
<div class="text-xl font-semibold">{displayName(person)}</div>
<div class="italic">{person.position}, {person.org}</div>
<div class="text-sm text-center">
{person.interests}
Expand All @@ -68,9 +81,9 @@
<div class="grid md:grid-cols-3 text-left">
{#each groupsByStatus['alumni'] as person}
{#if person.url}
<a href={person.url}>{person.first_name} {person.last_name}</a>
<a href={person.url}>{displayName(person)}</a>
{:else}
<div>{person.first_name} {person.last_name}</div>
<div>{displayName(person)}</div>
{/if}
{/each}
</div>
Expand All @@ -79,9 +92,9 @@
<div class="grid md:grid-cols-3 text-left">
{#each groupsByStatus['collaborator'] as person}
{#if person.url}
<a href={person.url}>{person.first_name} {person.last_name}</a>
<a href={person.url}>{displayName(person)}</a>
{:else}
<div>{person.first_name} {person.last_name}</div>
<div>{displayName(person)}</div>
{/if}
{/each}
</div>
Binary file added static/images/people/dubs.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/people/jheer1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/people/mcstone.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/people/mgord.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/images/people/mlamkin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion static/papers/consistency.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
"authors": [
{
"first_name": "Zening",
"last_name": "Qu"
"last_name": "Qu",
"url": "https://www.linkedin.com/in/zeningqu"
},
{
"first_name": "Jessica",
Expand Down
3 changes: 2 additions & 1 deletion static/papers/voyager2.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
},
{
"first_name": "Zening",
"last_name": "Qu"
"last_name": "Qu",
"url": "https://www.linkedin.com/in/zeningqu"
},
{
"first_name": "Dominik",
Expand Down
136 changes: 117 additions & 19 deletions static/people.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"display_name": "Jeffrey Heer",
"email": "[email protected]",
"url": "http://homes.cs.washington.edu/~jheer/",
"status": "lab-lead",
"status": "faculty",
"visible": true,
"image": "images/people/jheer.jpg",
"image": "images/people/jheer1.jpg",
"nickname": "Jeff",
"position": "Professor",
"interests": "Visualization, HCI, Social Computing, Waving Arms & Flapping Lips",
Expand Down Expand Up @@ -509,7 +509,7 @@
"display_name": "",
"email": "",
"url": "http://www.cs.washington.edu/homes/landay/",
"status": "other",
"status": "collaborator",
"visible": true,
"image": null,
"nickname": null,
Expand Down Expand Up @@ -957,13 +957,13 @@
"display_name": "",
"email": "[email protected]",
"url": "https://research.tableau.com/user/maureen-stone",
"status": "collaborator",
"status": "faculty",
"visible": true,
"image": null,
"nickname": null,
"position": null,
"interests": null,
"org": null
"image": "images/people/mcstone.jpg",
"nickname": "Maureen",
"position": "Affiliate Professor",
"interests": "Color, Visualization",
"org": "UW CSE"
},
{
"first_name": "Daniel",
Expand Down Expand Up @@ -2035,7 +2035,7 @@
"display_name": "",
"email": "",
"url": "http://hci.stanford.edu/msb/",
"status": "other",
"status": "collaborator",
"visible": true,
"image": null,
"nickname": null,
Expand Down Expand Up @@ -2846,8 +2846,8 @@
"last_name": "Qu",
"display_name": "",
"email": "",
"url": "",
"status": "current-student",
"url": "https://www.linkedin.com/in/zeningqu",
"status": "member",
"visible": true,
"image": "images/people/zqu.jpg",
"nickname": "Zening",
Expand Down Expand Up @@ -3099,7 +3099,7 @@
"display_name": "",
"email": "",
"url": "https://homes.cs.washington.edu/~leibatt/",
"status": "lab-lead",
"status": "faculty",
"visible": true,
"image": "images/people/leibatt.jpg",
"nickname": "Leilani",
Expand Down Expand Up @@ -4135,7 +4135,7 @@
"display_name": "",
"email": "[email protected]",
"url": "https://madeleinegrunde.github.io/",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/mgrunde.jpg",
"nickname": "Madeleine",
Expand All @@ -4149,7 +4149,7 @@
"display_name": "",
"email": "[email protected]",
"url": "https://luke-s-snyder.github.io/",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/snyderl.jpg",
"nickname": "Luke",
Expand All @@ -4163,7 +4163,7 @@
"display_name": "",
"email": "[email protected]",
"url": "http://joshuahhh.com/",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/joho.jpg",
"nickname": "Josh",
Expand All @@ -4177,7 +4177,7 @@
"display_name": "",
"email": "",
"url": "https://ameyabp.github.io/",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/ameya.jpg",
"nickname": "Ameya",
Expand Down Expand Up @@ -4205,7 +4205,7 @@
"display_name": "",
"email": "",
"url": "",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/junran.jpg",
"nickname": "Junran",
Expand Down Expand Up @@ -4667,7 +4667,7 @@
"display_name": "",
"email": "",
"url": "http://mcnutt.in/",
"status": "current-student",
"status": "member",
"visible": true,
"image": "images/people/mcnutt.jpg",
"nickname": "Andrew",
Expand All @@ -4688,5 +4688,103 @@
"position": null,
"interests": null,
"org": "UW CSE"
},
{
"first_name": "Mitchell",
"last_name": "Gordon",
"display_name": "",
"email": "",
"url": "https://mgordon.me/",
"status": "member",
"visible": true,
"image": "images/people/mgord.jpg",
"nickname": "Mitchell",
"position": "Post-Doc",
"interests": "Human-AI Interaction",
"org": "UW CSE"
},
{
"first_name": "Michelle",
"last_name": "Lam",
"display_name": "",
"email": "",
"url": "https://michelle123lam.github.io/",
"status": "collaborator",
"visible": true,
"image": null,
"nickname": null,
"position": null,
"interests": null,
"org": null
},
{
"first_name": "Ranjay",
"last_name": "Krisna",
"display_name": "",
"email": "",
"url": "http://ranjaykrishna.com/",
"status": "collaborator",
"visible": true,
"image": null,
"nickname": null,
"position": null,
"interests": null,
"org": null
},
{
"first_name": "Amy",
"last_name": "Zhang",
"display_name": "Amy X. Zhang",
"email": "",
"url": "https://homes.cs.washington.edu/~axz/",
"status": "collaborator",
"visible": true,
"image": null,
"nickname": null,
"position": null,
"interests": null,
"org": null
},
{
"first_name": "Medina",
"last_name": "Lamkin",
"display_name": "",
"email": "[email protected]",
"url": "https://www.linkedin.com/in/medina-lamkin-9825611b5",
"status": "member",
"visible": true,
"image": "images/people/mlamkin.jpg",
"nickname": "Medina",
"position": "PhD Student",
"interests": "Visualization",
"org": "UW CSE"
},
{
"first_name": "Anthony",
"last_name": "Wise",
"display_name": "",
"email": "[email protected]",
"url": "",
"status": "member",
"visible": true,
"image": "images/people/dubs.jpg",
"nickname": "Anthony",
"position": "PhD Student",
"interests": "Visualization",
"org": "UW CSE"
},
{
"first_name": "Will",
"last_name": "Wang",
"display_name": "Will (Huichen) Wang",
"email": "[email protected]",
"url": "",
"status": "member",
"visible": true,
"image": "images/people/dubs.jpg",
"nickname": "Will",
"position": "PhD Student",
"interests": "Visualization, Generative AI",
"org": "UW CSE"
}
]

0 comments on commit 1b00358

Please sign in to comment.