From 99493acb8687fab32a8c26768785f3bf368cf601 Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Mon, 29 Jul 2024 15:32:53 -0400 Subject: [PATCH 1/3] Updates to Job status page --- .../uswds/_uswds-theme-custom-styles.scss | 28 +++++++++++++++++++ .../partials/jobs/notifications.html | 7 +++-- app/templates/views/jobs/job.html | 6 ++-- poetry.lock | 6 +++- 4 files changed, 40 insertions(+), 7 deletions(-) diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index efe86c763..f82e63ad7 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -402,6 +402,30 @@ td.table-empty-message { } } +.job-status-table { + table-layout: fixed; + + thead tr th { + border-bottom: 0; + } + + thead, + tbody, + tr { + width: 100%; + } + + th:first-child, + td:first-child { + width: 75%; + } + + th:nth-child(2),R + td:nth-child(2) { + width: 25%; + } +} + .usage-table { ul { list-style: none; @@ -456,6 +480,10 @@ td.table-empty-message { } } +.usa-prose > p.max-width-full { + max-width: 100%; +} + // Tabs .tabs { diff --git a/app/templates/partials/jobs/notifications.html b/app/templates/partials/jobs/notifications.html index 2b5cd8f77..5787fb3d4 100644 --- a/app/templates/partials/jobs/notifications.html +++ b/app/templates/partials/jobs/notifications.html @@ -22,7 +22,7 @@ {% else %} {% if notifications %} -
+
{% endif %} {% if job.still_processing %}

@@ -40,15 +40,16 @@ notifications, caption=uploaded_file_name, caption_visible=False, + border_visible=True, empty_message='No messages to show yet…' if job.awaiting_processing_or_recently_processed else 'These messages have been deleted because they were sent more than {} days ago'.format(service_data_retention_days), field_headings=[ 'Recipient', - 'Status' + 'Message status' ], field_headings_visible=False ) %} {% call row_heading() %} - {{ item.to }} + {{ item.to | format_phone_number_human_readable }}

{{ item.preview_of_content }}

diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index ce4e94b3d..0de8ccf83 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -10,7 +10,7 @@ {% block maincolumn_content %} - {{ page_header("Message status") }} + {{ page_header("Job status") }} {{ partials['status']|safe }} {% if not finished %}
{% endif %} -

- Messages will remain in pending state until carrier status is received, typically 5 minutes. +

+ Messages are sent immediately to the cell phone carrier, but will remain in "pending" status until we hear back from the carrier they have received it and attempted deliver. More information on delivery status.

{% if not job.processing_finished %}
Date: Tue, 30 Jul 2024 14:24:02 -0400 Subject: [PATCH 2/3] Adjusting tests --- app/templates/views/jobs/job.html | 2 +- tests/app/main/views/test_jobs.py | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/templates/views/jobs/job.html b/app/templates/views/jobs/job.html index 0de8ccf83..7014e1987 100644 --- a/app/templates/views/jobs/job.html +++ b/app/templates/views/jobs/job.html @@ -10,7 +10,7 @@ {% block maincolumn_content %} - {{ page_header("Job status") }} + {{ page_header("Message status") }} {{ partials['status']|safe }} {% if not finished %}
Date: Tue, 30 Jul 2024 14:35:30 -0400 Subject: [PATCH 3/3] Needed to wrap this line --- tests/app/main/views/test_jobs.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/app/main/views/test_jobs.py b/tests/app/main/views/test_jobs.py index 8a9ef5b58..dd55d7500 100644 --- a/tests/app/main/views/test_jobs.py +++ b/tests/app/main/views/test_jobs.py @@ -493,5 +493,6 @@ def test_should_show_message_note( ) assert normalize_spaces(page.select_one("main p.notification-status").text) == ( - 'Messages are sent immediately to the cell phone carrier, but will remain in "pending" status until we hear back from the carrier they have received it and attempted deliver. More information on delivery status.' + 'Messages are sent immediately to the cell phone carrier, but will remain in "pending" status until we hear ' + 'back from the carrier they have received it and attempted deliver. More information on delivery status.' )