Skip to content

ek/coffee-chat-member-side-adjustments#1145

Open
zkdlinyne wants to merge 8 commits intomainfrom
ek/coffee-chat-member-side-adjustments
Open

ek/coffee-chat-member-side-adjustments#1145
zkdlinyne wants to merge 8 commits intomainfrom
ek/coffee-chat-member-side-adjustments

Conversation

@zkdlinyne
Copy link
Copy Markdown
Collaborator

Summary

This pull request includes changes made mostly to the coffee chat page on the member side. Also includes some minor changes to the main DTI website and the script on the backend "populate-coffee-chat-suggestions.ts."

Coffee Chat Member Side

  • Previously, when a bingo square (Coffee Chat Modal) is clicked, the list of suggested members that fit the opened category only included those that the member had not coffee chatted yet. After some discussion, we agreed it was optimal for those trying to get bingo to see the full list of members that fit the opened category.
  • Added some light styling changes to go along with that (not great at styling, very open to feedback!), including gray row backgrounds to members in the list that the user has already coffee chatted (since now, they can see every single member that fits the category, and we still want to make sure they have a way to keep track of members they have already coffee chatted in general).
  • This same styling + logic is applied to the first dropdown menu under "Which member did you coffee chat?"
  • Users still cannot see themselves in the list of suggested chats (more on that below)
Screenshot 2026-03-22 at 10 06 24 PM Screenshot 2026-03-22 at 10 06 09 PM

Populate-coffee-chat-suggestions.ts Script

  • The following script was mildly outdated and needed to be re-run to remain up-to-date with the sp26 cohort.
  • Changed logic to match members based on netIDs instead of full names (more efficient, less room for error)

New-dti-website-redesign minor tweaks

  • Previously, on the Products page, when the Redi logo was clicked, the page moved down to the description of CUReviews. Now, it moves to Redi.
  • The information in the description of CornellGO on the Products page was outdated, changed to reflect current stages (the product is already launched!)

Test Plan

To test:

  1. Submit a coffee chat for a member.
  2. Click on a bingo square for a category OTHER than the one you just submitted a chat for, preferably one that the person you just chatted also fit.
  3. See their name highlighted in gray, along with the names of every member that fits the category.
  4. Test multiple times to see if the gray box styling appears for multiple members that you have already chatted that fit a certain category.
  5. i.e. Submit a chat with Abrar Amin under the category "plays an instrument." Then navigate to the bingo square for the category "has been to more than 3 countries." Abrar's name should be highlighted in gray, and you should see every member that fits the category.
  6. Try deleting the submitted chat for "plays and instrument" and then view "has been to more than 3 countries" to see if the gray box surrounding Abrar's name has disappeared.

Notes

  • The current sp26-coffee-chat-bingo.csv file of responses actively lives inside the backend folder, I didn't know where else to put it, let me know what the right place to have it stored is!
  • The styling for the coffee chat gray rows of members that have already been chatted with looks a little awkward and not consistent with the rest of styling, but I didn't know how to match the styling. Didn't really know much of the syntax for that either, so I had to ask AI about most of the additions to CSS files.
  • The original idea to include the current user's name in the list of members that fit a certain bingo category if they answered "yes" in the google form (as is stored that way in the csv) would've ended up changing quite a bit of logic, as well as the Firestore collection structure & database schema in drastic ways. Much of that I don't know how to do, and since it seems the whole workflow is based on not having the user included in the list of coffee chat suggestions, I thought it would be better to check with Adrienne if that was a worthwhile pursuit first (it ended up being much more than a simple UI/frontend fix).
  • Extracted the getChattedOtherNetIds function into utils.ts, let me know if that was pointless. Just thought it was easier and more concise.
  • I'm aware that sometimes I'm more concise in my conditionals and sometimes I'm not, a little inconsistent. Will be happy to change any if-else statements into more concise forms (i.e. user of ternary operators, etc) if need be.
  • Implementing these changes often involved combing through other files to see where those changes were reflected & changing other functions/blocks of code to match those changes, becoming very time-consuming. Let me know if I missed anything!

…c changes, new sp26 csv updates + rerun, minor changes to new-dti-website-redesign
@zkdlinyne zkdlinyne requested a review from a team as a code owner March 23, 2026 02:34
@dti-github-bot
Copy link
Copy Markdown
Member

dti-github-bot commented Mar 23, 2026

[diff-counting] Significant lines: 213.

@zkdlinyne zkdlinyne requested a review from ladriennel March 23, 2026 02:35
Copy link
Copy Markdown
Collaborator

@valerie-wong valerie-wong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey! Overall this looks pretty good! I have a few comments. Also, super nit, but the pop up modal has inconsistent X placements based on the width.

Image Image

not a huge issue though!

.reverse()
.filter((response) => {
const netid = response.split(',')[2]?.toLowerCase();
const netid = response.split(',')[2]?.trim().toLowerCase();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question here, the code uses .split(',') to parse CSV fields. If someone's last name for example has a comma it might split incorrectly. Would it be better to use csv-parse or a library to do this maybe?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good idea! I didn't write the .split(',') portion, a previous member did, but it makes sense to cover those edge cases as well. I'll look into it

Copy link
Copy Markdown
Collaborator

@ladriennel ladriennel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Eva! I just left some comments, thanks for being so thorough with making this PR!

return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
}

// const serviceAcc = require('../resources/cornelldti-idol-firebase-adminsdk-ifi28-9aaca97159.json');
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also out of curiosity, did you run the script for the prod and non-prod database? With the current uncommented service account and 'prod' for credentials on line 15, it updates the prod database. To also update the non-prod one (which is better used for testing), just comment out line 12, uncomment line 11 and change 'prod' to 'dev'.

const memberByNetID = new Map(members.map((m) => [m.netid.trim().toLowerCase(), m] as const));

// Update csv path to current semester suggestions
const csv = fs.readFileSync('./scripts/fa25-coffee-chat-bingo.csv').toString();
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be changed to sp26

justify-content: flex-start;
}

.memberDropdownOptionAlreadyChatted {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just a suggestion, but right now the greyed out area on the form doesn't fit the entire row and looks a little compressed since the dropdown already has it's own padding. It might be cleaner if we just change the text color to some grey with color:. We could similarly do that for the modal, so lmk how u think!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's probably a better idea, looks smoother! I'll change

approvedChats.some((chat) => chat.otherMember.netid === member?.netid) ||
pendingChats.some((chat) => chat.otherMember.netid === member?.netid);

const netIdsAlreadyChatted = getChattedOtherNetIds(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that rejectedChats shouldn't be included in being greyed out in the options drop down since they technically have to resubmit and they aren't greyed out in the modal right now.

)
}))}
.map((listMember) => {
const netidKey = listMember.netid?.trim().toLowerCase() ?? '';
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

netids are already typed as not optional for IdolMembers listMember.netid.trim().toLowerCase() should be sufficient. Same for line 108 in CoffeeChatDetailsModal.tsx

<div>Member(s) in category '{category}' you haven't coffee chatted yet:</div>
<div>
Member(s) in category '{category}'{' '}
<span style={{ fontWeight: 'bold' }}>(not including you)</span>
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: you can just use <strong>...</strong> here

@zkdlinyne zkdlinyne requested a review from ladriennel March 26, 2026 17:53
Copy link
Copy Markdown
Collaborator

@ladriennel ladriennel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good Eva, thanks!!

Just 1 nit, but I suggest also changing netidKey to member.netid.trim().toLowerCase() on line 107 in CoffeeChatDetailsModal.tsx to be cleaner.

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.

4 participants