[Bugfix:TAGrading] Fix Notebook scroll#12603
Conversation
…-events with readOnly
Benny-Dav
left a comment
There was a problem hiding this comment.
Great fix.
I tested a similar fix and found a potential simplification. Kindly find comment inline.
| $('#codebox_{{ num_codeboxes }}').addClass("small-mirror"); | ||
| } | ||
|
|
||
| {% if viewing_inactive_version or is_grader_view %} |
There was a problem hiding this comment.
I think this "is_grader_view" condition on this line might be redundant, because lines 382 - 401 also set readOnly to true for is_grader_view condition for the CodeMirror element.
I have tested without the condition here and the fix behaviour still works.
Do you think we could simplify this?
18e6cf8 to
ff071a1
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12603 +/- ##
=========================================
Coverage 21.64% 21.64%
Complexity 9654 9654
=========================================
Files 268 268
Lines 36244 36244
Branches 487 487
=========================================
Hits 7845 7845
Misses 27916 27916
Partials 483 483
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
dagemcn
left a comment
There was a problem hiding this comment.
Good work on this issue. I agree with @Benny-Dav, your change on line 133 is redundant. However, I notice that with the fix you can only expand the boxes vertically. Since this is a fairly small issue I think it would be suitable to implement a fix for this within this PR as opposed to creating an entirely new issue. Remove the changes on lines 133-136 and fix the double slash expansion bug and I'll approve.
|
Thanks for the feedback! I have updated now
|
There was a problem hiding this comment.
Resizing now works as intended. I notice that if the text does not fix in the text box horizontally, there is no horizontal scroll bar making it difficult for graders to view text that goes past the maximum horizontal expansion size. However, I think this is an issue for another PR. Good changes here.
Why is this Change Important & Necessary?
Fixes #11096 : Graders cannot scroll to see the full answer in a codebox if the content overflows.
Grading becomes difficult if TA/Instructor can not scroll to view the whole answer. Fix enables to view entire answer, expand and scroll with a horizontal and vertical scrollbar in the codebox. Editing still remains disabled. Text selection, horizontal/vertical scrolling, and box expansion are allowed.
What is the New Behavior?
Before
After
What steps should a reviewer take to reproduce or test the bug or new feature?
Automated Testing & Documentation
Other information
Code Changes
Photo of the changes i have made in code.
