Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LessonResourceSelectionPage/ContentCardList.vue component improvements #11771

Closed
4 tasks
Tracked by #11741
nucleogenesis opened this issue Jan 23, 2024 · 4 comments · Fixed by #11865
Closed
4 tasks
Tracked by #11741

LessonResourceSelectionPage/ContentCardList.vue component improvements #11771

nucleogenesis opened this issue Jan 23, 2024 · 4 comments · Fixed by #11865
Assignees

Comments

@nucleogenesis
Copy link
Member

nucleogenesis commented Jan 23, 2024

Overview

During content creation we borrowed from previous Lesson resource selection components, namely the ContentCardList component.

This component was last updated 3 years ago, so there are a few rough edges that we'd like to smooth out for a more consistent developer interface to the component.

The viewMoreButtonState [prop](https://github.com/learningequality/kolibri/blob/66589c69dd0c59c443acf33e54a062ff89af99d7/kolibri/plugins/coach/assets/src/views/plan/LessonResourceSel
ectionPage/ContentCardList.vue#L81-L84) currently expects a string. This should instead make use of a constant.

Acceptance criteria

View More Button State

  • Create and export a new object from the coach/.../constants/index.js file called ViewMoreButtonStates. This should be formatted similarly to how the others are in that file.

The object should handle the following states:

  • Loading (previously waiting)

  • Has more (previously indicated by not passing the specific strings for loading / not having more)

  • No more

  • Error

  • Update ContentCardList so that the viewMoreButtonStates props validates against those constants to ensure that we always pass only those constants in to that prop

  • Update ContentCardList so that it no longer depends on there not being errors to show the button, but rather that it will show the button when the ViewMoreButtonStates.hasMore state is passed in.

  • Update all components using the ContentCardList to leverage those new constants when passing as a prop to ContentCardList (looks like only the LessonResourceSelectionPage/index.vue, CreateExamPage/index.vue, and CreateExamPage/CreatePracticeQuiz.vue components will need to be updated.

@nucleogenesis nucleogenesis changed the title The LessonResourceSelectionPage/ContentCardList.vue component could use some improvements - namely we should make use of some constants for the values expected for the viewMoreButtonState prop (see this) LessonResourceSelectionPage/ContentCardList.vue component improvements Jan 23, 2024
@GarvitSinghal47
Copy link
Contributor

@nucleogenesis @MisRob i would like to work on this , if its up for contribution.

@nucleogenesis
Copy link
Member Author

@GarvitSinghal47 apologies for my delay replying here - let us know if you're still interested and we'll assign you.

@GarvitSinghal47
Copy link
Contributor

Yes @nucleogenesis I am still interested in working on it .

@MisRob
Copy link
Member

MisRob commented Feb 12, 2024

Thank you, @GarvitSinghal47.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants