ls1intum / Artemis

Artemis - Interactive Learning with Automated Feedback
https://docs.artemis.cit.tum.de
MIT License
480 stars 288 forks source link

`Programming exercises`: sticky scrolling cannot be disabled in the online editor #8514

Open BaumiCoder opened 4 months ago

BaumiCoder commented 4 months ago

Describe the bug

In the new online editor for student submission (https://github.com/ls1intum/Artemis/pull/8130), for instructors editing repos (https://github.com/ls1intum/Artemis/pull/8389) and tutors to assess submissions (https://github.com/ls1intum/Artemis/pull/8437) there is a "sticky scrolling". This means that the headers of upper structure elements (e.g., methods, classes) stick on top of the editor as long as you are in this element.

This disturbs some users. One reason is that the other lines sometimes "jump" a bit up and down while the sticky lines appears / disappears. Another problem is on smaller screens, where the space consume is a problem.


Monaco seems to have options for this: IEditorStickyScrollOptions I do not know if there is also an option to gave users access to these settings.

To Reproduce

  1. Open the online editor somewhere in Artemis
  2. Open a file with a longer class to be able to scroll down
  3. Scroll down until the class header get out of the view
  4. "Sticky scrolling" take action and cannot be removed

Expected behavior

I am able to remove the sticky scrolling. This decision should be saved (e.g. for the user or in the session).

In VSCodium for example I can use the Popup-Menu on the "sticky scrolling" to remove it or a command from the "Command Pallet" (F1)

Screenshots

sticky scrolling

Which version of Artemis are you seeing the problem on?

7.0.2

What browsers are you seeing the problem on?

Firefox

Additional context

No response

Relevant log output

No response

pzdr7 commented 4 months ago

Interestingly, this toggle seems to be (partially) implemented in the Monaco editor. Unfortunately, it also seems broken at the moment, as can be reproduced in the Monaco playground.

https://github.com/ls1intum/Artemis/assets/38403547/5fdf8816-1f37-4b09-a1f0-9535462aa3fc

pzdr7 commented 4 months ago

I have opened the issue https://github.com/microsoft/monaco-editor/issues/4488 in the Monaco editor repository. I suggest we wait until that issue is resolved before addressing this one.