learningequality / learningequality/studio
Add summary cards to admin channels table view
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
In the scope of this issue, we will add three cards on top of the channels table to show a summary of the public and community library channels.
The three cards will show:
- How many channels are public.
- How many channels are live in the community library.
- How many channels have a Pending Community Library Submission.
- How many channels have a "Flagged for Review" Community Library Submission.
Technical details
- We will need to create a new endpoint to retrieve all this information from the backend. The proposed way is to create a new
summaryget action on the AdminChannelViewset. This endpoint will return a JSON containing the four counters- The
pendingandflaggedcounters will only take into account the latest community library submission of each channel. - Unit tests should be added for this new action.
- The
// GET /api/admin-channels/summary - 200
{
"public_count": 109,
"community_library_live_count": 75,
"community_library_pending_count": 16,
"community_library_flagged_count": 23
}
- The ChannelTable component will need to be modified to introduce the three cards between the channels count node and the channels filters.
- The first card will show the number of current public channels. The second card will show the number of live channels in the community library, and the third card will show how many channels have their latest community library status pending, and how many are flagged for review.
- If the user clicks on the title or on the arrow button, the corresponding filters will be applied:
- For public channels -> Channel type: Kolibri Studio Library, Channel Status: Live
- For live Community Library channels -> Channel type: Community Library, Channel Status: Live
- For needs review Community Library channels -> Channel type: Community Library, Channel Status: needs review
- The summary information will only be loaded on the component creation hook, and should have a loading state independent of the main channels list
- Unit tests should be added to test the filters appliance when clicking on the card buttons.
- The first card will show the number of current public channels. The second card will show the number of live channels in the community library, and the third card will show how many channels have their latest community library status pending, and how many are flagged for review.
Acceptance criteria
- A new summary endpoint is created on the admin channels viewset.
- The Channels Table page now shows the described summary information of the channels.
- Summary cards apply the corresponding filters on click.
- Unit tests have been added.
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 with the summary action location in contentcuration/contentcuration/viewsets/channel.py and the ChannelTable component in contentcuration/contentcuration/frontend/administration/pages/Channels/ChannelTable.vue. Read the existing admin channel API and component tests before adding coverage for the summary response and card filters. Done means the endpoint returns the four counters, the cards display them with independent loading, and clicking their controls applies the specified filters.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, python
- Domain
- api, full-stack, testing
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 20/100