Redesign and update 'Meet the Team' data #452
Labels
No Label
a11y
Backlog
Blocked
Bug
Content
Dependencies
Design
Feature Request
Good First Issue
In Progress
Performance
Priority - High
Priority - Low
Priority - Medium
Untriaged
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: www/www-new#452
Loading…
Reference in New Issue
No description provided.
Delete Branch "j285he-meet-the-team-s22"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #450. Closes #436.
Redesign and update 'Meet the Team' datato WIP: Redesign and update 'Meet the Team' dataWIP: Redesign and update 'Meet the Team' datato Redesign and update 'Meet the Team' dataRedesign and update 'Meet the Team' datato WIP: Redesign and update 'Meet the Team' dataWIP: Redesign and update 'Meet the Team' datato Redesign and update 'Meet the Team' data@ -1,20 +1,12 @@
import React from "react";
import { Metadata } from "@/lib/team";
Components should be isolated and self contained. They should not be importing things from outside the /components folder.
This is why we duplicated an interface here to
TeamMemberProps
. This makes the component independent of whatever the Metadata is. If in the future the metadata changes, the props of this component would also change (or the other way around) - which we may not want.@ -243,0 +268,4 @@
photography = sortTeam(photography);
website = sortTeam(website);
systems = sortTeam(systems);
terminal = sortTeam(terminal);
This is getting a little out of hand. With these many teams, can you move them into a 2d array?
@ -243,3 +273,4 @@
return {
props: {
execs,
coordinators,
this way you can make the props: execs (a 1d array) and teams: (a 2d array)
What about the
teams
array on line 64? Won't we need to change eachmembers
property to be (for example)members: teams[0]
?I was also thinking perhaps
teams
could go in a contents .json file but let me know what you think is bestYeah if we move it into an array here, then we won't need the array on line 64, and a lot of hardcoding would go away.
Perhaps putting all the teams in one place would be a better idea.
Eg - instead of
/contents/team/team-name.json
we can put all the json data in an array in/contents/team/non-execs.json
which could follow the following format:But don't block this PR on this change. Let's get the content updated first and you can file an issue to get back to this :)
@ -210,0 +212,4 @@
const teamMembers: Metadata[] = [];
const teamOthers: Metadata[] = [];
for (const member of team) {
if (!Object.prototype.hasOwnProperty.call(member, "role")) {
if (member.hasOwnProperty("role")) {
or
if (member["role"] != null)
@ -210,0 +222,4 @@
}
teamLeads.sort((a, b) => a.name.localeCompare(b.name));
teamMembers.sort((a, b) => a.name.localeCompare(b.name));
teamOthers.sort((a, b) => a.name.localeCompare(b.name));
nit: Instead of using that for loop, I would suggest using a more declarative approach.
yay all the old pictures are gone!
Left comments for code nits, but looks good overall :) Thanks @j285he!!
@ -14,3 +10,3 @@
"name": "Andrew Wang"
},
{
"name": "Anthony Brennan",
@j285he I suspect we want to keep all these alumni-labelled peeps, but let's let @r389li confirm that. Sorry for not being more clear with expectations 😅
@a258wang Correct, we should keep them. Syscom membership doesn't usually change. This term, however, Max graduated, so he is now Alumni, and I misidentified Edwin as alumni when he's in fact a current student. Also if someone could link syscom and termcom in my bio to the relevant sections on the page that would be appreciated!
@ -210,0 +216,4 @@
.filter(({ role }) => role === "Team Lead")
.sort(memberComparer);
const general = team
.filter(({ role }) => role == null || role === "")
Would
role == null || role === ""
be equivalent to!role
here? (and also a couple lines below)Just one tiny (non-blocking) nitpick, but otherwise this looks great! 🚢
Once this is merged, could you please create a ticket to clean up how we store/process the team data, as discussed in the comments of this PR? Thanks!