Skip to content
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 a toggle to enable side-by-side diff viewer #2880

Merged
merged 1 commit into from
Dec 14, 2024
Merged

Conversation

Kevinjil
Copy link
Contributor

Store the last toggled diff viewer state in the local storage. The way diffs are viewed is mostly a user preference, but depending on the file and type of changes, the option to quickly toggle it can come in handy.

Note that for multi-file submissions, a per-file toggle is included in the tab, but on reload all tabs will have the state of the last toggled switch.

Fixes #2863

Copy link
Member

@nickygerritsen nickygerritsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could do the same as with the theme to change them all, but then the toggle should go in the menu since we only need one. I don't think that's better

webapp/public/js/domjudge.js Outdated Show resolved Hide resolved
Store the last toggled diff viewer state in the local storage. The way
diffs are viewed is mostly a user preference, but depending on the file
and type of changes, the option to quickly toggle it can come in handy.

Note that for multi-file submissions, a per-file toggle is included in
the tab, but on reload all tabs will have the state of the last toggled
switch.
@Kevinjil Kevinjil enabled auto-merge December 14, 2024 14:51
@Kevinjil Kevinjil added this pull request to the merge queue Dec 14, 2024
Merged via the queue into main with commit 678d7a0 Dec 14, 2024
41 checks passed
@Kevinjil Kevinjil deleted the diff-viewer-sbs branch December 14, 2024 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature request] Add an option to switch to an inline diff editor.
3 participants