Skip to content

Show draft channel tokens in the UI #5461

@AlexVelezLl

Description

@AlexVelezLl

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 the Easy Sharing of Community Channels project, we are introducing a new option to publish "draft" versions to allow users to test the current snapshot of their channels in Kolibri without marking them as published. Right now, the draft publish workflow is working fine, but there is no way for the users to see the results of this next version in the UI.

Technical details

Backend changes

  • We'll need to expose a new draft_token field in the ChannelViewset so that the frontend can know if this channel has a draft version.
    • For this, we can annotate this value in the annotate_queryset and find by a related ChannelVersion with version=None, which represents a draft version in the ChannelVersion model.
  • Since this token will be updated on the publish_next handler, we should update its change event to include the new draft_token here.

Frontend changes

In the frontend, multiple places should be updated:

Description Visual spec
After publishing a draft version, a "Draft being published" snackbar should be displayed Image
We will then watch the isDraftPublishing property, and when it finishes, a "Draft published successfully" snackbar will be shown with a "preview" action Image
If the user clicks on the "preview" action, the following modal will appear Image
A new "Get draft token" option should appear in the "share" dropdown if a draft_token is present in the channel. Additionally, the current "Share token" option should be updated to say "Get published token" Image
In the channel info page, a new "draft token" field should be added if the channel has a draft token value Image

Notes:

Metadata

Metadata

Assignees

Labels

P0 - criticalPriority: Release blocker or regression

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions