JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
888 stars 104 forks source link

Read-only markdown segments #193

Open puredanger opened 9 years ago

puredanger commented 9 years ago

It would be useful to turn off the ability to edit markdown completely when providing materials to others. This could be implemented either as a protected flag in the markup or more likely it would be useful as a special mode when running the Gorilla server. I'd still want to be able to edit code when in this mode.

JonyEpsilon commented 9 years ago

Yes, I agree that this would be a useful feature. Although, I would add that from my experience of teaching Mathematica with notebooks, people don't seem to be too bothered by having editable text in the worksheet, and get used to it very quickly. Of course, the gold standard of UX design is not really "train the users to tolerate your idiosyncrasies"!

If we were to cross the segment-level-metadata Rubicon, as mentioned in #192, then this might well be implemented as a "locked" flag in the metadata. I can imagine some discrete UI next to the segment to toggle the lock status (maybe next to the UI to toggle the hidden/folded status). And make it so that locked cells do not switch to edit mode when clicked on or cursored into.

Does that sounds like it would meet your needs @puredanger ? This way, it would be possible for users to edit the segments, but they would have to explicitly unlock first. Hopefully, though, it would give the desired user experience, in that the locked cells seem to be static content.

puredanger commented 9 years ago

I think that would be great!