-
Notifications
You must be signed in to change notification settings - Fork 214
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
Code Diff Viewer, version switching on Autograder Output #2093
Conversation
Allow version switching on autograder output
WalkthroughWalkthroughThe recent updates introduce a diff viewer for comparing submission versions and enhance autograding output versioning. Cosmetic changes improve code readability and UI adjustments for better user experience. The integration of the Changes
Assessment against linked issues
The code changes effectively address the objectives laid out in the linked issues. The addition of a diff viewer for submission versions aligns with the requirements of issue #1743, providing a side-by-side comparison feature. Similarly, the updates to the submissions controller and related views support version switching for autograding output, meeting the needs of issue #2090. Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
Personally prefer non-synchronized scrolling on both files, especially if file sizes are pretty different. |
Seems to be a limitation of the library, as I don't see a way to specify a "line similarity score threshold". In general, there is no semantic info associated with a diff, so the library can and will match stuff like whitespace, brackets, and parenthesis.
Discussed offline as a won't change, since it would make comparisons more tedious in general and doesn't really bring any benefit. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Motivation and Context
Closes #2090
Closes #1743
How Has This Been Tested?
Version switching on autograder output
Now able to switch between versions when viewing autograder output. Will always go to the immediate next / previous version, with a message if the output does not exist.
Output exists (and autograder exists)
Note the "Run Autograder" button
Output does not exist, autograder exists
Note the message, and the "Run Autograder" button
Output does not exist, autograder does not exist
Note the message, and NO "Run Autograder" button
Code Diff Viewer
Text file - changes exist
Text file - no changes
Version 1 of a file
Other error, e.g. viewing a PDF or Binary file
Autograder Output
Large files
Height tweaks
Before (CMU prod)
After
With announcements
Types of changes
Checklist:
overcommit --install && overcommit --sign
to use pre-commit hook for linting