-
Couldn't load subscription status.
- Fork 279
Switch diff viewers to single viewer #3132
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
base: main
Are you sure you want to change the base?
Conversation
|
Nice, I think this looks very promising!
Indeed it looks weird, but I would still prefer the source code in the side by side view on half of the page / the correct side (left for deleted files, right for added files) if possible. How hard is it to remember to the diff preference? For example: I personally prefer to always show a diff; if the submission has been resubmitted, then the diff to the original, otherwise the diff to the previous submission if exists. |
@meisterT My idea is currently to use the tagged diff submission and store / restore those with similar logic to how the diff mode ( I also experimented a little bit with loading all previous submissions of the team for a problem, because teams sometimes might be working on 2 versions of code for a problem simultaneously and you might want to diff against the non-previous one. The UI scales perfectly with that (assuming a "normal" contests). In such a case, the "untagged" diff submissions will not be stored, but I will not include loading these in this PR and prefer to discuss such cases later. |
That is currently what is implemented for new files. Just have to replicate it for deleted files. |
Also removes some redundant twig variables and prepares the logic for more submissions to diff against.
Render the diff viewers for a submission as if it was a single IDE, in which you can select the submission to diff against. We move the button interface out of the tabs and create functions to update the state of individual enditors.
b9c3429 to
09ab6a5
Compare
|
Looks pretty nice! Just noticed that maybe the title isn't updated correctly after changing the file that is diffed against? |
Render the diff viewers for a submission as if it was a single IDE, in which you can select the submission to diff against. We move the button interface out of the tabs and create functions to update the state of individual editors.
This PR is pushed already s.t. we can have a discussion whether or not we want this, before spending even more time polishing it.
Main goals:
Notes:
Screen recording:

dark mode is not included in the PR ;)
TODO:
TwigUtilsmain