kolibri icon indicating copy to clipboard operation
kolibri copied to clipboard

feat(QTI): Refine the prototyped choice interactions

Open habibayman opened this issue 5 months ago • 3 comments

Summary

This PR brings the choice interaction prototype closer to the QTI design spec by adding the answer-guide prompt, improving visual parity with the mockups, and strengthening theming and RTL support.

As part of the theming work, hardcoded colors were replaced with KDS theme tokens. SimpleChoice.vue uses JS-driven style bindings, while ChoiceInteraction.vue exposes theme values through CSS custom properties due to its global styling approach.

The PR also introduces the answer-guide prompt shown above the choice list through a small composable and dedicated component. While implementing it, I fixed a few visual inconsistencies, including the checkmark glyph and shape, layout issues in qti-input-control-hidden mode, and default

    styling that was affecting alignment.

    Finally, physical CSS properties were replaced with logical ones to support RTL layouts, and test coverage was expanded for both the new answer-guide behavior and selected-state styling.


    References


    Reviewer guidance

    Navigate to http://localhost:8000/en/learn/#/qti_sandbox and try all the examples from the sandbox and make sure they match the figma spec.

    Visuals

    Case Screenshot
    qti-labels-none image
    qti-labels-decimal image
    qti-labels-lower-alpha image
    qti-labels-upper-alpha image
    qti-labels-suffix-none image
    qti-input-control-hidden image
    stacking image
    multiselect custom stacking image

    AI usage

    I used claude code to do most of the style only updates and verified they match the figma.

    habibayman avatar Jun 18 '26 20:06 habibayman

👋 Hi @habibayman, thanks for contributing!

For the review process to begin, please verify that the following is satisfied:

  • [ ] Contribution is aligned with our contributing guidelines

  • [ ] Pull request description has correctly filled AI usage section & follows our AI guidance:

    AI guidance

    State explicitly whether you didn't use or used AI & how.

    If you used it, ensure that the PR is aligned with Using AI as well as our DEEP framework. DEEP asks you:

    • Disclose — Be open about when you've used AI for support.
    • Engage critically — Question what is generated. Review code for correctness and unnecessary complexity.
    • Edit — Review and refine AI output. Remove unnecessary code and verify it still works after your edits.
    • Process sharing — Explain how you used the AI so others can learn.

    Examples of good disclosures:

    "I used Claude Code to implement the component, prompting it to follow the pattern in ComponentX. I reviewed the generated code, removed unnecessary error handling, and verified the tests pass."

    "I brainstormed the approach with Gemini, then had it write failing tests for the feature. After reviewing the tests, I used Claude Code to generate the implementation. I refactored the output to reduce verbosity and ran the full test suite."

Also check that issue requirements are satisfied & you ran pre-commit locally.

Pull requests that don't follow the guidelines will be closed.

Reviewer assignment can take up to 2 weeks.

learning-equality-bot avatar Jun 18 '26 20:06 learning-equality-bot

@rtibbles I added screenshots for multiple scenarios -- I hope that covers all of them!

habibayman avatar Jun 26 '26 03:06 habibayman