Repository navigation
[Remove Vuetify from Studio] Add StudioContentNodeIcon to channel details Total resources (#5933) - #6385
[Remove Vuetify from Studio] Add StudioContentNodeIcon to channel details Total resources (#5933)#6385vtushar06 wants to merge 2 commits into
Conversation
|
👋 Hi @vtushar06, 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: reviewed Last updated: 2026-11-12 13:14 UTC |
rtibblesbot
left a comment
There was a problem hiding this comment.
PR #6385: the component and the StudioDetailsPanel swap look right. Two suggestions about unknown kinds.
- CI is failing: linting (pre-commit), Javascript tests, Python tests, Container Build, and Build and deploy. The logs did not show the failing step. Please check the linting run first.
- Manual QA did not run. Chip size and colours are unchecked in the browser.
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/utils/colors.js,contentcuration/contentcuration/frontend/shared/utils/icons.js,contentcuration/contentcuration/frontend/shared/views/StudioContentNodeIcon.vue,contentcuration/contentcuration/frontend/shared/views/details/StudioDetailsPanel.vue. - Check that the Total resources icons in channel details match the old chip's size, colour and alignment for every kind, including h5p.
Written by rtibblesbot, an LLM-based coding agent.
| [ContentKindsNames.ZIM]: 'html5', | ||
| // Not a content kind. Base Vuetify uses error_outline; KDS has no such token. | ||
| // Unknown kinds still throw below. | ||
| unsupported: 'error', |
There was a problem hiding this comment.
suggestion: The unsupported pseudo-kind sits in a map shared with Thumbnail.vue and StudioThumbnail.vue. Only the new component uses it. Suggest keeping the h5p mapping here and handling the unsupported fallback in StudioContentNodeIcon (see the comment there). If you keep the key, drop line 16: it restates the throw below.
| }, | ||
| computed: { | ||
| icon() { | ||
| return getContentKindIcon(this.kind, this.isEmpty); |
There was a problem hiding this comment.
suggestion: Any kind outside the map throws here and breaks the render. The kind validator only warns, so it does not stop this. ContentNodeIcon falls back to error_outline instead (shared/vuetify/icons.js:28). Suggest falling back to the unsupported icon for unknown kinds. After that, v-if="icon" on line 4 is always true and can go.
Summary
Removes the Vuetify dependency from the content kind icons in the channel details modal (Total resources section) by adding a Vuetify-free
StudioContentNodeIcon, as a parallel toContentNodeIcon.Changes:
getContentKindColorinshared/utils/colors.js, mapping content kinds to KDS theme colors (tokens.watch/listen/read/practice/explore, andpalette.grey.v_400for folders and unknown kinds)StudioContentNodeIcon(shared/views/StudioContentNodeIcon.vue), built onKIcon+getContentKindIconfromshared/utils/icons.js. Keepscapture-as-imageso the PDF channel summary still rasterises the iconsContentNodeIcon→StudioContentNodeIconinStudioDetailsPanelTotal resources onlyContentNodeIconandshared/vuetify/theme.jsare untouched; no other areas refactoredNotes / open questions:
h5pmaps to thehtml5icon inshared/utils/icons.js.unsupportedmaps to the KDSerroricon (base Vuetify useserror_outline, which KDS does not export). Any other missing kind still throws, andStudioContentNodeIconno longer catches that error.kindandisEmptyprops are carried over;includeText,showColor,fillWidthandsmallaren't used in the details panel so I left them out to keep scope tight. Can add them if wanted for future sub-issuesScreenshots:
Published Channel, dev server,
a@a.com. Background colours match on both sides (exercise#6986f7, audio#ff7f8d, document#ff4324, HTML5#ff7600, video#33acf5). The after chips use KDS icons at a 4px radius instead of Vuetify Material chips at 2px; the kinds, labels, and counts are the same. The clipped Arabic PDF layout is already present onunstable.unstable)remove-vuetify-5933)References
Closes #5933
Sub-issue of #5060
Reviewer guidance
pnpm test colors StudioContentNodeIcon StudioDetailsPanel— 30 tests passa@a.com/a→ Channels > My Channels → info icon on the Published Channel card → check the Total resources iconsAI usage