Skip to content

Add support for multiple files & directories #2176

@ianyong

Description

@ianyong

Motivation

To support the development of larger software systems, the Source Academy needs to support projects with multiple files & directories for better code organisation & readability. This will also help to gently ease new programmers to working on larger-scale projects.

Tasks

Represents the features necessary for a minimum viable product. Subject to change.

  • Implement multiple files.
    • For now, all files will be isolated in the sense that they cannot reference each other & run will only run the currently opened file.
    • If there is only a single file, it cannot be deleted.
      • This restriction will be removed once tabs are added to the code editor.
  • Extend local storage persistence to work with multiple files.
  • Implement directories & extend local storage persistence to work with directories.
  • Implement local imports in js-slang.
    • Currently, modules only supports importing of the libraries listed here.
  • Add run configurations.
    • With multiple files, there is a need to specify the entrypoint of the program.
  • Add ability to toggle multi-file support in playground.
    • For the NUS version, the default state of the toggle should be controlled in settings by the course admin.
  • Rework Google Drive synchronisation to work with projects (which can consist of multiple files) instead of just single files.
    • The equivalent for GitHub will be deprecated if proper version control support is added to Source Academy.

Extensions

  • Add tabs to the code editor.
    • At the same time, this change will allow the code editor to not always have at least one file open, thus removing the restriction of there being at least a single file.
  • Implement multiple file support in sling & sinter (robots).
  • Implement backend persistence for multiple files & directories.
    • For missions, quests & contests.
    • Will also need to add a flag to toggle multiple files in the XML configuration.
  • Add ‘Collapse All’ & ‘Expand All’ buttons in the file system sidebar.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions