-
Notifications
You must be signed in to change notification settings - Fork 73
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
Add separate vertical scroll bar to exercise submission inspect #1172
Conversation
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.
Looks good, but I think the code in assessment.js could be improved by making the duplicated code into a function. See the comment I left.
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.
Nice, it looks good indeed! I requested a few minor stylistic changes.
We also need to test this more. The implementation does not seem to change anything concerning HTML-formatted grader feedback (when the feedback is not just plain text in <pre>
). Need to check what happens then.
assets/sass/pages/_assessment.scss
Outdated
--sticky-top: 0; | ||
flex-grow: 1; | ||
.submitted-file.sticky > div { | ||
@include sticky-submission-scroll |
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.
@include sticky-submission-scroll | |
@include sticky-submission-scroll; |
Using the semicolon in the end seems to be the preferred programming style.
https://sass-lang.com/documentation/at-rules/mixin
assets/sass/pages/_assessment.scss
Outdated
display: flex; | ||
flex-direction: column; | ||
} | ||
@include sticky-submission-scroll |
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.
@include sticky-submission-scroll | |
@include sticky-submission-scroll; |
@@ -1,4 +1,37 @@ | |||
$(function () { | |||
$.fn.addStickyButton = function (localStorageKey, actionCallback) { | |||
// The "skicky" feature is enabled if ResizeObserver is available and there |
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.
"skicky" -> "sticky"
@@ -1,4 +1,37 @@ | |||
$(function () { | |||
$.fn.addStickyButton = function (localStorageKey, actionCallback) { |
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.
This line and the function definition are indented by 4 spaces, but they should only be indented one level. In JS, we have used only 2 spaces per level as you can see in the line 35:
$(document).on('aplus:translation-ready', function() {
The function body is of course indented more than the outer function(...)
line.
@@ -1,4 +1,37 @@ | |||
$(function () { | |||
$.fn.addStickyButton = function (localStorageKey, actionCallback) { |
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.
If the actionCallback
is never used, why does the parameter exist?
0de5ef0
to
7266b0f
Compare
It looks like Eerik has pushed a new version to address the comments. Maybe reviewers can check if their comments have been satisfied (and mark this as approved if so)? |
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.
There seems to be some problems still.
For example, try to submit two long Python files to aplus-manual exercise 6.3.6 Wallet.
After toggling/scrolling/toggling the left-hand side scroll separately
button a few times, you will notice that it does not always function the way it should (sometimes it scrolls separately when the checkmark isn't checked etc.).
Additionally, the HTML feedback on the right-hand side is not separately scrollable at all.
7266b0f
to
0fc9b97
Compare
This should work now hopefully |
The scroll separately button should be found based on parameters and not the text of the button. Maybe this is possible when we feed the extrabuttons parameter to the highlightCode function? |
0fc9b97
to
df038d8
Compare
df038d8
to
1af958f
Compare
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The functionality of this pull request will be covered in an later PR #1286 , that is planned to be merged soon. Therefore closing this pull request now. |
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
The grader feedback already had a 'Scroll separately' button, and it is now also added for the submitted files. Fixes apluslms#1111 Closes apluslms#1172
Fixes #1111
Description
What?
The exercise submission can now be scrolled separately in the submission inspect view.
2023-04-04.16-15-47.mp4
Why?
This makes viewing long submissions easier
How?
Add the same scroll separately button to the submission as well, and create saas rules which applies the sticky scrolling correctly.
Fixes #1111
Testing
Remember to add or update unit tests for new features and changes.
What type of test did you run?
Ensuring the sticky scrolling buttons works, and persists in
LocalStorage
Did you test the changes in
Think of what is affected by these changes and could become broken
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?
Clean up your git commit history before submitting the pull request!