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

Implement manual questions selection workflow #13091

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from

Conversation

AlexVelezLl
Copy link
Member

@AlexVelezLl AlexVelezLl commented Feb 18, 2025

Summary

  • Implement manual questions selection workflow
  • Integrate questions shopping cart into quizzes.
  • Refactor questionsAccordion to handle basic selection logic within the component itself instead of it being handled in useQuizCreation
  • Disable selection of resources whose questions are all already in the quiz.
Compartir.pantalla.-.2025-02-18.12_51_12.mp4

References

Closes #13034

Reviewer guidance

  1. Create a new quiz, and select "Choose questions manually"
  2. Select/deselect questions from bookmarks or channels resources.
  3. Check that the whole flow match the figma specs.
  4. Play with selection/deselection in the shopping cart, ensuring that all behaviours are consistent
  5. Save questions and check that they were created successfully.
  6. Play with resource selection in quizzes and lessons to check that no regressions have been introduced.

Note

This PR isnt introducing yet the "switching modes" logic. So any flow that involves swiching modes from manual selection to random selection will have an inconsistent behaviour.

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Feb 18, 2025
@AlexVelezLl AlexVelezLl force-pushed the manual-selection-workflow branch from d7b2892 to 0c9f5ee Compare February 18, 2025 20:07
@AlexVelezLl AlexVelezLl force-pushed the manual-selection-workflow branch from 0c9f5ee to 95ae8d6 Compare February 19, 2025 16:38
@pcenov
Copy link
Member

pcenov commented Feb 20, 2025

Hi @AlexVelezLl, looks great in general but I have the following questions/notes:

  1. By looking at the specs in Figma I was left under the impression that if I go into manual selection mode, then I should be able to add up to 25 questions per section or any number of questions less than that. In the current build I have to select exactly the specified number of questions in the "Number of questions" field, which is a bit restraining:
up.to.25.questions.mp4
  1. If I have already added the max number of allowed questions, when I modify the settings to indicate a lesser number, then I am seeing a puzzling combination of a message text "You cannot select more than 3 questions" next to a disabled button labeled "Add 3 questions". I think this issue should get sorted out by fixing point 1, but noting it here just in case.
you-shall-not-pass.mp4

@AlexVelezLl
Copy link
Member Author

Hi @pcenov. Just looked at the figma again and yes, it was an overlooked on our part, we didnt notice the disabled text input. And yes, point 2 wont be an issue after fixing point 1. Will work on this, thanks!

@AlexVelezLl
Copy link
Member Author

Hey @pcenov, I just pushed some changes for this, could you take another look, please? 👐

Copy link
Member

@pcenov pcenov left a comment

Choose a reason for hiding this comment

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

Thanks @AlexVelezLl - LGTM now!

Copy link
Member

@marcellamaki marcellamaki left a comment

Choose a reason for hiding this comment

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

This looks so great @AlexVelezLl and @ozer550! Thanks for the team effort here. I added just a few comments, but nothing blocking. Since I'm a little less focused today, I want to do one final read through before I approve on Monday, just for the sake of being thorough, but I don't anticipate any issues coming up and I think we'll be able to get this merged early on Monday. Thanks again!

workingQuestions.value = uniqWith([...workingQuestions.value, ...questions], isEqual);
if (!workingResourcePool.value.find(r => r.id === resource.id)) {
addToWorkingResourcePool([resource]);
Copy link
Member

Choose a reason for hiding this comment

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

So this is, for now, how we are managing having "replacement questions" in the resource pool, right? For question swapping?

? selectQuiz$()
: addNumberOfQuestions$({ count: Math.max(1, settings.questionCount) })
"
:text="saveButtonLabel"
Copy link
Member

Choose a reason for hiding this comment

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

such a nice small cleanup 😅

@@ -131,10 +132,13 @@
props.setContinueAction(null);
});

const questionCountIsEditable = computed(() => !props.settings.isChoosingManually);
Copy link
Member

Choose a reason for hiding this comment

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

This is non-blocking, but I'm having a little difficulty wrapping my head around what the question count being editable means here. Why would not choosing manually impact the user's ability to adjust the number of questions? It probably makes sense, and I know that there are only so many variable name possibilities. I'm just a but stuck trying to reason through the relationship here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add "manual selection" quiz building workflow UI
4 participants