Repository navigation
Replace CategoryOptions VAutocomplete with KMultiSelect expanded mode - #6386
AradhyaTiwari10 wants to merge 4 commits into
Conversation
Replaces the Vuetify autocomplete and the hand-rolled always-open list with KMultiSelect's expanded prop (KDS 5.10.0). Closes learningequality#6346.
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.
|
👋 Hi @AradhyaTiwari10, thanks for contributing! For the review process to begin, please verify that the following is satisfied:
📢✨ Before we assign a reviewer:
Also check that issue requirements are satisfied & you ran Pull requests that don't follow the guidelines will be closed. Reviewer assignment can take up to 2 weeks. |
🟡 Waiting for changesOutcome: skipped — no new commits since Last updated: 2026-11-14 23:12 UTC |
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6386: no blocking issues. CI passing. Manual QA did not complete.
- suggestion: removing the last full category wipes partial ones.
- suggestion: expanded-mode parent state changed; note it in the PR body.
- suggestion: two tests miss what they claim.
- nitpick: docstring repeats the code.
- pre-existing: with mixed categories,
EditBooleanMapModal.vue:193never saves removals or clear-all. Fix here, or in a follow-up?
Next step: Needs a full code review by a human engineer, then manual QA once that reviewer sets Needs QA.
- The author is outside the team: confirm this should be built at all.
- User-visible files changed:
contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue. - Confirm that a parent with a selected child should show as partly selected in expanded mode, not checked as it was before.
- Decide whether the
EditBooleanMapModalmixed-categories save bug gets fixed here, since the clear-on-empty handling only stays safe while that bug exists. - In the Edit categories modal, check that the list is open without focus, and that chip removal and clear-all work with several nodes selected.
Written by rtibblesbot, an LLM-based coding agent.
| itemValue="value" | ||
| itemText="text" | ||
| :label="translateMetadataString('category')" | ||
| :autoPromoteParent="false" |
There was a problem hiding this comment.
suggestion: In expanded mode, a parent with a selected child now shows as partly selected instead of checked.
- On
unstable, Arts showed checked when Dance was selected. Clicking Arts removed both. - Now Arts shows "Partially selected". Clicking it adds Arts and keeps Dance.
- Gone too: a parent showed checked when its partly applied children together covered every node.
This matches dropdown mode, but the issue asked for unchanged expanded behaviour. List it in the PR body for a reviewer to confirm.
There was a problem hiding this comment.
Documented in the PR body as a behaviour change for the reviewer to confirm. KMultiSelect has no mode that shows a parent as checked because a child is selected, so matching the old list exactly would mean re-implementing the list outside KMultiSelect, which is what this PR removes. Happy to add a parent-promotion rule if the team wants the old reading back.
Route chip removal through the component so an empty KMultiSelect value can be told apart from clear-all; only clear-all wipes partially applied categories. Tests no longer focus the field before reading the inline list, the duplicate tooltip test is dropped, and a regression test covers last-chip removal.
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6386: removing a category can still wipe categories that only some selected nodes have (inline). Two of three prior suggestions are still open. The docstring nitpick is resolved. CI passes. Manual QA didn't run. Commits pushed after 1319e6a weren't reviewed.
- The chip-click fix works. Its test fails without the fix.
- Still open from the last round, with no change or reply. Please fix each or reply with why not:
- A parent with a selected child shows as partly selected (
CategoryOptions.vue:9). findByText(DANCE_PATH)matches the path anywhere on the page (categoryOptions.spec.js:204).
- A parent with a selected child shows as partly selected (
Prior-finding status
UNADDRESSED — CategoryOptions.vue:137 — removing the last fully applied category clears partly applied ones (fixed for chip clicks only)
UNADDRESSED — CategoryOptions.vue:9 — parent with a selected child shows as partly selected instead of checked
RESOLVED — categoryOptions.spec.js — test clicks first, so it doesn't prove the list shows without focus
UNADDRESSED — categoryOptions.spec.js:204 — findByText(DANCE_PATH) matches the path anywhere on the page
RESOLVED — CategoryOptions.vue — docstring repeats the code
Next step: Needs a full code review by a human engineer, then manual QA once that reviewer sets Needs QA.
- The author is outside the team: confirm this should be built at all.
- User-visible files changed:
contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue. - Decide whether clear-all should keep wiping partly applied categories, which needs a KDS event, or remove only the visible chips.
- In the multi-node edit modal, check that Backspace, unchecking an item and the chip × each keep categories that only some nodes have.
Written by rtibblesbot, an LLM-based coding agent.
|
Thanks. Pushed 1319e6a and 80eb8f8: chip removal now goes through onChipRemove so an empty value can be told apart from clear-all (the previous.length > 1 heuristic broke clear-all with a single chip plus partials, so the chip slot is used instead), with a regression test; the three tests read the inline list with findByRole without focusing the field; the duplicate tooltip test is dropped; docstring trimmed. The parent-state change and the EditBooleanMapModal save bug are listed in the PR body; I can take the modal fix as a follow-up if the reviewer prefers it separate. |
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6386: 3 of 6 prior findings are resolved. 3 suggestions are still open and unchanged since the last round:
CategoryOptions.vue:9: in expanded mode, a parent with a selected child shows as partly selected, not checked. Fix it, or reply on its thread.CategoryOptions.vue:137: Backspace, or unchecking the last category, still clears partly applied categories. Fix it, or reply on its thread.categoryOptions.spec.js:204:findByText(DANCE_PATH)passes if the path renders anywhere on the page. Fix it, or reply on its thread.
CI passing. Manual QA did not run.
Prior-finding status
RESOLVED — CategoryOptions.vue — removing the last fully applied category clears every partly applied one
RESOLVED — categoryOptions.spec.js — test clicks first, so it doesn't prove the list shows without focus
RESOLVED — CategoryOptions.vue — docstring's second sentence repeats the code
UNADDRESSED — CategoryOptions.vue:9 — parent with a selected child shows as partly selected
UNADDRESSED — CategoryOptions.vue:137 — Backspace and unchecking the last category wipe partly applied categories
UNADDRESSED — categoryOptions.spec.js:204 — findByText(DANCE_PATH) passes if the path renders anywhere
Next step: Needs a full code review by a human engineer, then manual QA once that reviewer sets Needs QA.
- The author is outside the team: confirm this should be built at all.
- User-visible files changed:
contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue. - Decide whether a parent with a selected child should show as checked or partly selected in the expanded list.
- Decide whether Backspace or unchecking the last category should keep categories that only some of the edited nodes have.
- In the multi-node edit modal, check that the expanded category list, the chip tooltips and chip removal behave correctly.
Written by rtibblesbot, an LLM-based coding agent.
KMultiSelect emits an empty value for clear-all, chip removal, Backspace in an empty search field and unchecking the last option alike. The clear button's click is now noted in the capture phase and only that path clears everything; every other empty value is treated as an ordinary removal, so categories applied to some of the edited nodes survive, as on unstable. Tests cover the uncheck and Backspace paths; the expanded-mode tooltip test duplicated the dropdown one and is removed.
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6386: 5 of 6 prior findings resolved; 1 contested.
- CategoryOptions.vue:9 — a parent with a selected child shows as partly selected instead of checked. The author says KMultiSelect can't show it as checked. The PR body lists it as a behaviour change. A maintainer needs to accept it or ask for a parent-promotion rule.
CI passing. Manual QA did not run.
Prior-finding status
RESOLVED — CategoryOptions.vue — Removing the last fully applied category also clears every partly applied one
RESOLVED — categoryOptions.spec.js — Test clicks first, so it doesn't prove the list shows without focus
RESOLVED — CategoryOptions.vue — Docstring's second sentence repeats the code
RESOLVED — CategoryOptions.vue — Backspace and unchecking the last category still wipe partly applied categories
RESOLVED — categoryOptions.spec.js — findByText(DANCE_PATH) passes if the path renders anywhere on the page
CONTESTED — CategoryOptions.vue:9 — Parent with a selected child shows as partly selected instead of checked
Next step: Needs a full code review by a human engineer, then manual QA once that reviewer sets Needs QA.
- The author is outside the team: confirm this should be built at all.
- User-visible files changed:
contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue. - Decide whether a parent with a selected child showing as partly selected, not checked, is acceptable.
- In the edit modal, check that the clear button, chip close, uncheck and Backspace each keep or drop partly applied categories as intended.
Written by rtibblesbot, an LLM-based coding agent.
|
@LianaHarris360 this is ready for a human review: KMultiSelect expanded mode for CategoryOptions, 18 tests green, and the pre-reviewer's points about partially applied categories are addressed (only the clear button wipes them now). One behaviour change is listed in the description for you to confirm: a parent with a selected child shows as partially selected rather than checked, which matches dropdown mode. |
Summary
CategoryOptionsused a VuetifyVAutocompletefor the dropdown and, in the edit modal's expanded mode, a hand-rolled always-open list. Both are replaced with KDS 5.10.0KMultiSelect; the modal uses itsexpandedprop: the option list renders inline under the search field with no menu toggle (listMaxHeight250px), chips show the full category path in a tooltip and have a remove button, and clear-all is kept. Selection semantics are unchanged: adding a category applies it to every edited node, removing a chip also drops its stored descendants, categories applied to only some nodes stay partial, clear removes everything. No Vuetify left in the component.References
Closes #6346
Reviewer guidance
pnpm exec jest --config jest_config/jest.conf.js categoryOptions- 17 pass. The 9 dropdown-mode tests are untouched; the expanded-mode tests were rewritten for KMultiSelect (inline list, filtering, no-results text, selection applied to all nodes, partial kept, chip removal with descendants, last-chip removal keeping partials, clear-all).findByRole.[]for both. Chip removal is routed throughonChipRemove, so only clear-all wipes partially applied categories (regression test added).EditBooleanMapModal.vue:193does not save removals or clear-all when categories are mixed across nodes. Happy to do that as a follow-up.AI usage
Written with an AI coding agent (Claude Code). I directed the change, reviewed it against the KMultiSelect API and ran the tests and kolibri-format locally.