Programming exercises
: Fix misplaced inline feedback when switching files in online code editor
#7396
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
General
Client
Motivation and Context
Hotfix for issue #7033.
Inline feedback sometimes gets placed in the wrong location when switching files. This sometimes leads to overlapping feedback over code or other feedback which makes it tutors to assess the code.
Description
Always scrolls the editor to the top when switching files. This seems to fix the calculations for the annotation placement.
A more permanent solution might be #7393.
No currently available functionality is lost by always scrolling to the top:$A$ at the very top, switch to file $B$ and scroll down, then switch back to $A$ ; you are now scrolled down, too). Therefore, the location in the previous file was lost anyway. With this change at least the location you end up in is consistent.
Right now, the editor scrolls to some position dependent on whichever file you are switching from (e.g., you were in file
Steps for Testing
Prerequisites:
Review Progress
Code Review
Manual Tests
Test Coverage
unchanged