Conversation
…c changes, new sp26 csv updates + rerun, minor changes to new-dti-website-redesign
|
[diff-counting] Significant lines: 213. |
| .reverse() | ||
| .filter((response) => { | ||
| const netid = response.split(',')[2]?.toLowerCase(); | ||
| const netid = response.split(',')[2]?.trim().toLowerCase(); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
ladriennel
left a comment
There was a problem hiding this comment.
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'); |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
This can be changed to sp26
| justify-content: flex-start; | ||
| } | ||
|
|
||
| .memberDropdownOptionAlreadyChatted { |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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( |
There was a problem hiding this comment.
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() ?? ''; |
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
nit: you can just use <strong>...</strong> here
ladriennel
left a comment
There was a problem hiding this comment.
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.


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
Populate-coffee-chat-suggestions.ts Script
New-dti-website-redesign minor tweaks
Test Plan
To test:
Notes