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

EQM: Sections for quiz detail page #12384

Merged

Conversation

nucleogenesis
Copy link
Member

Summary

Updates the quiz preview/details page to allow for quiz question navigation w/ sections.

Imitates the mobile experience made for reports, but simplified as the UI is only for navigation.

This results in an accordion on > small screens, and two KSelects on small screens.


Tech Debt

There is a need to extract some of this logic out and improve the architecture of how we use accordions altogether and how we manage sections & questions for UI and navigation. This introduces some duplicate code but, along with some improvements to the Accordion components altogether.

Comments & suggestions here are greatly welcome, as I'll create a follow-up issue to this effect.

References

Fixes #12288

Reviewer guidance

Please see and test:

  • Quiz detail (click the name of the quiz on the Coach -> Plan -> Quizzes page)
  • Quiz reports (click to see a learner's report for a quiz)

For:

  • Quiz with one section
  • Quiz with multiple sections (only name some of them to be sure our default name is applied as needed -- a la "Section 2"...)

@github-actions github-actions bot added APP: Coach Re: Coach App (lessons, quizzes, groups, reports, etc.) DEV: frontend labels Jul 1, 2024
@@ -153,8 +153,8 @@
displaySectionTitle,
enhancedQuizManagementStrings,
} from 'kolibri-common/strings/enhancedQuizManagementStrings';
import { coreStrings } from 'kolibri.coreVue.mixins.commonCoreStrings';
Copy link
Member Author

Choose a reason for hiding this comment

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

Can't use import coreStrings from 'kolibri.utils.coreStrings from here

Copy link
Member Author

Choose a reason for hiding this comment

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

This is outdated but I get errors on my end locally without changing the import here.

Comment on lines +432 to +444
.question-button {
width: 100%;
height: 100%;
padding: 0.5em;

&:hover {
background-color: white;
}

&.selected {
background-color: white;
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

A bit of a stop-gap, just wanted to get this PR made, will include notes on this in a tech-debt follow-up

import AccordionItem from 'kolibri-common/components/AccordionItem';
import AccordionContainer from 'kolibri-common/components/AccordionContainer';
import coreStrings from 'kolibri.utils.coreStrings';
import { annotateSections } from 'kolibri.utils.exams';
Copy link
Member Author

Choose a reason for hiding this comment

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

I appreciate this. I was thinking something along these lines earlier today but decided to just barrel ahead to get things done. If only I'd rebased earlier😭

@nucleogenesis nucleogenesis changed the title Fix sectionallthethings EQM: Sections for quiz detail page Jul 1, 2024
Copy link
Member

@rtibbles rtibbles left a comment

Choose a reason for hiding this comment

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

Code wise, this all makes sense. No manual testing yet.

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.

The basic functionality here seems to work in manual QA, although (as we discussed on slack) it's not really an ideal experience with the layout. I think that's okay for now and it's worth merging in for Radina and Peter to do more robust testing and see if they have any ideas of small improvements we could make in the short term.

Otherwise, I only have one notable probably-blocker. I am testing with the dev tools not on actual mobile device, but what I'm noticing is that the KSelect goes up and that you can't scroll within it quite all the way? There's some amount of scrolling that works, but some of the question items are cut off, and even when I do scroll, I can't get to those questions < 4 depending on the position of the popover. It may be a pre-existing issue to KSelect and this is just an odd manifestation of it, but I think it's worth at least like a "is this fixable in 30 minutes" troubleshooting, if possible. If it's a KDS level problem, it doesn't have to block this PR

scrolling.mp4

@marcellamaki marcellamaki dismissed their stale review July 4, 2024 00:04

Created a follow up issue for the KSelect related problem, somewhat out of scope

@marcellamaki marcellamaki merged commit 31f4504 into learningequality:develop Jul 4, 2024
30 checks passed
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.

Update coach report UI to properly reflect sections
3 participants