learningequality / learningequality/studio

Add summary cards to admin channels table view

Open
#5,454 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P1 - important
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.

Image

The three cards will show:

  1. How many channels are public.
  2. How many channels are live in the community library.
  3. How many channels have a Pending Community Library Submission.
  4. How many channels have a "Flagged for Review" Community Library Submission.

Technical details

  1. We will need to create a new endpoint to retrieve all this information from the backend. The proposed way is to create a new summary get action on the AdminChannelViewset. This endpoint will return a JSON containing the four counters
    • The pending and flagged counters will only take into account the latest community library submission of each channel.
    • Unit tests should be added for this new action.
// GET /api/admin-channels/summary - 200

{
  "public_count": 109,
  "community_library_live_count": 75,
  "community_library_pending_count": 16,
  "community_library_flagged_count": 23
}
  1. 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.

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.