ls1intum / Artemis

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

`Programming exercises`: Warnings in the assessment editor trigger flickering #8731

Open BaumiCoder opened 1 month ago

BaumiCoder commented 1 month ago

Describe the bug

If there are warnings in the assessment editor from static code analyses (e.g. Checkstyle), you get some kind of flickering. It occurs when you move your mouse of the code lines, and you hit some lines with warnings.

One possible solution could be to make the column weight enough to contain both icons, if there are warnings in at least one line, independent of the actual line of the mouse course.

To Reproduce

  1. Create a programming exercise with static code analysis (e.g. Java Maven Project)
  2. Make a submission for this exercise with changes that add warning (e.g. Rename the constants in the Client.java see Screenshots)
  3. Set the Due Date of the exercise to now and add a manual assessment
  4. Open your submission in the assessment editor
  5. Went through the code with your mouse courser

Expected behavior

There are no visual distractions when going through the code with the mouse courser.

Screenshots

example Gif convertation had added some color bugs, so here also the video file: https://github.com/ls1intum/Artemis/assets/73783062/63fe0676-5d80-4184-8b29-0f1c79d540f9

Which version of Artemis are you seeing the problem on?

7.1.2

What browsers are you seeing the problem on?

Firefox

Additional context

No response

Relevant log output

No response

pzdr7 commented 1 month ago

This was the workaround we implemented to prevent the button being hidden under the build annotations. We might be able to move the button to the right of the line numbers.

I quickly typed something up in the Monaco Editor playground: example - move your mouse around in the preview editor

Would you prefer it if this was what it looked like?

BaumiCoder commented 4 weeks ago

Yes, that approach seems suitable for me if nobody misses the arrows to collapse code blocks like methods.

When changing already something here, a more discreet icon would be nice e.g., a lighter color. If you read the code with your mouse cursor as a pointer, you can be easily got distracted from the moving icon on the left.