From 65b1b142b0aa79c6e5140805ae4586b531242ea4 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Nov 2018 14:42:33 +0000 Subject: [PATCH 1/3] Show full emails on check notifications page MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Because we’re going to use a sticky footer on this page we don’t need to show the email in its collapsed form. Showing the email is only needed to: - fit more things on a page - make sure a button comes up above the fold (which the sticky footer will solve) --- app/main/views/send.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/main/views/send.py b/app/main/views/send.py index cfab9b585..1832b24c3 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -853,6 +853,7 @@ def _check_notification(service_id, template_id, exception=None): db_template, current_service, show_recipient=True, + expand_emails=True, email_reply_to=email_reply_to, sms_sender=sms_sender, letter_preview_url=url_for( From 9bd91ed60a85a743ea4738a6330249a81de9750a Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Nov 2018 15:18:15 +0000 Subject: [PATCH 2/3] Style spacing for sticky footers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sticky footers need slightly different spacing to sticky headers so they look balanced. They can’t just inherit the same spacing. --- .../components/stick-at-top-when-scrolling.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss index 71662c80c..ec75473d3 100644 --- a/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss +++ b/app/assets/stylesheets/components/stick-at-top-when-scrolling.scss @@ -40,7 +40,15 @@ .js-stick-at-bottom-when-scrolling { + $vertical-padding: $gutter * 2 / 3; + transition: bottom 0.1s ease-out, box-shadow 1s ease-in-out; + padding: $vertical-padding 0 $vertical-padding $gutter-half; + margin-top: -$vertical-padding; + + .page-footer { + margin-bottom: 0; + } } From 7e4ef84635a34a4a4b77455a026d0dc2ab11e831 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Mon, 19 Nov 2018 15:21:09 +0000 Subject: [PATCH 3/3] Put sticky footers on check one-off page This page is a good use case for sticky footers because the primary action on the page would otherwise be off the bottom of the viewport. --- app/main/views/send.py | 1 + app/templates/views/notifications/check.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/main/views/send.py b/app/main/views/send.py index 1832b24c3..188a46fa7 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -543,6 +543,7 @@ def _check_messages(service_id, template_id, upload_id, preview_row, letters_as_ db_template, current_service, show_recipient=True, + expand_emails=True, letter_preview_url=url_for( '.check_messages_preview', service_id=service_id, diff --git a/app/templates/views/notifications/check.html b/app/templates/views/notifications/check.html index 15beea30f..8ab9434cc 100644 --- a/app/templates/views/notifications/check.html +++ b/app/templates/views/notifications/check.html @@ -52,7 +52,7 @@ {{ template|string }} -
+