diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index e57146b14b..38ae4059fe 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -231,6 +231,13 @@ td.table-empty-message { background-position: 0; } +.folder-heading-template { + background: url(../img/material-icons/wysiwyg.svg) no-repeat; + padding-left: units(4); + display: inline-block; + background-position: 0; +} + .usa-checkbox .usa-checkbox__label { + a.template-list-folder { margin-left: units(4); @@ -265,6 +272,7 @@ td.table-empty-message { margin-bottom: units(2); .usa-form-group { @include u-width("mobile-lg"); + margin-top: units(2); } input#search { width: 100%; @@ -397,6 +405,11 @@ td.table-empty-message { background-image: url(../img/material-icons/description.svg); } } + .get-started { + border: 1px solid color("gray-90"); + padding: units(2); + margin-bottom: units(4); + } } .dashboard-table { @@ -912,3 +925,10 @@ li.linked-card:hover svg, margin-left: calc(24px + 4px); margin-top: 4px; } + +// Send message flow + +#breadcrumb-template-folders, #nav-service-nav span { + font-size: units(3); + font-weight: bold; +} diff --git a/app/main/views/send.py b/app/main/views/send.py index 3d83d10f3a..a6601840da 100644 --- a/app/main/views/send.py +++ b/app/main/views/send.py @@ -739,7 +739,7 @@ def all_placeholders_in_session(placeholders): def get_send_test_page_title(template_type, entering_recipient, name=None): if entering_recipient: - return "Send ‘{}’".format(name) + return "Select recipients" return "Personalize this message" diff --git a/app/templates/base.html b/app/templates/base.html index b2b6639e90..0348832bd2 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -6,9 +6,7 @@ - {% block pageTitle %} - {% block per_page_title %}{% endblock %} – Notify.gov - {% endblock %} + {% block pageTitle %}{% block per_page_title %}{% endblock %} – Notify.gov{% endblock %} {% include "components/head.html" %} diff --git a/app/templates/components/folder-path.html b/app/templates/components/folder-path.html index b6615a2da7..976253ee31 100644 --- a/app/templates/components/folder-path.html +++ b/app/templates/components/folder-path.html @@ -4,9 +4,9 @@ template_type, current_user, link_current_item=False, - root_element='h1' + root_element='nav' ) %} - <{{ root_element }} class="font-body-lg folder-heading margin-bottom-0"{% if root_element == 'h1' %} id="page-header"{% endif %}> + <{{ root_element }} id="breadcrumb-template-folders" class="navigation-service usa-breadcrumb padding-top-0 padding-bottom-05" aria-label="Template folder path"> {% for folder in folders %} {% if loop.last and not link_current_item %} {% if folder.template_type or not folder.id %} diff --git a/app/templates/components/live-search.html b/app/templates/components/live-search.html index 9df46fd1aa..58683e9579 100644 --- a/app/templates/components/live-search.html +++ b/app/templates/components/live-search.html @@ -17,7 +17,7 @@ {% endif %} {% if show %} - diff --git a/app/templates/views/dashboard/dashboard.html b/app/templates/views/dashboard/dashboard.html index f4430e5662..04abe1afcc 100644 --- a/app/templates/views/dashboard/dashboard.html +++ b/app/templates/views/dashboard/dashboard.html @@ -13,7 +13,7 @@ -
+

Dashboard

{% if current_user.has_permissions('manage_templates') and not current_service.all_templates %} @@ -22,7 +22,7 @@

Dashboard

{{ ajax_block(partials, updates_url, 'upcoming') }} -

{{ current_service.name }} Dashboard

+

{{ current_service.name }} Dashboard

{{ ajax_block(partials, updates_url, 'inbox') }} diff --git a/app/templates/views/dashboard/write-first-messages.html b/app/templates/views/dashboard/write-first-messages.html index 2d2e30e75b..50dc23fec0 100644 --- a/app/templates/views/dashboard/write-first-messages.html +++ b/app/templates/views/dashboard/write-first-messages.html @@ -1,4 +1,6 @@ -

Get started

- - Create your first template - + diff --git a/app/templates/views/notifications/preview.html b/app/templates/views/notifications/preview.html index 5c702a3861..d0be74aed4 100644 --- a/app/templates/views/notifications/preview.html +++ b/app/templates/views/notifications/preview.html @@ -10,7 +10,7 @@ {% elif help %} {{ "Example text message" }} {% else %} - {{ "Preview" }} + {{ "Preview for sending" }} {% endif %} {% endblock %} @@ -50,7 +50,7 @@ {% endcall %}
{% else %} - {{ page_header("Example text message" if help else "Preview") }} + {{ page_header("Example text message" if help else "Preview for sending") }} {% endif %} {% if not help %} diff --git a/app/templates/views/templates/choose.html b/app/templates/views/templates/choose.html index 964ab10dce..281374c379 100644 --- a/app/templates/views/templates/choose.html +++ b/app/templates/views/templates/choose.html @@ -1,4 +1,4 @@ -{% from "components/folder-path.html" import folder_path, page_title_folder_path %} +{% from "components/folder-path.html" import folder_path %} {% from "components/pill.html" import pill %} {% from "components/live-search.html" import live_search %} {% from "components/form.html" import form_wrapper %} @@ -8,11 +8,9 @@ {% extends "withnav_template.html" %} -{% set page_title = 'Templates' %} +{% set page_title = 'Select or create a template' %} -{% block service_page_title %} - {{ page_title_folder_path(template_folder_path) }} -{% endblock %} +{% block service_page_title %}{{page_title}}{% endblock %} {% block maincolumn_content %} @@ -34,14 +32,11 @@ {% else %}
+

{{page_title}}

-
-
-

- Every message starts with a template. To send, choose or create a template. -

-
-
+

+ Every message starts with a template. To send, choose or create a template. +

{{ folder_path( folders=template_folder_path, service_id=current_service.id, diff --git a/app/templates/views/templates/manage-template-folder.html b/app/templates/views/templates/manage-template-folder.html index 528631f2e4..42a3cbf7c9 100644 --- a/app/templates/views/templates/manage-template-folder.html +++ b/app/templates/views/templates/manage-template-folder.html @@ -3,9 +3,9 @@ {% from "components/page-footer.html" import page_footer %} {% from "components/form.html" import form_wrapper %} -{% block service_page_title %} - {{ page_title_folder_path(template_folder_path) }} -{% endblock %} +{% set page_title = 'Select or create a template' %} + +{% block service_page_title %}{{page_title}}{% endblock %} {% block maincolumn_content %} diff --git a/app/templates/views/templates/template.html b/app/templates/views/templates/template.html index d7dbf94aed..f04f9f4907 100644 --- a/app/templates/views/templates/template.html +++ b/app/templates/views/templates/template.html @@ -1,13 +1,13 @@ {% extends "withnav_template.html" %} {% from "components/banner.html" import banner_wrapper %} -{% from "components/folder-path.html" import folder_path, page_title_folder_path %} +{% from "components/folder-path.html" import folder_path %} {% from "components/page-footer.html" import page_footer %} {% from "components/copy-to-clipboard.html" import copy_to_clipboard %} {% from "components/components/button/macro.njk" import usaButton %} -{% block service_page_title %} - {{ page_title_folder_path(current_service.get_template_path(template._template)) }} -{% endblock %} +{% set page_title = 'Confirm your template' %} + +{% block service_page_title %}{{page_title}}{% endblock %} {% block maincolumn_content %} @@ -32,8 +32,8 @@ {% else %}
-

- Review your message +

+ {{page_title}}

{{ folder_path( folders=current_service.get_template_path(template._template), diff --git a/app/templates/withnav_template.html b/app/templates/withnav_template.html index eb6a422444..d7a249562b 100644 --- a/app/templates/withnav_template.html +++ b/app/templates/withnav_template.html @@ -1,12 +1,7 @@ {% extends "base.html" %} -{% block per_page_title %} - {% if current_org.name %} - {% block org_page_title %}{% endblock %} – {{ current_org.name }} - {% else %} - {% block service_page_title %}{% endblock %} – {{ current_service.name }} - {% endif %} -{% endblock %} +{% block per_page_title %}{% if current_org.name %}{% block org_page_title %}{% endblock %} – {{ current_org.name }}{% + else %}{% block service_page_title %}{% endblock %} – {{ current_service.name }}{% endif %}{% endblock %} {% block main %}
diff --git a/tests/app/main/views/test_accept_invite.py b/tests/app/main/views/test_accept_invite.py index 59c4651c62..ef5e56fda5 100644 --- a/tests/app/main/views/test_accept_invite.py +++ b/tests/app/main/views/test_accept_invite.py @@ -269,7 +269,7 @@ def test_invite_goes_in_session( ("user", "landing_page_title"), [ (create_active_user_with_permissions(), "Dashboard"), - (create_active_caseworking_user(), "Templates"), + (create_active_caseworking_user(), "Select or create a template"), ], ) def test_accepting_invite_removes_invite_from_session( diff --git a/tests/app/main/views/test_send.py b/tests/app/main/views/test_send.py index 1d8e696f80..806474c491 100644 --- a/tests/app/main/views/test_send.py +++ b/tests/app/main/views/test_send.py @@ -1253,7 +1253,7 @@ def test_send_one_off_has_correct_page_title( step_index=0, _follow_redirects=True, ) - assert page.h1.text.strip() == "Send ‘Two week reminder’" + assert page.h1.text.strip() == "Select recipients" assert len(page.select(".banner-tour")) == 0 @@ -2712,7 +2712,7 @@ def test_preview_notification_shows_preview( template_id=fake_uuid, _expected_status=200, ) - assert page.h1.text.strip() == "Preview" + assert page.h1.text.strip() == "Preview for sending" assert (page.find_all("a", {"class": "usa-back-link"})[0]["href"]) == url_for( "main.check_notification", service_id=service_one["id"], diff --git a/tests/app/main/views/test_template_folders.py b/tests/app/main/views/test_template_folders.py index 0bf2fcb084..bb31c8f41a 100644 --- a/tests/app/main/views/test_template_folders.py +++ b/tests/app/main/views/test_template_folders.py @@ -41,8 +41,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): @pytest.mark.parametrize( ( - "expected_title_tag", "expected_page_title", + "expected_title_tag", "expected_parent_link_args", "extra_args", "expected_nav_links", @@ -53,8 +53,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): ), [ ( - "Templates – service one – Notify.gov", - "Templates", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [], {}, ["Email", "Text message"], @@ -92,8 +92,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "Templates – service one – Notify.gov", - "Templates", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [], {"template_type": "all"}, ["Email", "Text message"], @@ -131,8 +131,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "Templates – service one – Notify.gov", - "Templates", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [], {"template_type": "sms"}, ["All", "Email"], @@ -159,8 +159,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "folder_one – Templates – service one – Notify.gov", - "Templates folder_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "all"}], {"template_folder_id": PARENT_FOLDER_ID}, ["Email", "Text message"], @@ -182,8 +182,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "folder_one – Templates – service one – Notify.gov", - "Templates folder_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "sms"}], {"template_type": "sms", "template_folder_id": PARENT_FOLDER_ID}, ["All", "Email"], @@ -199,8 +199,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "folder_one – Templates – service one – Notify.gov", - "Templates folder_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "email"}], {"template_type": "email", "template_folder_id": PARENT_FOLDER_ID}, ["All", "Text message"], @@ -210,8 +210,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): "There are no email templates in this folder", ), ( - "folder_one_one – folder_one – Templates – service one – Notify.gov", - "Templates folder_one folder_one_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [ {"template_type": "all"}, {"template_type": "all", "template_folder_id": PARENT_FOLDER_ID}, @@ -229,8 +229,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "folder_one_one_one – folder_one_one – folder_one – Templates – service one – Notify.gov", - "Templates folder_one folder_one_one folder_one_one_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [ {"template_type": "all"}, {"template_type": "all", "template_folder_id": PARENT_FOLDER_ID}, @@ -250,8 +250,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): None, ), ( - "folder_one_one_one – folder_one_one – folder_one – Templates – service one – Notify.gov", - "Templates folder_one folder_one_one folder_one_one_one", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [ {"template_type": "email"}, {"template_type": "email", "template_folder_id": PARENT_FOLDER_ID}, @@ -268,8 +268,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): "There are no email templates in this folder", ), ( - "folder_two – Templates – service one – Notify.gov", - "Templates folder_two", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "all"}], {"template_folder_id": FOLDER_TWO_ID}, ["Email", "Text message"], @@ -279,8 +279,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): "This folder is empty", ), ( - "folder_two – Templates – service one – Notify.gov", - "Templates folder_two", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "sms"}], {"template_folder_id": FOLDER_TWO_ID, "template_type": "sms"}, ["All", "Email"], @@ -290,8 +290,8 @@ def _folder(name, folder_id=None, parent=None, users_with_permission=None): "This folder is empty", ), ( - "folder_two – Templates – service one – Notify.gov", - "Templates folder_two", + "Select or create a template – service one – Notify.gov", + "Select or create a template", [{"template_type": "all"}], {"template_folder_id": FOLDER_TWO_ID, "template_type": "all"}, ["Email", "Text message"], @@ -346,12 +346,13 @@ def test_should_show_templates_folder_page( **extra_args, ) - assert normalize_spaces(page.select_one("title").text) == expected_title_tag - assert normalize_spaces(page.select_one("h1").text) == expected_page_title + assert normalize_spaces(page.select_one("title").text) == expected_page_title + assert normalize_spaces(page.select_one("h1").text) == expected_title_tag - assert len(page.select("h1 a")) == len(expected_parent_link_args) + # remove this line if you don't want the breadcrumb on the first page + assert len(page.select("nav#breadcrumb-template-folders a")) == len(expected_parent_link_args) - for index, parent_link in enumerate(page.select("h1 a")): + for index, parent_link in enumerate(page.select("nav#breadcrumb-template-folders a")): assert parent_link["href"] == url_for( "main.choose_template", service_id=SERVICE_ONE_ID, @@ -529,7 +530,7 @@ def test_get_manage_folder_page( _test_page_title=False, ) assert normalize_spaces(page.select_one("title").text) == ( - "folder_two – Templates – service one – Notify.gov" + "Select or create a template – service one – Notify.gov" ) assert page.select_one("input[name=name]")["value"] == "folder_two" delete_link = page.find("a", string="Delete this folder") @@ -571,7 +572,7 @@ def test_get_manage_folder_viewing_permissions_for_users( _test_page_title=False, ) assert normalize_spaces(page.select_one("title").text) == ( - "folder_two – Templates – service one – Notify.gov" + "Select or create a template – service one – Notify.gov" ) form_labels = page.select("legend.usa-legend") assert ( @@ -634,7 +635,7 @@ def test_get_manage_folder_viewing_permissions_for_users_not_visible_when_no_man _test_page_title=False, ) assert normalize_spaces(page.select_one("title").text) == ( - "folder_two – Templates – service one – Notify.gov" + "Select or create a template – service one – Notify.gov" ) form_labels = page.select("legend[class=form-label]") assert len(form_labels) == 0 @@ -671,7 +672,7 @@ def test_get_manage_folder_viewing_permissions_for_users_not_visible_for_service _test_page_title=False, ) assert normalize_spaces(page.select_one("title").text) == ( - "folder_two – Templates – service one – Notify.gov" + "Select or create a template – service one – Notify.gov" ) form_labels = page.select("legend[class=form-label]") assert len(form_labels) == 0 diff --git a/tests/app/main/views/test_templates.py b/tests/app/main/views/test_templates.py index 6e2ff227de..68ec6f2195 100644 --- a/tests/app/main/views/test_templates.py +++ b/tests/app/main/views/test_templates.py @@ -69,7 +69,7 @@ def test_should_show_empty_page_when_no_templates( service_id=service_one["id"], ) - assert normalize_spaces(page.select_one("h1").text) == ("Templates") + assert normalize_spaces(page.select_one("h1").text) == ("Select or create a template") assert normalize_spaces(page.select_one("main p").text) == (expected_message) assert page.select_one("#add_new_folder_form") assert page.select_one("#add_new_template_form") @@ -87,7 +87,7 @@ def test_should_show_add_template_form_if_service_has_folder_permission( service_id=service_one["id"], ) - assert normalize_spaces(page.select_one("h1").text) == ("Templates") + assert normalize_spaces(page.select_one("h1").text) == ("Select or create a template") assert normalize_spaces(page.select_one("main p").text) == ( "Every message starts with a template. You can change it later. " "You need a template before you can send messages." @@ -110,7 +110,7 @@ def test_should_show_add_template_form_if_service_has_folder_permission( [ ( create_active_user_view_permissions(), - "Templates", + "Select or create a template", {}, ["Email", "Text message"], [ @@ -122,21 +122,21 @@ def test_should_show_add_template_form_if_service_has_folder_permission( ), ( create_active_user_view_permissions(), - "Templates", + "Select or create a template", {"template_type": "sms"}, ["All", "Email"], ["sms_template_one", "sms_template_two"], ), ( create_active_user_view_permissions(), - "Templates", + "Select or create a template", {"template_type": "email"}, ["All", "Text message"], ["email_template_one", "email_template_two"], ), ( create_active_caseworking_user(), - "Templates", + "Select or create a template", {}, ["Email", "Text message"], [ @@ -148,7 +148,7 @@ def test_should_show_add_template_form_if_service_has_folder_permission( ), ( create_active_caseworking_user(), - "Templates", + "Select or create a template", {"template_type": "email"}, ["All", "Text message"], ["email_template_one", "email_template_two"], @@ -581,9 +581,9 @@ def test_should_be_able_to_view_a_template_with_links( _test_page_title=False, ) - assert normalize_spaces(page.select_one("h1").text) == ("Review your message") + assert normalize_spaces(page.select_one("h1").text) == ("Confirm your template") assert normalize_spaces(page.select_one("title").text) == ( - "Two week reminder – Templates – service one – Notify.gov" + "Confirm your template – service one – Notify.gov" ) assert [