learningequality / learningequality/studio

Content preview: web apps have a different sandbox environment than in Kolibri

Open
#3,850 2 comments 0 reactions 1 assignee View on GitHub

@marcellamaki is already working on this.

Since Dec 6, 2022.

DEV: frontend P1 - important
Dominant language
Python
Stars
191
Forks
307
Avg merge
5d 6h
Merged PRs (30d)
10

Description

Observed behavior

As with other content, Kolibri Studio shows a preview of HTML5 apps that have been added to a channel. However, this preview is missing some functionality that is present in Kolibri itself:

  • The sandbox does not allow local storage access.
  • There is no window.kolibri interface.

Expected behavior

Instead, the preview should work the same as it does inside Kolibri. If this is infeasible, it would be helpful if it was altered in some way to make it clear that the behaviour is different, and to nudge the user toward testing their web app in Kolibri itself instead of in Kolibri Studio.

User-facing consequences

Users who are publishing a web app to a Kolibri channel may be confused when that it behaves incorrectly in Kolibri Studio.

Steps to reproduce the issue

  1. In Kolibri Studio, upload a HTML5 zip which uses local storage to persist data.
  2. Select the content so it is visible in the preview pane.
  3. Note that the local storage features are not functioning.
  4. Additionally, inside the iframe, note that window.kolibri is not present.

Usage Details

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.