diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index cec48e82b..e57146b14 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -676,28 +676,28 @@ details form { margin-top: 0; } -ol.best-practices-list { +ol.guides-list { counter-reset: item; list-style-type: none; padding-left: 0; } -ol.best-practices-list.set-two { +ol.guides-list.set-two { counter-reset: item 6; } -ol.best-practices-list.set-three { +ol.guides-list.set-three { counter-reset: item 10; } -ol.best-practices-list li { +ol.guides-list li { counter-increment: item; margin-bottom: 15px; position: relative; padding-left: 40px; } -ol.best-practices-list li::before { +ol.guides-list li::before { content: counter(item); background-color: #005ea2; color: white; @@ -713,11 +713,11 @@ ol.best-practices-list li::before { top: 0; } -li.best-practices { +li.guides { padding-bottom: 50px; } -div.best-practices { +div.guides { height: 400px } @@ -820,7 +820,7 @@ $do-dont-top-bar-width: 1; } @media (max-width: 758px) { - .best-practices-flex-container { + .guides-flex-container { flex-direction: column; } } diff --git a/app/main/views/index.py b/app/main/views/index.py index 54e9d9df7..80646ac66 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -25,7 +25,7 @@ from app.utils.user import user_is_logged_in # Hook to check for feature flags @main.before_request def check_feature_flags(): - if request.path.startswith("/guides/best-practices") and not current_app.config.get( + if request.path.startswith("/guides") and not current_app.config.get( "FEATURE_BEST_PRACTICES_ENABLED", False ): abort(404) @@ -207,61 +207,61 @@ def trial_mode_new(): @user_is_logged_in def best_practices(): return render_template( - "views/best-practices/best-practices.html", + "views/guides/best-practices.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/clear-goals") +@main.route("/guides/clear-goals") @user_is_logged_in def clear_goals(): return render_template( - "views/best-practices/clear-goals.html", + "views/guides/clear-goals.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/rules-and-regulations") +@main.route("/guides/rules-and-regulations") @user_is_logged_in def rules_and_regulations(): return render_template( - "views/best-practices/rules-and-regulations.html", + "views/guides/rules-and-regulations.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/establish-trust") +@main.route("/guides/establish-trust") @user_is_logged_in def establish_trust(): return render_template( - "views/best-practices/establish-trust.html", + "views/guides/establish-trust.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/write-for-action") +@main.route("/guides/write-for-action") @user_is_logged_in def write_for_action(): return render_template( - "views/best-practices/write-for-action.html", + "views/guides/write-for-action.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/multiple-languages") +@main.route("/guides/multiple-languages") @user_is_logged_in def multiple_languages(): return render_template( - "views/best-practices/multiple-languages.html", + "views/guides/multiple-languages.html", navigation_links=best_practices_nav(), ) -@main.route("/guides/best-practices/benchmark-performance") +@main.route("/guides/benchmark-performance") @user_is_logged_in def benchmark_performance(): return render_template( - "views/best-practices/benchmark-performance.html", + "views/guides/benchmark-performance.html", navigation_links=best_practices_nav(), ) diff --git a/app/templates/components/best-practices/cards.html b/app/templates/components/guides/cards.html similarity index 100% rename from app/templates/components/best-practices/cards.html rename to app/templates/components/guides/cards.html diff --git a/app/templates/components/best-practices/circle_number.html b/app/templates/components/guides/circle_number.html similarity index 100% rename from app/templates/components/best-practices/circle_number.html rename to app/templates/components/guides/circle_number.html diff --git a/app/templates/components/best-practices/nav_breadcrumb.html b/app/templates/components/nav_breadcrumb.html similarity index 55% rename from app/templates/components/best-practices/nav_breadcrumb.html rename to app/templates/components/nav_breadcrumb.html index fb5124356..83305cf9b 100644 --- a/app/templates/components/best-practices/nav_breadcrumb.html +++ b/app/templates/components/nav_breadcrumb.html @@ -1,8 +1,12 @@ +{% macro breadcrumb(title, parent_menu_title, url) %} +{% endmacro %} diff --git a/app/templates/views/about/about.html b/app/templates/views/about/about.html index cd52709c2..17180cef7 100644 --- a/app/templates/views/about/about.html +++ b/app/templates/views/about/about.html @@ -7,7 +7,6 @@ {% endblock %} {% block content_column_content %} -

{{page_title}}

Notify.gov is a text messaging service built by and for the government. We help agencies communicate more diff --git a/app/templates/views/about/security.html b/app/templates/views/about/security.html index 9ebc0420f..0a916035e 100644 --- a/app/templates/views/about/security.html +++ b/app/templates/views/about/security.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} {% set page_title = "Security" %} @@ -7,7 +8,8 @@ {% endblock %} {% block content_column_content %} - +{{ breadcrumbs.breadcrumb(page_title, "About", "main.about_notify") }} +

{{page_title}}

Notify.gov is built for the needs of government agencies with fundamental system diff --git a/app/templates/views/about/why-text-messaging.html b/app/templates/views/about/why-text-messaging.html index 6aa0887cb..2b1982225 100644 --- a/app/templates/views/about/why-text-messaging.html +++ b/app/templates/views/about/why-text-messaging.html @@ -1,4 +1,6 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} + {% set page_title = "Why text messaging" %} {% block per_page_title %} @@ -6,8 +8,7 @@ {% endblock %} {% block content_column_content %} - +{{ breadcrumbs.breadcrumb(page_title, "About", "main.about_notify") }}

{{page_title}}

diff --git a/app/templates/views/best-practices/benchmark-performance.html b/app/templates/views/guides/benchmark-performance.html similarity index 93% rename from app/templates/views/best-practices/benchmark-performance.html rename to app/templates/views/guides/benchmark-performance.html index 2661f6b00..5e24dc9cd 100644 --- a/app/templates/views/best-practices/benchmark-performance.html +++ b/app/templates/views/guides/benchmark-performance.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} {% set page_title = "Measuring performance with benchmarking" %} @@ -7,7 +8,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

{{page_title}}

Learn how effective your texting program can be.

@@ -19,7 +21,7 @@

What other texting studies have found

- When the Center on Budget and Policy Priorities studied WIC, they found key learnings about the quantity of messages delivered, how people engage with messages, and how they take action. @@ -78,7 +80,8 @@

- The Code for America’s Texting + The Code for America’s Texting Playbook reported specific learnings around appointment reminders, completing document submission, and maintenance reminders. diff --git a/app/templates/views/best-practices/best-practices.html b/app/templates/views/guides/best-practices.html similarity index 78% rename from app/templates/views/best-practices/best-practices.html rename to app/templates/views/guides/best-practices.html index 7711dea9b..4784f72c4 100644 --- a/app/templates/views/best-practices/best-practices.html +++ b/app/templates/views/guides/best-practices.html @@ -1,11 +1,12 @@ {% extends "base.html" %} +{% set page_title = "Best Practices" %} + {% block per_page_title %} -Best Practices +{{page_title}} {% endblock %} {% block content_column_content %} -

Best Practices

For texting the public

@@ -23,41 +24,41 @@ Best Practices "svg_src": "goal", "card_heading": "Establish clear goals", "p_text": "Start with a singular purpose. Make explicit what you want to achieve.", - "link": "/guides/best-practices/clear-goals" + "link": "/guides/clear-goals" }, { "svg_src": "compliant", "card_heading": "Follow rules & regulations", "p_text": "Understand what is required when texting the public.", - "link": "/guides/best-practices/rules-and-regulations" + "link": "/guides/rules-and-regulations" }, { "svg_src": "trust", "card_heading": "Establish trust", "p_text": "Help your audience anticipate and welcome your texts.", - "link": "/guides/best-practices/establish-trust" + "link": "/guides/establish-trust" }, { "svg_src": "runner", "card_heading": "Write texts that provoke action", "p_text": "Help your audience know what to do with the information you send.", - "link": "/guides/best-practices/write-for-action" + "link": "/guides/write-for-action" }, { "svg_src": "language", "card_heading": "Send texts in multiple languages", "p_text": "What to know as you plan translated texts.", - "link": "/guides/best-practices/multiple-languages" + "link": "/guides/multiple-languages" }, { "svg_src": "chart", "card_heading": "Measure performance with benchmarking", "p_text": "Learn how effective your texting program can be.", - "link": "/guides/best-practices/benchmark-performance" + "link": "/guides/benchmark-performance" } ] %} - {% with card_contents=card_contents %}{% include "components/best-practices/cards.html" %}{% + {% with card_contents=card_contents %}{% include "components/guides/cards.html" %}{% endwith %}
diff --git a/app/templates/views/best-practices/clear-goals.html b/app/templates/views/guides/clear-goals.html similarity index 97% rename from app/templates/views/best-practices/clear-goals.html rename to app/templates/views/guides/clear-goals.html index b67684c04..71ed0e1a3 100644 --- a/app/templates/views/best-practices/clear-goals.html +++ b/app/templates/views/guides/clear-goals.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} {% set page_title = "Establish clear goals" %} @@ -7,7 +8,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

{{page_title}}

Start with a singular purpose. Make explicit what you want to achieve.

@@ -160,7 +162,7 @@

Review your drafted hypothesis with your team to make sure everyone is aligned on your desired goals. A clear and - concise hypothesis can help you decide how to write text message + concise hypothesis can help you decide how to write text message content that provokes action.

diff --git a/app/templates/views/best-practices/establish-trust.html b/app/templates/views/guides/establish-trust.html similarity index 94% rename from app/templates/views/best-practices/establish-trust.html rename to app/templates/views/guides/establish-trust.html index fc26e2a71..3383315ba 100644 --- a/app/templates/views/best-practices/establish-trust.html +++ b/app/templates/views/guides/establish-trust.html @@ -1,5 +1,7 @@ {% extends "base.html" %} -{% from "components/best-practices/circle_number.html" import circle_number %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} + +{% from "components/guides/circle_number.html" import circle_number %} {% set page_title = "Establish trust" %} @@ -8,7 +10,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

{{page_title}}

Help your audience anticipate and welcome your texts.

@@ -38,7 +41,7 @@
  • To reinforce legitimacy, include these key messages in your outreach:

    -
      +
      1. Introduce yourself – Give people time to get to know your texting communications before you need direct action from them
      2. Phone number – Note the sending phone number your texts will come from
      3. @@ -79,7 +82,7 @@
        • -
            +
            1. Identify yourself in the text message. Use a consistent and familiar program name to precede each text you send.
            2. Personalize with first name. Through A/B testing, Code for America saw an increase in @@ -98,7 +101,7 @@

              {{circle_number(7) }}Dept. of Social Services: Hi {{circle_number(8) }}Julie, Your Medicaid renewal is closing December 31, 2023. You can renew online at {{circle_number(9) }}https://www.application.yourstate.gov or {{circle_number(10) }} call the number on the back of your Medicaid card.

              @@ -114,14 +117,14 @@

              If you're sending one-way notifications, phone carriers allow a single auto-response message that will be generated if a recipient tries to text a response to your message. Use the auto-response to reaffirm your key messages around legitimacy and communicate to recipients that texts are coming from an automated system.

              -
                +
                1. Provide a way to contact a human in any auto-response text
                2. Provide information on how to opt out and opt back in
        • -
          +
          Phone

          @@ -167,7 +170,7 @@ }, ] %} - {% with card_contents=card_contents %}{% include "components/best-practices/cards.html" %}{% + {% with card_contents=card_contents %}{% include "components/guides/cards.html" %}{% endwith %}

          Prepare your team

          {% set card_contents = [ @@ -187,7 +190,7 @@ pages or within case management notes.", }, ] %} - {% with card_contents=card_contents %}{% include "components/best-practices/cards.html" %}{% + {% with card_contents=card_contents %}{% include "components/guides/cards.html" %}{% endwith %}
  • {% endblock %} diff --git a/app/templates/views/best-practices/multiple-languages.html b/app/templates/views/guides/multiple-languages.html similarity index 87% rename from app/templates/views/best-practices/multiple-languages.html rename to app/templates/views/guides/multiple-languages.html index 13c638d38..dd9c3727f 100644 --- a/app/templates/views/best-practices/multiple-languages.html +++ b/app/templates/views/guides/multiple-languages.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} {% set page_title = "Text in multiple languages" %} @@ -7,7 +8,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

    {{page_title}}

    What to know as you plan translated texts.

    diff --git a/app/templates/views/best-practices/rules-and-regulations.html b/app/templates/views/guides/rules-and-regulations.html similarity index 94% rename from app/templates/views/best-practices/rules-and-regulations.html rename to app/templates/views/guides/rules-and-regulations.html index c9a95a122..db06ab76e 100644 --- a/app/templates/views/best-practices/rules-and-regulations.html +++ b/app/templates/views/guides/rules-and-regulations.html @@ -1,4 +1,5 @@ {% extends "base.html" %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} {% set page_title = "Rules and regulations" %} @@ -7,7 +8,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

    {{page_title}}

    Understand what is required when texting the public.

    @@ -20,7 +22,7 @@ If you do need expressed consent, consider including a pre-checked plain language opt-in (i.e. “It’s OK to text me.”) on digital forms. Be sure to ask for an up-to-date phone number and include a question about the recipient’s preferred - language for text messages if you expect to translate your text + language for text messages if you expect to translate your text messages in languages other than English.

    @@ -79,7 +81,7 @@

    Opting out

    There is no policy requirement for senders to communicate opt-out options, but including instructions in introductory and/or + href="../guides/establish-trust#as-people-receive-texts"> including instructions in introductory and/or auto-response texts on how to opt out and opt back in are effective ways to establish trust with your audience.

    diff --git a/app/templates/views/best-practices/write-for-action.html b/app/templates/views/guides/write-for-action.html similarity index 90% rename from app/templates/views/best-practices/write-for-action.html rename to app/templates/views/guides/write-for-action.html index d97b74d8b..d3019596c 100644 --- a/app/templates/views/best-practices/write-for-action.html +++ b/app/templates/views/guides/write-for-action.html @@ -1,5 +1,6 @@ {% extends "base.html" %} -{% from "components/best-practices/circle_number.html" import circle_number %} +{% import "components/nav_breadcrumb.html" as breadcrumbs %} +{% from "components/guides/circle_number.html" import circle_number %} {% set page_title = "Write texts that provoke action" %} @@ -8,7 +9,8 @@ {% endblock %} {% block content_column_content %} -{% with title=page_title %}{% include "components/best-practices/nav_breadcrumb.html" %}{% endwith %} +{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +

    {{page_title}}

    Help your audience know what to do with the information you send.

    @@ -40,11 +42,11 @@
  • Use a neutral, direct, and professional tone. This works better than a friendly or overly casual tone.
  • Build conditions for action

    -
      +
      • For example, getting a person to update their mailing address:

        -
          +
          1. Clearly state the information and the response you want the recipient to take.
          2. Point directly to where the action can be completed, not to more information.
          3. Make sure the action can be completed via mobile phone, like calling a person or going to a @@ -78,7 +80,8 @@

      What provoking action looks like

      -

      Evidence +

      Evidence shows that employing behavioral science is an effective way to increase the likelihood of a recipient @@ -100,7 +103,7 @@ internet services that belong to you.", }, ] %} - {% with card_contents=card_contents, text_align='left' %}{% include "components/best-practices/cards.html" %}{% + {% with card_contents=card_contents, text_align='left' %}{% include "components/guides/cards.html" %}{% endwith %}

    {% endblock %} diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 27e7f074e..e32ca11ea 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -125,6 +125,7 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc "write_for_action", "multiple_languages", "benchmark_performance", + "guidance_index" ] return ( not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"] diff --git a/tests/end_to_end/test_best_practices_content_pages.py b/tests/end_to_end/test_best_practices_content_pages.py index 031e4baef..5a75f9694 100644 --- a/tests/end_to_end/test_best_practices_content_pages.py +++ b/tests/end_to_end/test_best_practices_content_pages.py @@ -11,7 +11,7 @@ E2E_TEST_URI = os.getenv("NOTIFY_E2E_TEST_URI") def test_best_practices_side_menu(authenticated_page): page = authenticated_page - page.goto(f"{E2E_TEST_URI}/guides/best-practices") + page.goto(f"{E2E_TEST_URI}") page.wait_for_load_state("domcontentloaded") check_axe_report(page) @@ -58,7 +58,7 @@ def test_best_practices_side_menu(authenticated_page): def test_breadcrumbs_best_practices(authenticated_page): page = authenticated_page - page.goto(f"{E2E_TEST_URI}/guides/best-practices") + page.goto(f"{E2E_TEST_URI}") page.wait_for_load_state("domcontentloaded") check_axe_report(page) diff --git a/urls.js b/urls.js index 2279b5a79..bd693cc90 100644 --- a/urls.js +++ b/urls.js @@ -14,23 +14,23 @@ const sublinks = [ { label: 'Security', path: '/features/security' }, { label: 'Support', path: '/support' }, { label: 'Best Practices', path: '/guides/best-practices' }, - { label: 'Clear Goals', path: '/guides/best-practices/clear-goals' }, + { label: 'Clear Goals', path: '/guides/clear-goals' }, { label: 'Rules And Regulations', - path: '/guides/best-practices/rules-and-regulations', + path: '/guides/rules-and-regulations', }, - { label: 'Establish Trust', path: '/guides/best-practices/establish-trust' }, + { label: 'Establish Trust', path: '/guides/establish-trust' }, { label: 'Write For Action', - path: '/guides/best-practices/write-for-action', + path: '/guides/write-for-action', }, { label: 'Multiple Languages', - path: '/guides/best-practices/multiple-languages', + path: '/guides/multiple-languages', }, { label: 'Benchmark Performance', - path: '/guides/best-practices/benchmark-performance', + path: '/guides/benchmark-performance', }, // Add more links here as needed ];