source-academy/frontend

Editor: default program should be language-specific

Opened this issue · 3 comments

The last Python program used in the editor should come back when switching to Python:

Screenshot 2024-04-18 at 10 01 34 AM

The browser cache needs to keep track of the programs for each language that can be chosen at the top right.

The browser cache needs to keep track of the programs for each language

I think this is a different issue altogether. I agree with both. Default program should be stored under language configuration. Separately, the browser should store multiple "programs" at the same time (maybe we can leverage the filesystem for this).

Should we keep track on a per-language basis or per-sublanguage basis?

I think it should be done on a per-language basis: Quite often we switch between sublanguages to get this or that language feature or tool to work. The program should not change in that case.

Ok, I'll work on a proposed design over the next few weeks.