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 editorial column and filtering #1844

Merged
merged 1 commit into from
Feb 22, 2022
Merged

Conversation

Riolku
Copy link
Contributor

@Riolku Riolku commented Feb 21, 2022

The problem page now has an editorial column. The search form can now be
used to only show problems with an editorial.

The only extraneous change is adding a method to Problem,
has_public_editorial.

Here's some screenshots of the UI I get locally:

Editorial Column, plus sorting:

image

Filtering:

image

@codecov-commenter
Copy link

codecov-commenter commented Feb 21, 2022

Codecov Report

Merging #1844 (7316268) into master (0516433) will decrease coverage by 0.04%.
The diff coverage is 28.57%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1844      +/-   ##
==========================================
- Coverage   46.09%   46.05%   -0.05%     
==========================================
  Files         224      226       +2     
  Lines       12876    12933      +57     
==========================================
+ Hits         5935     5956      +21     
- Misses       6941     6977      +36     
Impacted Files Coverage Δ
judge/views/problem.py 24.29% <28.57%> (-0.25%) ⬇️
judge/admin/submission.py 44.32% <0.00%> (-0.94%) ⬇️
judge/admin/contest.py 44.39% <0.00%> (-0.39%) ⬇️
judge/admin/problem.py 56.86% <0.00%> (-0.38%) ⬇️
judge/utils/problem_data.py 15.62% <0.00%> (-0.20%) ⬇️
judge/views/contests.py 29.60% <0.00%> (ø)
judge/views/api/api_v2.py 47.79% <0.00%> (ø)
judge/views/submission.py 32.17% <0.00%> (ø)
judge/bridge/judge_list.py 0.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0516433...7316268. Read the comment docs.

@Riolku
Copy link
Contributor Author

Riolku commented Feb 21, 2022

image

Fixed casing thanks to Xyene, refer to updated image for the casing on the search form.

judge/views/problem.py Outdated Show resolved Hide resolved
templates/problem/list.html Outdated Show resolved Hide resolved
@Riolku
Copy link
Contributor Author

Riolku commented Feb 21, 2022

image
image

Here are screenshots showing what happens when other editorial situations arise.

@Riolku
Copy link
Contributor Author

Riolku commented Feb 21, 2022

Sorting was removed entirely. has_public_editorial, as a method, was also removed, because it is no longer called.

@Riolku Riolku force-pushed the editorial-available branch 2 times, most recently from 3f0a401 to 9bc73ff Compare February 22, 2022 05:00
quantum5
quantum5 previously approved these changes Feb 22, 2022
templates/problem/list.html Outdated Show resolved Hide resolved
templates/problem/list.html Show resolved Hide resolved
The problem page now has an editorial column. The search form can now be 
used to only show problems with an editorial.
@@ -151,6 +157,14 @@ ul.problem-list {
color: orange;
}

.has-editorial-color {
Copy link
Member

Choose a reason for hiding this comment

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

Can avoid the extra class since you're already tagging with an attribute

Suggested change
.has-editorial-color {
td[editorial=1] i {

Copy link
Member

Choose a reason for hiding this comment

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

But w/e, the rest of the code is written like this already so sure

@quantum5 quantum5 merged commit 11f0bd7 into DMOJ:master Feb 22, 2022
@Riolku Riolku deleted the editorial-available branch February 22, 2022 05:21
Riolku added a commit to Riolku/online-judge that referenced this pull request Feb 22, 2022
Xyene pushed a commit that referenced this pull request Feb 22, 2022
Riolku added a commit to Riolku/online-judge that referenced this pull request Feb 24, 2022
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.

5 participants