mumuki-laboratory icon indicating copy to clipboard operation
mumuki-laboratory copied to clipboard

"One line code" in Editor Type

Open Gustrucco opened this issue 5 years ago • 8 comments

There are exercises where only one line of code is necessary, so a whole textarea is too much.

For example:

image

Gustrucco avatar Apr 10 '19 18:04 Gustrucco

This exercise type technically exists, and is called text: https://github.com/mumuki/mumuki-laboratory/blob/master/app/views/layouts/exercise_inputs/editors/_text.html.erb.

However, it looks like it is not actually working - you can create one exercise of that type in bibliotheca and laboratory will not reflect those changes.

Also, the name text is really bad and obscure. I'd recommend renaming it to one_liner.

flbulgarelli avatar Apr 17 '19 14:04 flbulgarelli

Also, see https://github.com/mumuki/mumuki-laboratory/issues/726

flbulgarelli avatar Apr 17 '19 14:04 flbulgarelli

@flbulgarelli what should the reset button do? clear the field?

afska avatar May 23 '19 06:05 afska

Yes. It should behave exactly like the code-editor reset button.

flbulgarelli avatar May 23 '19 17:05 flbulgarelli

The reset button should only clear the field in the UI, not in the backend.

Also, you should use a one-linear code-mirror editor, not a text-field

flbulgarelli avatar May 23 '19 17:05 flbulgarelli

@Gustrucco Do we need this feature for an specific exercise or it's just a general improvement?

luchotc avatar Jul 10 '19 18:07 luchotc

As far as I remember is a general improvement for exercises where you only need to write one line of code.

Gustrucco avatar Jul 11 '19 04:07 Gustrucco

We have to make sure that the reset button and format button works properly

luchotc avatar Nov 20 '20 14:11 luchotc