You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Three QTI interaction editors emit update:interaction when they mount or switch into edit mode, even though nothing has changed. AssociateInteractionEditor.vue was changed in #6113 to emit only on a real content change; the others still push a rebuilt interaction block at the parent just for being opened.
Complexity: Low Target branch: unstable
Context
ChoiceInteractionEditor.vue:382 — { immediate: true }, no mode gate: emits on mount in any mode.
OrderingInteractionEditor.vue:309 — the props.mode watcher emits on entering edit mode.
TextEntryEditor.vue:338-350 — { immediate: true }; gated on edit mode, still emits on mount.
All three watch a computed that rebuilds a fresh object on every state change, so an edit producing identical XML still emits.
Each editor should emit update:interaction only in edit mode, and only when the rebuilt bodyXml / responseDeclarations differ by value from what it last emitted.
Opening an editor, switching mode, or retyping identical content should produce no emit.
Acceptance Criteria
Choice, ordering, and text entry editors do not emit update:interaction on mount.
None of the three emit when mode changes without a content change.
None of the three emit when a state change rebuilds identical bodyXml and responseDeclarations.
Each still emits after an edit that changes the built XML.
Specs asserting emit-on-mount are updated, and the no-emit cases are covered by new tests.
AI usage
Written by Claude Code while addressing review feedback on #6113. The reviewer asked for this emit behaviour on the associate editor; I grepped the other interaction editors for the same pattern, confirmed each line reference above by reading the code, and filed this rather than widening that PR.
❌ This issue is not open for contribution. Visit Contributing guidelines to learn about the contributing process and how to find suitable issues.
Overview
Three QTI interaction editors emit
update:interactionwhen they mount or switch into edit mode, even though nothing has changed.AssociateInteractionEditor.vuewas changed in #6113 to emit only on a real content change; the others still push a rebuilt interaction block at the parent just for being opened.Complexity: Low
Target branch: unstable
Context
ChoiceInteractionEditor.vue:382—{ immediate: true }, no mode gate: emits on mount in any mode.OrderingInteractionEditor.vue:309— theprops.modewatcher emits on entering edit mode.TextEntryEditor.vue:338-350—{ immediate: true }; gated on edit mode, still emits on mount.AssociateInteractionEditor.vueis the reference shape after Add the QTI associate interaction plugin #6113.The Change
update:interactiononly in edit mode, and only when the rebuiltbodyXml/responseDeclarationsdiffer by value from what it last emitted.Acceptance Criteria
update:interactionon mount.modechanges without a content change.bodyXmlandresponseDeclarations.AI usage
Written by Claude Code while addressing review feedback on #6113. The reviewer asked for this emit behaviour on the associate editor; I grepped the other interaction editors for the same pattern, confirmed each line reference above by reading the code, and filed this rather than widening that PR.