LessonResourceSelectionPage/ContentCardList.vue
component improvements
#11771
Milestone
LessonResourceSelectionPage/ContentCardList.vue
component improvements
#11771
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/LessonResourceSelectionPage/ContentCardList.vue#L81-L84) currently expects a string. This should instead make use of a constant.
Acceptance criteria
View More Button State
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 theviewMoreButtonStates
props validates against those constants to ensure that we always pass only those constants in to that propUpdate
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 theViewMoreButtonStates.hasMore
state is passed in.Update all components using the
ContentCardList
to leverage those new constants when passing as a prop toContentCardList
(looks like only theLessonResourceSelectionPage/index.vue
,CreateExamPage/index.vue
, andCreateExamPage/CreatePracticeQuiz.vue
components will need to be updated.The text was updated successfully, but these errors were encountered: