-
Notifications
You must be signed in to change notification settings - Fork 788
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 new questions replacement #13180
base: develop
Are you sure you want to change the base?
Implement new questions replacement #13180
Conversation
28d90b4
to
6681c36
Compare
Build Artifacts
|
@pcenov and @radinamatic this will be a top priority for testing tomorrow - i'll be starting code review now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't see anything blocking - just added a question. Overall the code LGTM, but will leave approval to the assigned reviewers
@@ -115,7 +126,24 @@ export default function useQuizCreation() { | |||
}); | |||
} | |||
|
|||
function addQuestionsToSectionFromResources({ sectionIndex, resourcePool, questionCount }) { | |||
function _insertItemsAt(baseArray, itemsToInsert, index) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you consider using splice
instead of making a function? For whatever is passed in as baseArray
you could do baseArray.splice(index, 0, itemsToInsert)
- although it does mutate the array in place.
Not blocking as this looks good overall and I see you're doing checks on the passed index as well, it just got me thinking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh I didnt 😅. I just refactored the function to use the splice
making a copy of the baseArray
instead and it looks so much cleaner. Thanks @nucleogenesis!
options-not-working.mp4
replaced.or.not.mp4
add.0.mp4
the.button.remains.disabled.mp4 |
Ah my apologies, I somehow messed things up with the version control and it seems that some changes were reverted 😅. Just pushed again the fix for 1 and 3. For point 2: It wasnt supposed to be visible the bulk replace icon anymore. Now we can replace one question at a time. Knowing this, as a user, do you think that replacing one question with multiple quesitons is confusing? This is something we are still evaluating. Points 4 and 5 are things that we can evaluate from the design perspective cc: @marcellamaki @jtamiace. Just fyi: The reason why we cant save the selected resource in point 5 is because when we uncheck the manual selection mode, we set the number of questions to select to the default value: 10. And if the current resource doesnt have 10 available questions, then it will wait for another resource to be selected until we have 10 available questions in the pool. But we dont communicate this in any way, and I think for the question replacement workflow is a little more confusing because the users never see the questions number input because we dont open the modal in the settings page. |
Thanks @AlexVelezLl - I confirm that 1 is fixed now. I was also able to identify the following issues: nquestionselected.mp4 |
Hi @pcenov! Now I have fixed all the poings but 6 and 7. Point 2 has been solved by setting a the max amount of questions to select equals to the number of questions being replaced, and we have added again the "replace" button in the bulk toolbar. For point 5, now the user dont have a way to switch to random selection, so this shouldnt happen anymore in questions replacement :) |
ca7acec
to
821d1e1
Compare
821d1e1
to
806a208
Compare
Summary
Compartir.pantalla.-.2025-03-10.13_25_40.mp4
References
Closes part of #13108, auto-replace is out of scope of this PR
Reviewer guidance