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

Code refactor for printing UI, API and client #2950

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

cubercsl
Copy link
Contributor

@cubercsl cubercsl commented Mar 3, 2025

This PR does two things.

  1. The current UI allows us to select any available language for printing (including plain text) So I removed the code in the form that retrieves the available languages.

jury
team

  1. Make the API available in any available language (plain text if no language is available) and make appropriate modifications to the print client so that it can submit any language for printing.

But I think putting submitting and printing in one command is not a wise choice, which makes the code logic confusing.

Here is our implementation of a command line printing client that we used in a recent ICPC Regional for reference. If anyone thinks a separate print client implementation would be more appropriate, I can open another PR.

https://gist.github.com/cubercsl/809fcfdb65a7f88d6322cf0ab3505aa4

cubercsl added 3 commits March 3, 2025 21:52
Since we list all available languages in the print form,
getting the submittable languages is not necessary.

https://github.com/DOMjudge/domjudge/blob/1400212da97354dfa7a7eb373a8583d781d38a5a/webapp/src/Form/Type/PrintType.php#L21

Signed-off-by: cubercsl <[email protected]>
Since the UI allows selecting any available language or plain text,
the API should also keep consistent behavior.

Signed-off-by: cubercsl <[email protected]>
It is not necessary to select entry_porint when printing.

Signed-off-by: cubercsl <[email protected]>
Copy link

github-actions bot commented Mar 3, 2025

Test Results

0 tests  ±0   0 ✅ ±0   0s ⏱️ ±0s
0 suites ±0   0 💤 ±0 
0 files   ±0   0 ❌ ±0 

Results for commit 64b47ec. ± Comparison against base commit 1400212.

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.

1 participant