Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coffee Chat: Suggestions for Categories with No Submissions #680

Merged
merged 14 commits into from
Nov 28, 2024

Conversation

patriciaahuang
Copy link
Contributor

@patriciaahuang patriciaahuang commented Nov 12, 2024

Summary

This PR lists all members who meet a category if there is no submission in that category yet. The members listed won't already have a pending/approved coffee chat with the submitter, and won't be the submitter themselves.

Requires addition of coffee-chat-bingo-board collection, with documents formatted like 'fall-2024' to store boards from multiple semesters. Each document has format category: [{netid: __, name: __}]

Demo

Screen.Recording.2024-11-11.at.7.06.19.PM.mov

Notion/Figma Link

https://www.notion.so/Coffee-Chat-Suggestions-for-Categories-with-No-Submissions-13c0ad723ce1804ab3c0d35531f4112b?pvs=4

@patriciaahuang patriciaahuang requested a review from a team as a code owner November 12, 2024 00:11
@dti-github-bot
Copy link
Member

dti-github-bot commented Nov 12, 2024

[diff-counting] Significant lines: 122.

@andrew032011
Copy link
Collaborator

I see this in the deploy preview:
Screenshot 2024-11-11 at 11 20 19 PM

@@ -172,4 +173,16 @@ export default class CoffeeChatDao extends BaseDao<CoffeeChat, DBCoffeeChat> {
static async deleteMemberProperties(email: string): Promise<void> {
memberPropertiesCollection.doc(email).delete();
}

/**
* Gets a mapping of all categories to corresponding members, given the semester
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a note here that this data could be up to X number of days stale? So changes made to member info or category info aren't immediately reflected here.

Also, how is this data populated initially? It might be good to have a script that refreshes this data once a day.

@andrew032011
Copy link
Collaborator

andrew032011 commented Nov 25, 2024

Screenshot 2024-11-24 at 7 40 04 PM This is what I see in the deploy preview. Is this because the prod DB doesn't have the data populated yet? Maybe get a script together that writes the data, test it on the dev DB, and if you're sure it works (should be safe since it's modifying a collection that's not in use yet), then run that script on the prod DB (let me know if you need help with this last part)?

@andrew032011
Copy link
Collaborator

Screenshot 2024-11-24 at 7 40 04 PM This is what I see in the deploy preview. Is this because the prod DB doesn't have the data populated yet? Maybe get a script together that writes the data, test it on the dev DB, and if you're sure it works (should be safe since it's modifying a collection that's not in use yet), then run that script on the prod DB (let me know if you need help with this last part)?

Also, I think even after you populate the data in the DB, we still might want to change the error handling here. In particular, how about we just don't show any suggestions at all (instead of the loud error) instead of putting up an error modal each time the loading fails?

public static async getCategoryToMembers(semester: string): Promise<BingoBoard> {
const res = APIWrapper.get(`${backendURL}/bingo-board/${semester}`).then((res) => res.data);
return res.then((val) => {
if (val.error) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

We could move this error handling to wherever its used in the UI. I think it should be the UI who gets to decide how to handle this. getCategoryToMembers should just return the promise (could be pending/fulfilled/rejected).

The I might format this function the same way the other ones above are, and just return the promise.

@andrew032011
Copy link
Collaborator

Screenshot 2024-11-26 at 6 12 45 PM Hm, noticed that "a lead (not your role)" isn't showing any suggestions, even though I'd expect at least a few

@patriciaahuang
Copy link
Contributor Author

Screenshot 2024-11-26 at 6 12 45 PM Hm, noticed that "a lead (not your role)" isn't showing any suggestions, even though I'd expect at least a few

Fixed!

@patriciaahuang patriciaahuang force-pushed the coffee-chat-suggestions branch from 5ab3173 to 9aa1a34 Compare November 27, 2024 00:11
@patriciaahuang patriciaahuang merged commit 739b0d2 into main Nov 28, 2024
17 checks passed
@patriciaahuang patriciaahuang deleted the coffee-chat-suggestions branch November 28, 2024 23:41
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.

3 participants