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

feat: add question selection #50

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jakecastelli
Copy link

@jakecastelli jakecastelli commented Jul 7, 2023

Server changes:

  • Added Questions to QuestionFilterKind, if the filterKind is Questions, the
    selections will be an array of title-slug. First we need to find the questions
    by title slug, the rest are remaining the same, basically a copy and paste from the
    exisiting "Topics" logic, potentially can be refactored.

  • Added question router and two endpoints, one for search a specific question by
    search term, the other one will randomly return 20 questions for the user to
    pick.

Client (extension) changes:

  • Added a new Tab called Questions, added search functionality which is server
    side search, each time the server will return the most relevant 5 results.

  • If the user chooses Questions over Topics, then the question title slug will be
    saved into RoomSetting.questionFilter.selections.

  • Added questions type to QuestionFilter in order to display the questions again
    when setting modal is reopened.

  • The user can max select 4 questions, which is the same as current behaviour.

Added Questions to QuestionFilterKind, if the filterKind is Questions, the
selections will be an array of title-slug, first we need to find the questions
by slug, the rest are remaining the same, basically a copy and paste from the
exisiting "Topics" logic, potentially should be refactored.

Added question router and two endpoints, one for search a specific question by
search term, the other one will randomly return 10 questions for the user to
pick.

Fixes: marwanhawari#4
Added a new Tab called Questions, added search functionality which is server
side search, each time the server will return the most relevant 5 results.

If the user chooses Questions over Topics, then the question title slug will be
saved into `RoomSetting.questionFilter.selections`.

Added questions type to QuestionFilter in order to display the questions again
when setting modal is reopened.

The user can max select 4 questions, which is the same as current behaviour.

Fixes: marwanhawari#4
@github-actions github-actions bot added extension A label for the LeetRooms web extension code server A label for the LeetRooms server code labels Jul 7, 2023
@jakecastelli jakecastelli changed the title Add Select questions feature feat: add question selection Jul 7, 2023
}
);
if (!response.ok) {
throw new Error("Failed to fetch current players");
Copy link
Author

Choose a reason for hiding this comment

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

fix(jake): need to change this, probably refactor the whole queryFn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension A label for the LeetRooms web extension code server A label for the LeetRooms server code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant