learningequality / learningequality/studio
[QTI] Delay validation messages until the author has engaged with the question
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 191
- Forks
- 307
- Avg merge
- 5d 6h
- Merged PRs (30d)
- 10
Description
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Validation runs on every state change, so a question that has just been created shows its error messages immediately — before the author has had a chance to fill anything in. Validation should keep running as it does; what should change is when its messages are shown. An author should see a message only once they have engaged with the thing it is about, or once they have finished with the question.
Complexity: Medium
Target branch: unstable
Context
Every interaction editor validates on each state change and renders the resulting messages inline — under the question prompt, under an individual answer row, and under the answer list. Because a newly created question is empty, it is also invalid, so the messages are on screen from the moment the card opens.
A question that was saved empty earlier is a different case: its author already had the chance to fill it in, so its messages are not premature.
The Change
Messages should be revealed rather than suppressed — validation still runs, and an author who has engaged with a field still sees what is wrong with it immediately.
For a question created in the current session, each message waits for the author to touch what it is about:
- "Question is required" appears once the question prompt editor has been blurred.
- The answer-list messages — "Choose a correct answer" for choice questions, "At least 2 items are required for an ordering question." for ordering — appear once any answer row's editor has been blurred.
- A row's own messages — the blank and duplicate errors on a choice, an ordering item, or a text entry answer — appear once that row's editor has been blurred.
Closing the question card reveals every message the question has, whether or not anything was touched. Once a message has been revealed it stays revealed while the error lasts.
A question that already existed before the author opened it shows all of its messages from the first render. Only a question created in the current session starts out quiet.
How to Get There
Open a channel for editing and go to /channels/<channel_id>/#/qti-demo. Adding a question exercises the new-question case; the fixture items, which are already saved, exercise the existing-question case.
Acceptance Criteria
- A question created in the current session shows no validation messages when it opens
- "Question is required" appears after the question prompt editor is blurred
- "Choose a correct answer" appears after any answer row's editor is blurred, for choice questions
- "At least 2 items are required for an ordering question." appears after any item row's editor is blurred
- A row's blank and duplicate messages appear after that row's own editor is blurred, and not before — for choices, ordering items and text entry answers
- Blurring one row does not reveal another row's messages
- Closing the question card reveals every message the question has
- A message that has been revealed stays revealed while its error lasts
- A question that existed before the author opened it shows all its messages from the first render
- Tests cover that a newly created question starts with no messages and that each blur reveals the messages it should
AI usage
I used Claude Code to draft this issue. It read the validation strings and interaction editors to confirm the current messages; I defined the reveal behavior and reviewed every section.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open /channels/<channel_id>/#/qti-demo and compare a newly added question with the saved fixture items. Start from the interaction editors and validation strings mentioned in the issue, then exercise prompt, answer-list, row, and close-card interactions. Done means the listed messages appear only after the appropriate blur or close action, and tests cover new versus existing questions.
Written by the indexing model from the issue text.
Assessment
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100