Workspace Widget

Get into the ins and outs of the Workspace widget.

Overview

In our previous lesson, we have discussed different widgets provided by the Educative for the projects. Each widget comes with its pros and cons. This lesson will focus more on the Workspace widget due to its consistent performance, persistence storage capabilities, and lease time (i.e., about 60 minutes). In a project, the Workspace widget’s editor view is as follows:

In its default mode, when we preview it from the PREVIEW button on the right-upper corner of the platform. This is how it will appear on our screen:

As annotated above in its default mode, Workspace has a left panel with project title, task title, and task description covered in our previous lessons. At the same time, we have the Launch Workspace button on the right panel. Let’s explore it by clicking on it.

The /usercode directory

As annotated above, choosing a Workspace environment for our project provides us a /usecode directory. It’s the directory where an author can save code or related files for their learners. If a learner interacts with such files, those interactions (changes if any) will be preserved until the learner reverts them or reset the Workspace (more on it in an upcoming lesson).

Other options

Whereas there are some other options available in the Workspace environment like:

  • Allow Terminal
  • Allow Browser
  • Hide Editor
  • Hide Run Button
  • Exit Process on Run

These can be explored once we are in the editor’s mode of the project like shown below:

For a detailed explanation of the Docker in Workspace, refer to either of the lessons under the category of Types of Projects, e.g., Jupyter-based Projects

Before moving onward, let’s get a glimpse of the view when we enable the rest of the available options as follows:

As annotated above, when we check the specified boxes and preview by clicking the PREVIEW button on the right-upper corner of the platform. This is how it will appear on our screen: