DOMjudge / domjudge

DOMjudge programming contest jury system
https://www.domjudge.org
GNU General Public License v2.0
738 stars 260 forks source link

[Feature request] Add an option to switch to an inline diff editor. #2863

Open cubercsl opened 4 days ago

cubercsl commented 4 days ago

Description of the enhancement request

Now that the editor has been changed to monaco, then we can add an option to swich to inline diff editor in submission page: jury/submissions/<sid>/source

The goal you want to achieve

Add a toggle button and/or a global preference (like editor theme) to switch between side by side and inline diff editor.

Any other information that you want to share?

The inline diff editor can be created by option renderSideBySide: false

image

pandadtdyy commented 4 days ago

Should this setting be a system setting or a user preference? Maybe I will implement it in the regional contest with @cubercsl on Saturday first and then come to pr.

Kevinjil commented 4 days ago

I would suggest adding a toggle to the UI, and dynamically updating the diff editor using updateOptions.

nickygerritsen commented 4 days ago

We already do something similar for switching themes, so you can use that as inspiration.