fix: More fixes for narrow screens#3662
Conversation
rjsparks
left a comment
There was a problem hiding this comment.
Please verify the new loop construction in requests.html doesn't leave an unclosed <tbody>
| {% else %} | ||
| {% with constraint.name.slug as constraint_name_slug %} | ||
| <span class="{% if constraint_name_slug == 'conflict' %}text-danger{% elif constraint_name_slug == 'conflic2' %}text-warning{% elif constraint_name_slug == 'conflic3' %}text-success{% else %}{{ constraint_name_slug }}{% endif %}"> | ||
| <span class="{% if constraint_name_slug == 'chair_conflict' %}text-danger{% elif constraint_name_slug == 'tech_overlap' %}text-info{% elif constraint_name_slug == 'key_participant' %}text-success{% else %}{{ constraint_name_slug }}{% endif %}"> |
There was a problem hiding this comment.
This should become aware of the constraints in use by a given meeting: https://github.com/ietf-tools/datatracker/blob/main/ietf/meeting/models.py#L125.
There was a problem hiding this comment.
Might be a spot for a template filter to convert a constraint into a "badness" level
There was a problem hiding this comment.
I can do a filter, but the line Robert indicated doesn't give me enough information about what the desired behavior is?
There was a problem hiding this comment.
this is probably bigger than this first pass and should be split into a separate ticket. A meeting knows which constraint names are in use. Right now, we have hardcoded how to present each constraint into the template (chair_conflict is text-danger, etc). We would need to add a filter, as jennifer is suggesting, that encapsulated what class to provide for each constraint type.
|
I don't think it does - the tidy check that the test suite now runs would have caught that. |
|
The tidy check must not do what you think it does. I checked out the PR and looked at the html generated by ietf.meeting.tests_views.SessionTests.test_meeting_requests. Looking into the call to tidy: |
|
I looked into this, and HTML Tidy misses a bunch of HTML errors. Gah. I am adding HTML5 validation based on vnu in #3682 and will rework this PR once that is done. |
jennifer-richards
left a comment
There was a problem hiding this comment.
Looks ok to me aside from what @rjsparks already flagged
| Action Holder{{ doc.documentactionholder_set.all|pluralize }}: | ||
| {% for action_holder in doc.documentactionholder_set.all %} | ||
| {% person_link action_holder.person title=action_holder.role_for_doc %} {{ action_holder|action_holder_badge }}{% if not forloop.last %},{% endif %} | ||
| {% person_link action_holder.person title=action_holder.role_for_doc %}{% if action_holder|action_holder_badge %} {{ action_holder|action_holder_badge }}{% endif %}{% if not forloop.last %},{% endif %} |
There was a problem hiding this comment.
I think the {% if... %} wrapper should be a no-op. The action_holder-badge tag returns '' if there's nothing to include, so either way there should be no text inserted. Is this doing something subtle?
There was a problem hiding this comment.
The issue is that if there is no action_holder, there should also not be a space before the (empty) badge. (And if there is one, there should be a space.) Is there a better way to do this?
There was a problem hiding this comment.
Look to see if that space is appropriate for everywhere the action_holder templatetag is used. If it is, then add it to the html that the templatetag emits when a badge should be present.
Or, to make it much more obvious why you're adding the space, try
{% if action_holder|action_holder_badge %} {% endif %}{% action_holder|action_holder_badge %}
Or better yet, look to see if action_holder_badge being empty only happens when there is no action holder, and if so reduce that to
{% if action_holder %} {% endif %}{% action_holder|action_holder_badge %}
But this isn't enough to hold up the PR over.
| {% else %} | ||
| {% with constraint.name.slug as constraint_name_slug %} | ||
| <span class="{% if constraint_name_slug == 'conflict' %}text-danger{% elif constraint_name_slug == 'conflic2' %}text-warning{% elif constraint_name_slug == 'conflic3' %}text-success{% else %}{{ constraint_name_slug }}{% endif %}"> | ||
| <span class="{% if constraint_name_slug == 'chair_conflict' %}text-danger{% elif constraint_name_slug == 'tech_overlap' %}text-info{% elif constraint_name_slug == 'key_participant' %}text-success{% else %}{{ constraint_name_slug }}{% endif %}"> |
There was a problem hiding this comment.
Might be a spot for a template filter to convert a constraint into a "badness" level
|
Oops, didn't realize my approval would authorize github to allow merge - should have just been a comment but I don't see a way to change that. |
Need to keep checking for issues, there are more.
507e200 to
54cba46
Compare
|
Modulo the open question about the filter, this PR is ready from my side. |
Need to keep checking for issues, there are more.