brownplt / pyret-lang

The Pyret language.
Other
1.07k stars 111 forks source link

Style top chunk/chat in Repartee differently (generalization of `use context` line in CPO) #1666

Open jpolitz opened 2 years ago

jpolitz commented 2 years ago

In CPO, the use context line is grayed out and requires extra interaction to edit.

@schanzer and I talked today and proposed that we have a convention that the first chunk in Repartee get similar treatment. It should be grayed out, not allow inserting new chunks above it, and require some extra step to edit it (probably through Options).

This could generalize the "don't edit above this line" message that's sometimes in starter files – if you don't want students messing with it, put it in the top chunk.

asolove commented 1 year ago

How do you imagine this working so that the top section is easy to edit for teachers who want to add "do not edit" content, but not for students?

asolove commented 1 year ago

^ The mentioned commit handles the easy part of this for the top chunk:

But it doesn't handle the actually-interesting part, where it becomes editable in some other way when you want to change the top chunk.

image
schanzer commented 1 year ago

I imagine it might be as simple as "double-click to make editable", which assigns a class to that chunk that turns editing on. Once that chunk is saved, the class is removed.