From ee1c4efb03b93efc1fd38856126361873ee647f9 Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Mon, 18 Mar 2024 12:43:56 -0400 Subject: [PATCH 1/3] 805 - Making the clickable area on dashboard a button --- .../uswds/_uswds-theme-custom-styles.scss | 21 ++++++++----------- app/assets/sass/uswds/_uswds-theme.scss | 6 +++++- app/templates/views/dashboard/_totals.html | 13 +++++++----- app/templates/views/dashboard/dashboard.html | 1 - 4 files changed, 22 insertions(+), 19 deletions(-) diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 54bcd55c8..1193e00be 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -312,18 +312,15 @@ td.table-empty-message { .dashboard { .big-number-with-status { - a { - background: color("blue-60v"); - padding: units(2); - margin-bottom: units(1); - text-decoration: none; - &:hover{ - background: color("blue-warm-70v"); - } - } - span { - color: white; - } + // a { + // background: color("blue-60v"); + // padding: units(2); + // margin-bottom: units(1); + // text-decoration: none; + // &:hover{ + // background: color("blue-warm-70v"); + // } + // } .big-number-smaller { display: flex; flex-direction: column; diff --git a/app/assets/sass/uswds/_uswds-theme.scss b/app/assets/sass/uswds/_uswds-theme.scss index b588e264d..bc4b9b733 100644 --- a/app/assets/sass/uswds/_uswds-theme.scss +++ b/app/assets/sass/uswds/_uswds-theme.scss @@ -9,5 +9,9 @@ in the form $setting: value, @use "uswds-core" with ( $theme-font-type-sans: "public-sans", - $theme-show-notifications: false + $theme-show-notifications: false, + $theme-banner-max-width: "desktop-lg", + $theme-grid-container-max-width: "desktop-lg", + $theme-footer-max-width: "desktop-lg", + $theme-header-max-width: "desktop-lg" ); diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index 20c1d3a81..fab3b0435 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -1,18 +1,21 @@
- - + +

{% if statistics['sms']['requested'] is number %} - {{ "{:,}".format(statistics['sms']['requested']) }} + {{ "{:,}".format(statistics['sms']['requested']) }} {% else %} - {{ statistics['sms']['requested'] }} + {{ statistics['sms']['requested'] }} {% endif %} - {{ statistics['sms']['requested']|message_count_label('sms', suffix='sent') }} + {{ statistics['sms']['requested']|message_count_label('sms', suffix='sent') }} in the last seven days +

+
+ Details {% if show_failures %} diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index c19b837ad..504747847 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -21,7 +21,6 @@

Messages sent

-

In the last seven days

{{ ajax_block(partials, updates_url, 'inbox') }} From de003a87223857da09e8ba7c27e9092a05de26ff Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Tue, 19 Mar 2024 12:10:43 -0400 Subject: [PATCH 2/3] Removed "failure" area so the user can get to all the statuses from the Dashboard Landing screen. A better way to view all statuses will come with a Dashboard redesign. --- app/templates/views/dashboard/_totals.html | 25 ++-------------------- tests/app/main/views/test_dashboard.py | 2 +- 2 files changed, 3 insertions(+), 24 deletions(-) diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index fab3b0435..87d6c22eb 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -17,30 +17,9 @@ Details - {% if show_failures %} - - {% if statistics['sms']['failed'] %} - - {{ "{:,}".format(statistics['sms']['failed']) }} - failed – {{ statistics['sms']['failed_percentage'] }}% - - {% else %} - No failures - {% endif %} - - {% endif %} + {# Removing the failures area for now, as the user can click on the above link to see all the details. + In the future state of the dashboard, the all statuses will be more apparent with data visualizations #}
-
diff --git a/tests/app/main/views/test_dashboard.py b/tests/app/main/views/test_dashboard.py index 37674e797..7d0ae9227 100644 --- a/tests/app/main/views/test_dashboard.py +++ b/tests/app/main/views/test_dashboard.py @@ -655,7 +655,7 @@ def test_should_not_show_recent_templates_on_dashboard_if_only_one_template_used expected_count = stats[0]["count"] assert expected_count == 50 assert normalize_spaces(page.select_one("#total-sms .big-number-smaller").text) == ( - "{} text messages sent".format(expected_count) + "{} text messages sent in the last seven days".format(expected_count) ) From 24a0dd8c3bebfa48639a0343f6d712ac93e717e9 Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Thu, 21 Mar 2024 11:00:44 -0400 Subject: [PATCH 3/3] Few style updates per PR feedback --- .../sass/uswds/_uswds-theme-custom-styles.scss | 13 ++----------- app/templates/views/dashboard/_totals.html | 2 +- app/templates/views/dashboard/dashboard.html | 2 +- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index 1193e00be..7f2422064 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -312,24 +312,15 @@ td.table-empty-message { .dashboard { .big-number-with-status { - // a { - // background: color("blue-60v"); - // padding: units(2); - // margin-bottom: units(1); - // text-decoration: none; - // &:hover{ - // background: color("blue-warm-70v"); - // } - // } .big-number-smaller { display: flex; flex-direction: column; .big-number-number { font-size: units(5); - line-height: units(6); + line-height: units(5); } .big-number-label { - font-size: units(3); + font-size: units(2.5); } } .big-number-status { diff --git a/app/templates/views/dashboard/_totals.html b/app/templates/views/dashboard/_totals.html index 87d6c22eb..9a297bf53 100644 --- a/app/templates/views/dashboard/_totals.html +++ b/app/templates/views/dashboard/_totals.html @@ -1,6 +1,6 @@
-
+

diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index 504747847..fc20af762 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -18,7 +18,7 @@ {{ ajax_block(partials, updates_url, 'upcoming') }} -

+

Messages sent