Closed ihalaij1 closed 9 months ago
@ihalaij1 There is some confusion here.
list
variable since its scope has changed and thus, it is not defined anymore when it is used later in the code. If you define a const
inside an if
branch, then the variable is scoped only inside the if
branch, right? Then, the variable can not be used outside the if
statement. (Python behaves differently than JS in this topic.)I separated the word wrap button fix to a separate commit.
I will have to check a few more things about the separate scrolling, because this PR does not support scrolling HTML feedback separately.
I already manually merged the commit for the "word wrap button" fix (#1281).
I already manually merged the commit for the "word wrap button" fix (#1281).
I am also going to merge the commit for the "load more lines" button ("Load long feedback and submission/template/model files in chunks"), but I didn't finish my testing yet. The code looks good in that commit. After these manual merges, this pull request could focus on the "scroll separately" button in the "inspect submission" view and you could rename the pull request (title).
Now I have manually added the git commit of the "load more lines" button to the master branch as well as the v1.20_stable branch.
I have made more changes, the remainder of the PR is now ready for a review @Mankro.
Description
What?
Loading extremely long submission/template/model files and feedback was made faster in #1260 by omitting the line numbers if the data was longer than 5000 lines.
The performance is now improved even more by utilizing document fragments and chunked loading, where the user can press a button to load the next 5000 lines (with line numbers always included).
This fixes a potential 'Out of memory' browser error and a bug where the word wrap button was not working.
The grader feedback already had a
Scroll separately
button, and it is now also added for the submitted files.Indentation was fixed in
aplus.js
file.Word wrap button now remembers its state and is synchronized across page reloads and with related buttons in other (hidden) tabs.
Fixes #1281 Fixes #1111 Closes #1172
Testing
What type of test did you run?
Tested that loading long template files, model files, submitted files, and feedback works correctly.
Did you test the changes in
Translation
Programming style
Have you updated the README or other relevant documentation?
Is it Done?