Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render machine annotations for multiple lines or columns #4568

Merged
merged 37 commits into from
Apr 24, 2023

Conversation

jorg-vr
Copy link
Contributor

@jorg-vr jorg-vr commented Apr 14, 2023

This pull request renders machine annotations more precisely if the judge provided the optional parameters. Machine annotations are now marked in the code. The annotation can be found as an interactive tooltip on the marked code. If multiple annotations cover the same code, the marking will indicate the most important annotation, while the tooltip will show all annotations.

I updated the default display for inline annotations to 'important' when any annotations exist on page load, or when in an evaluation, as annotations are easily accessible by tooltip.

This is a first step towards more precise human annotations.
I started with machine annotations as there is less code involved and it can help to test designs already. My idea to mark human annotation ranges in a similar way with a background color.

This pr introduces Tippy.js: This helps with the interactive tooltips. It is written on top of popper.js which we already use through bootstrap. I added is because it greatly improved the UX experience in some edge case compared to using only popper.js.

Visuals of some manually generated annotations: (They are not realistic as I tried to cover all edge cases)
image
image

Currently for most judges it will look like this, with only full line markings.
image
image
Some more naos examples with comments:

But tested has already been updated in dodona-edu/universal-judge#341

Progress on #2826

@jorg-vr jorg-vr added the feature New feature or request label Apr 14, 2023
@jorg-vr jorg-vr self-assigned this Apr 14, 2023
@jorg-vr jorg-vr marked this pull request as ready for review April 20, 2023 13:14
@jorg-vr jorg-vr requested a review from a team as a code owner April 20, 2023 13:14
@jorg-vr jorg-vr requested review from bmesuere and niknetniko and removed request for a team April 20, 2023 13:14
Copy link
Member

@bmesuere bmesuere left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks very promising! Some quick (and incomplete) feedback:

  • I would still show all linting comments by default for the "student view" and only "hide" them if there is at least 1 manual comment/question. Maybe hiding them during grading might also be the right approach, but @chvp is better positioned to answer that question.
  • When showing all annotations, the tooltips are still enabled which should not be the case I think?
  • The order in the tooltips is different then when shown normally e.g.: line 21 on https://naos.ugent.be/nl/submissions/13036445/ In the tooltip, the info remark is shown in the top, but in the inline view it is shown at the bottom.

app/assets/javascripts/mark.ts Outdated Show resolved Hide resolved
@jorg-vr jorg-vr requested a review from bmesuere April 21, 2023 09:05
@bmesuere bmesuere added the deploy mestra Request a deployment on mestra label Apr 24, 2023
@bmesuere bmesuere temporarily deployed to mestra April 24, 2023 13:26 — with GitHub Actions Inactive
@bmesuere bmesuere requested a review from chvp April 24, 2023 13:27
@github-actions github-actions bot removed the deploy mestra Request a deployment on mestra label Apr 24, 2023
@bmesuere bmesuere added the deploy naos Request a deployment on naos label Apr 24, 2023
@bmesuere bmesuere temporarily deployed to naos April 24, 2023 13:33 — with GitHub Actions Inactive
@github-actions github-actions bot removed the deploy naos Request a deployment on naos label Apr 24, 2023
@jorg-vr jorg-vr merged commit e9f03f0 into develop Apr 24, 2023
@jorg-vr jorg-vr deleted the feat/multiline-annotations branch April 24, 2023 14:19
@pdawyndt
Copy link
Contributor

This is how the wave underline looks for me (Chrome, Windows 10):

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants