pyret-lang icon indicating copy to clipboard operation
pyret-lang copied to clipboard

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

Open jpolitz opened this issue 3 years ago • 3 comments

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.

jpolitz avatar Oct 20 '22 20:10 jpolitz

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 avatar Jan 01 '23 03:01 asolove

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

  • styling it differently
  • making it not editable
  • removing the "+" above it

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

asolove avatar Jan 01 '23 03:01 asolove

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.

schanzer avatar Jan 01 '23 15:01 schanzer