
❌ 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 |
 |
| We will then watch the isDraftPublishing property, and when it finishes, a "Draft published successfully" snackbar will be shown with a "preview" action |
 |
| If the user clicks on the "preview" action, the following modal will appear |
 |
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" |
 |
| In the channel info page, a new "draft token" field should be added if the channel has a draft token value |
 |
Notes:
❌ 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
draft_tokenfield in the ChannelViewset so that the frontend can know if this channel has a draft version.annotate_querysetand find by a relatedChannelVersionwithversion=None, which represents a draft version in theChannelVersionmodel.publish_nexthandler, we should update its change event to include the new draft_token here.Frontend changes
In the frontend, multiple places should be updated:
draft_tokenis present in the channel. Additionally, the current "Share token" option should be updated to say "Get published token"Notes: