Harmonise the typography when listing uploads

24px with 19px is what we use on the uploads page. On notifications page
we use 19px with 16px.

There’s some loose idea that the bigger size is for items that contain
other items.

This also increases the line height for recipients of PDF letters to
make things line up.
This commit is contained in:
Chris Hill-Scott
2020-03-16 14:14:29 +00:00
parent 00f953de6d
commit 341b9009f3
6 changed files with 23 additions and 7 deletions
@@ -89,3 +89,8 @@ $iso-paper-ratio: 141.42135624%;
} }
} }
.letter-recipient-summary {
line-height: 28px;
margin-bottom: 0;
}
@@ -83,6 +83,17 @@
max-width: 580px; max-width: 580px;
} }
&-hint-large {
@include core-19;
display: block;
color: $secondary-text-colour;
pointer-events: none;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
max-width: 580px;
}
} }
.failure-highlight { .failure-highlight {
+4 -4
View File
@@ -26,19 +26,19 @@
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_job', service_id=current_service.id, job_id=item.id) }}">{{ item.original_file_name }}</a> <a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('.view_job', service_id=current_service.id, job_id=item.id) }}">{{ item.original_file_name }}</a>
{% endif %} {% endif %}
{% if item.scheduled %} {% if item.scheduled %}
<span class="file-list-hint"> <span class="file-list-hint-large">
Sending {{ Sending {{
item.scheduled_for|format_datetime_relative item.scheduled_for|format_datetime_relative
}} }}
</span> </span>
{% elif item.upload_type == 'contact_list' %} {% elif item.upload_type == 'contact_list' %}
<span class="file-list-hint"> <span class="file-list-hint-large">
Uploaded {{ Uploaded {{
item.created_at|format_datetime_relative item.created_at|format_datetime_relative
}} }}
</span> </span>
{% else %} {% else %}
<span class="file-list-hint"> <span class="file-list-hint-large">
Sent {{ Sent {{
(item.scheduled_for or item.created_at)|format_datetime_relative (item.scheduled_for or item.created_at)|format_datetime_relative
}} }}
@@ -78,7 +78,7 @@
)) ))
) }} ) }}
{% elif item.pdf_letter %} {% elif item.pdf_letter %}
<p class="govuk-body govuk-!-margin-bottom-1"> <p class="govuk-body letter-recipient-summary">
{% for line in item.recipient.splitlines() %} {% for line in item.recipient.splitlines() %}
{% if loop.index < 3 %} {% if loop.index < 3 %}
{{ line }}<br> {{ line }}<br>
+1 -1
View File
@@ -47,7 +47,7 @@
{% call row_heading() %} {% call row_heading() %}
<div class="file-list"> <div class="file-list">
<a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('main.send_from_contact_list', service_id=current_service.id, template_id=template.id, contact_list_id=item.id) }}">{{ item.original_file_name }}</a> <a class="file-list-filename-large govuk-link govuk-link--no-visited-state" href="{{ url_for('main.send_from_contact_list', service_id=current_service.id, template_id=template.id, contact_list_id=item.id) }}">{{ item.original_file_name }}</a>
<span class="file-list-hint"> <span class="file-list-hint-large">
Uploaded {{ item.created_at|format_datetime_relative }} Uploaded {{ item.created_at|format_datetime_relative }}
</span> </span>
</div> </div>
+1 -1
View File
@@ -3920,7 +3920,7 @@ def test_choose_from_contact_list(
template_id=template['id'], template_id=template['id'],
contact_list_id=expected_list_id, contact_list_id=expected_list_id,
) )
assert normalize_spaces(page.select_one('.file-list-hint').text) == ( assert normalize_spaces(page.select_one('.file-list-hint-large').text) == (
expected_time expected_time
) )
assert normalize_spaces(page.select_one('.big-number-smallest').text) == ( assert normalize_spaces(page.select_one('.big-number-smallest').text) == (
+1 -1
View File
@@ -128,7 +128,7 @@ def test_get_upload_hub_page(
'123 Example Street' '123 Example Street'
) )
assert normalize_spaces(str(uploads[1].select_one('.govuk-body'))) == ( assert normalize_spaces(str(uploads[1].select_one('.govuk-body'))) == (
'<p class="govuk-body govuk-!-margin-bottom-1"> ' '<p class="govuk-body letter-recipient-summary"> '
'Firstname Lastname<br/> ' 'Firstname Lastname<br/> '
'123 Example Street<br/> ' '123 Example Street<br/> '
'</p>' '</p>'