Closed undefined-moe closed 1 week ago
I think </br>
should be shown a new line, but it show as itself. You can verify this in demoweb.
Before:
After:
Yes that's indeed a bug.
I personally don't like to have Unicode chars for this but can't think of something else for now. Can you add a comment above explaining what it does (and/or explain the issue in your commit message)?
I personally don't like to have Unicode chars for this but can't think of something else for now.
I recommend using something like {{ '\n' ~ label }}
to prevent this.
I personally don't like to have Unicode chars for this but can't think of something else for now.
I recommend using something like
{{ '\n' ~ label }}
to prevent this.
Or even just {{ '\n' }}
? I think I prefer that
@undefined-moe can you squash the commits and rewrite your commit message?
well there's "squash and merge" if you expand that dropdown besides "merge pull request" button.
We use merge queues, and then that button is not there anymore
Verified and this fixes the original issue.
It does not work on
/jury/problems/problemset
but we can look into that later.
@vmcj It looks like $('[data-bs-toggle="tooltip"]').tooltip();
is called in /jury/problems/problemset
but not in /public
and /team
.
My suggestion is:
diff --git a/webapp/templates/partials/problem_list.html.twig b/webapp/templates/partials/problem_list.html.twig
index 0733241dd..bda100c09 100644
--- a/webapp/templates/partials/problem_list.html.twig
+++ b/webapp/templates/partials/problem_list.html.twig
@@ -92,9 +92,9 @@
<div
class="problem-stats-item {{ itemClass }}"
data-bs-toggle="tooltip"
- data-placement="top"
- data-html="true"
- title="Between {{ stat.start.timestamp | printtime(null, contest) }} and {{ stat.end.timestamp | printtime(null, contest) }}:{{ '\n' }}{{ label }}">
+ data-bs-placement="top"
+ data-bs-html="true"
+ title="Between {{ stat.start.timestamp | printtime(null, contest) }} and {{ stat.end.timestamp | printtime(null, contest) }}:<br/>{{ label }}">
</div>
{% endfor %}
</div>
diff --git a/webapp/templates/public/problems.html.twig b/webapp/templates/public/problems.html.twig
index 17d1b5d12..d6f4a9d30 100644
--- a/webapp/templates/public/problems.html.twig
+++ b/webapp/templates/public/problems.html.twig
@@ -12,3 +12,11 @@
problem_sample_zip_path: 'public_problem_sample_zip'
} %}
{% endblock %}
+
+{% block extrafooter %}
+<script>
+ $(function() {
+ $('[data-bs-toggle="tooltip"]').tooltip();
+ });
+</script>
+{% endblock %}
diff --git a/webapp/templates/team/problems.html.twig b/webapp/templates/team/problems.html.twig
index 9ceb23397..c64a88e1c 100644
--- a/webapp/templates/team/problems.html.twig
+++ b/webapp/templates/team/problems.html.twig
@@ -13,3 +13,11 @@
show_submit_button: true
} %}
{% endblock %}
+
+{% block extrafooter %}
+<script>
+ $(function() {
+ $('[data-bs-toggle="tooltip"]').tooltip();
+ });
+</script>
+{% endblock %}
@cubercsl, my remark was not meant that we need a fix now (as it was already broken before),
Feel free to create a PR for it. This does add the <br>
back though? IIRC the newline did not work for the preview problemset page so I think that's that page we should change and not the other ones. Maybe this discussion works better in a new issue though as we're now commenting on a closed PR.
Hi @undefined-moe,
Can you show a screenshot from the before and after so we can see why this is better?