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

Make certain parts of the scoreboard sticky, relevant when having many problems/very wide scoreboard #2216

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

Conversation

vmcj
Copy link
Member

@vmcj vmcj commented Nov 12, 2023

I encountered this when testing for something else. When there are many problems we don't fit in the viewport anymore (horizontal we move out of a browser window). If the viewer would scroll certain parts should stay:

  • banner
  • warnings (this is not a real contest), frozen status (contest frozen with 120 min remaining) etc.
  • The legenda & filter button, the "generated on time"

I couldn't get the team names to become sticky as that would remove the border (https://stackoverflow.com/a/53559396).

PR mostly for discussion, after approval I'll squash this to one.

@vmcj
Copy link
Member Author

vmcj commented Nov 14, 2023

The progress bar is not sticky yet.

@@ -1,15 +1,151 @@
- id: hello
label: A
- id: hello0-
Copy link
Member

Choose a reason for hiding this comment

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

need to revert this file

@@ -80,6 +80,10 @@ if [ "$TEST" = "w3cval" ]; then
rm -f localhost/domjudge/css/select2-bootstrap*.css*
rm -f localhost/domjudge/css/dataTables*.css*
rm -f localhost/domjudge/jury/config/check/phpinfo*
# We need any value for bs-gutter-x to calculate with in CSS
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand what is happening here. Do you remove this from the CSS file to avoid it being flagged as non-standard? Is there a risk that this doesn't work in "all" browsers then?

Copy link
Member Author

Choose a reason for hiding this comment

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

Given that there are at this point only 2 browsers and it works there I think we're fine, also bootstrap already uses CSS variables so we would have problems somewhere else also.

The main problem is that W3C has the CSS standard where this is a very strong candidate (not sure how this works for them to make this final) but the validator doesn't detect this properly. There are a lot of threads about this that this is more an issue with the W3C validator than with support for this feature.

Copy link
Member

Choose a reason for hiding this comment

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

Did you test this also in the mobile view?

@meisterT
Copy link
Member

What is the difference between this and #2132?

@vmcj
Copy link
Member Author

vmcj commented Nov 23, 2023

What is the difference between this and #2132?

Everything, this does something completely else. In this one I make the overview (well tried, the team page seems to have been forgotten) and make that you can scroll when having loads of problems (so the scoreboard is quite wide)

The other one tries to keep the scoreboard summary (so based on the length) sticky when scrolling. So one works on horizontal scrolling (in a sort of edgecase) the other one when having multiple sortorders or enough teams to fill more than 1 viewport.

@vmcj vmcj changed the title Make certain parts of the scoreboard sticky, relevant when having many problems Make certain parts of the scoreboard sticky, relevant when having many problems/very wide scoreboard Feb 11, 2024
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.

2 participants