learningequality / learningequality/studio
[Remove Vuetify from Studio] Create StudioContentNodeIcon and use it channel details modal
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
ContentNodeIcon is implemented with several Vuetify components. Remove Vuetify dependencies by creating a new component StudioContentNodeIcon as a parallel to ContentNodeIcon with no Vuetify dependencies, a supporting utility getContentKindColor, and finally use StudioContentNodeIcon on channel details page.
Complexity: Medium
Context
Channel details modal
| Browser | |
|---|---|
The Change
(1) Create StudioContentNodeIcon and getContentKindColor
Icon
- Uses
KIconto render the icon - Uses
getContentKindIcon(shared/utils/icons.js) to determine the icon based on content node kind
Background color
- Create a new utility
getContentKindColorinshared/utils/colors.js- Based on content node kind, determines background color (see how kinds map to KDS colors in this shared/vuetify/theme.js)
- (will be useful for another future tasks too)
Do not modify ContentNodeIcon. Do not modify or use shared/vuetify/theme.js.
(2) Use StudioContentNodeIcon in channel details modal
Use StudioContentNodeIcon for icons in the Total resources section of the channel details modal. Ensure no regressions in the generated PDF (test whether if capture-as-image needs to be added to KIcon or not).
Do not refactor any other areas of the codebase.
How to Get There
- Login as
a@a.comwith passworda - Go to Channels > My Channels
- Click the info icon on the Published Channel card
- To generate PDF, click Download channel summary > Download PDF
Guidance
- Find detailed guidance with many code examples in KDS documentation
- Read the project for more useful references
Out of Scope
- Do not modify or use
shared/vuetify/theme.js - Do not modify
ContentNodeIcon - Do not refactor any other areas of the codebase
Expected UI/UX changes
- Minor visual differences naturally stemming from the use of KDS
Acceptance Criteria
These are general acceptance criteria for the project. For each sub-issue, consider which are relevant.
General
- The specification above is followed.
- Except for "Expected UI/UX changes," there are no functional or visual differences in user experience.
- There are no regressions in the printing preview
- There are no
::v-deepor/deep/selectors. - All user interactions are manually tested with no regressions.
- Pull request includes screenshots.
a11y and i18n
See the project's "Guidance" for useful references.
- Implementation meets a11y standards
- All components are LTR and RTL compliant (preview with
pnpm run devserversince:hotdoesn't render RTL properly) - All user-facing strings are translated properly
- The
notranslateclass been added to elements that shouldn't be translated by Google Chrome's automatic translation feature (e.g. user-generated text) - Mobile experience is reasonable
Unit tests
- If there is a unit test suite already, it is meaningfully updated (even if tests don't fail)
- If there is no unit test suite, a new one is created. Do not use obsolete
@vue/test-utilsapproach. Instead, use@testing-library/vue(Vue Testing Library).
References
Sub-issue of https://github.com/learningequality/studio/issues/5060
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
Start by reading ContentNodeIcon and shared/utils/icons.js, then inspect shared/vuetify/theme.js only to understand the existing content-kind color mappings. Locate the channel details modal and verify the Total resources icons and generated PDF flow. Done means the modal uses the new component, the color utility is added without changing ContentNodeIcon or theme.js, and browser and PDF output have no regressions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100