diff --git a/.ds.baseline b/.ds.baseline index 56c3afc7d..df4be33a6 100644 --- a/.ds.baseline +++ b/.ds.baseline @@ -161,7 +161,7 @@ "filename": "app/config.py", "hashed_secret": "577a4c667e4af8682ca431857214b3a920883efc", "is_verified": false, - "line_number": 123, + "line_number": 120, "is_secret": false } ], @@ -555,7 +555,7 @@ "filename": "tests/app/main/views/test_register.py", "hashed_secret": "5baa61e4c9b93f3f0682250b6cf8331b7ee68fd8", "is_verified": false, - "line_number": 201, + "line_number": 200, "is_secret": false }, { @@ -563,7 +563,7 @@ "filename": "tests/app/main/views/test_register.py", "hashed_secret": "bb5b7caa27d005d38039e3797c3ddb9bcd22c3c8", "is_verified": false, - "line_number": 274, + "line_number": 273, "is_secret": false } ], @@ -684,5 +684,5 @@ } ] }, - "generated_at": "2024-11-21T23:08:45Z" + "generated_at": "2025-01-13T20:16:58Z" } diff --git a/app/__init__.py b/app/__init__.py index 6f9f15e83..54248bda0 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -168,20 +168,12 @@ def _csp(config): def create_app(application): - application.config["FEATURE_BEST_PRACTICES_ENABLED"] = ( - os.getenv("FEATURE_BEST_PRACTICES_ENABLED", "false").lower() == "true" - ) - @application.context_processor def inject_feature_flags(): - feature_best_practices_enabled = application.config.get( - "FEATURE_BEST_PRACTICES_ENABLED", False - ) feature_about_page_enabled = application.config.get( "FEATURE_ABOUT_PAGE_ENABLED", False ) return dict( - FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled, FEATURE_ABOUT_PAGE_ENABLED=feature_about_page_enabled, ) diff --git a/app/assets/javascripts/sidenav.js b/app/assets/javascripts/sidenav.js new file mode 100644 index 000000000..24c9f2c5b --- /dev/null +++ b/app/assets/javascripts/sidenav.js @@ -0,0 +1,57 @@ +document.addEventListener('DOMContentLoaded', () => { + const sidenavItems = document.querySelectorAll('.usa-sidenav__item > .parent-link'); + let lastPath = window.location.pathname; + let debounceTimeout = null; + + sidenavItems.forEach((link) => { + const parentItem = link.parentElement; + const sublist = parentItem.querySelector('.usa-sidenav__sublist'); + const targetHref = link.getAttribute('href'); + + // initialize the menu to open the correct submenu based on the current route + if (window.location.pathname.startsWith(targetHref)) { + parentItem.classList.add('open'); + link.setAttribute('aria-expanded', 'true'); + } + + link.addEventListener('click', (event) => { + const currentPath = window.location.pathname; + + // prevent default behavior only if navigating to the same route + if (currentPath === targetHref) { + event.preventDefault(); + return; + } + + if (sublist && !parentItem.classList.contains('open')) { + // debounce the menu update to avoid flickering + clearTimeout(debounceTimeout); + debounceTimeout = setTimeout(() => { + parentItem.classList.add('open'); + link.setAttribute('aria-expanded', 'true'); + }, 50); + } + }); + }); + + // handle browser back/forward navigation + window.addEventListener('popstate', () => { + const currentPath = window.location.pathname; + + // sync menu state + sidenavItems.forEach((link) => { + const parentItem = link.parentElement; + const targetHref = link.getAttribute('href'); + + if (currentPath.startsWith(targetHref)) { + parentItem.classList.add('open'); + link.setAttribute('aria-expanded', 'true'); + } else { + parentItem.classList.remove('open'); + link.setAttribute('aria-expanded', 'false'); + } + }); + + lastPath = currentPath; + }); + }); diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index afe67dd14..0bb1aab7e 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -198,8 +198,8 @@ td.table-empty-message { word-wrap: break-word; } - border: 1px solid color('gray-cool-10'); - padding: units(2); + // border: 1px solid color('gray-cool-10'); + // padding: units(2); .tick-cross-list-permissions { margin: units(1) 0; @@ -852,21 +852,36 @@ $do-dont-top-bar-width: 1; } } -.linked-content:hover { - cursor: pointer; - transform: scale(1.05); - transition: transform 0.3s ease, background-color 0.3s ease; -} +.linked-card a { + text-decoration: none; + .usa-card__header, .usa-card__media { + @include at-media('tablet') { + padding-top: units(1); + } + } + &:visited { + color: color('ink'); + } + &:focus .usa-card__container { + outline: units(2px) solid color('blue-40v'); + outline-offset: 0.3rem; + } + &:hover .usa-card__container, &:focus .usa-card__container { + border-color: color('blue-60v'); + background: color('blue-60v'); + p, h3 { + color: white; + } + svg { + filter: brightness(0) invert(1); + } + } -li.linked-card:hover > div:first-child:hover { - border-color: #005ea2; -} + &.linked-content:hover, &.linked-content:focus { + cursor: pointer; + transition: transform 0.3s ease, background-color 0.3s ease; + } -li.linked-card:hover h4, -li.linked-card:hover p, -li.linked-card:hover svg, -.best-practices_card_img:hover { - color: #005ea2; } .best-practices_card_img { @@ -876,10 +891,6 @@ li.linked-card:hover svg, margin: 0 auto; } -.best-practices_link { - text-decoration: none; -} - .usa-link--downloadable { position: relative; } @@ -914,17 +925,25 @@ li.linked-card:hover svg, mask-size: 1.75ex 1.75ex; } +nav.nav { + position: sticky; + top: units(3); +} + .usa-sidenav__sublist { display: none; } -.usa-sidenav__item:hover .usa-sidenav__sublist, -.usa-sidenav__item:focus-within .usa-sidenav__sublist { +.usa-sidenav__item.open .usa-sidenav__sublist { display: block; } -.usa-sidenav__item a { - display: block; +.usa-sidenav__sublist .bold { + font-weight: bold; +} + +.usa-sidenav__sublist li[role="menuitem"] { + border-top: 1px solid #dfe1e2; } .icon-list { diff --git a/app/config.py b/app/config.py index 146230047..a82c9a1ab 100644 --- a/app/config.py +++ b/app/config.py @@ -87,9 +87,6 @@ class Config(object): "tts-benefits-studio@gsa.gov", ], } - FEATURE_BEST_PRACTICES_ENABLED = ( - getenv("FEATURE_BEST_PRACTICES_ENABLED", "false") == "true" - ) FEATURE_ABOUT_PAGE_ENABLED = getenv("FEATURE_ABOUT_PAGE_ENABLED", "false") == "true" diff --git a/app/main/validators.py b/app/main/validators.py index 1dfc97c48..e1292b959 100644 --- a/app/main/validators.py +++ b/app/main/validators.py @@ -41,14 +41,8 @@ class ValidGovEmail: if field.data == "": return - from flask import url_for + message = "Enter a public sector email address." - message = """ - Enter a public sector email address or - find out who can use Notify - """.format( - url_for("main.features") - ) if not is_gov_user(field.data.lower()): raise ValidationError(message) diff --git a/app/main/views/index.py b/app/main/views/index.py index fa18b0998..466a2dea5 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -15,8 +15,6 @@ from app.main import main from app.main.views.pricing import CURRENT_SMS_RATE from app.main.views.sub_navigation_dictionaries import ( about_notify_nav, - best_practices_nav, - features_nav, using_notify_nav, ) from app.utils.user import user_is_logged_in @@ -25,11 +23,6 @@ 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") and not current_app.config.get( - "FEATURE_BEST_PRACTICES_ENABLED", False - ): - abort(404) - if request.path.startswith("/about") and not current_app.config.get( "FEATURE_ABOUT_PAGE_ENABLED", False ): @@ -40,8 +33,8 @@ def check_feature_flags(): def test_feature_flags(): return jsonify( { - "FEATURE_BEST_PRACTICES_ENABLED": current_app.config[ - "FEATURE_BEST_PRACTICES_ENABLED" + "FEATURE_ABOUT_PAGE_ENABLED": current_app.config[ + "FEATURE_ABOUT_PAGE_ENABLED" ] } ) @@ -111,44 +104,6 @@ def callbacks(): return redirect(url_for("main.documentation"), 301) -# --- Features page set --- # - - -@main.route("/features") -@user_is_logged_in -def features(): - return render_template("views/features.html", navigation_links=features_nav()) - - -@main.route("/features/roadmap", endpoint="roadmap") -@user_is_logged_in -def roadmap(): - return render_template("views/roadmap.html", navigation_links=features_nav()) - - -@main.route("/features/sms") -@user_is_logged_in -def features_sms(): - return render_template( - "views/features/text-messages.html", navigation_links=features_nav() - ) - - -@main.route("/features/security", endpoint="security") -@user_is_logged_in -def security(): - return render_template("views/security.html", navigation_links=features_nav()) - - -@main.route("/features/using_notify") -@user_is_logged_in -def using_notify(): - return ( - render_template("views/using-notify.html", navigation_links=features_nav()), - 410, - ) - - @main.route("/using-notify/delivery-status") @user_is_logged_in def message_status(): @@ -203,78 +158,75 @@ def trial_mode_new(): ) -@main.route("/guides/best-practices") +@main.route("/using-notify/best-practices") @user_is_logged_in def best_practices(): return render_template( "views/guides/best-practices.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/clear-goals") +@main.route("/using-notify/best-practices/clear-goals") @user_is_logged_in def clear_goals(): return render_template( "views/guides/clear-goals.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/rules-and-regulations") +@main.route("/using-notify/best-practices/rules-and-regulations") @user_is_logged_in def rules_and_regulations(): return render_template( "views/guides/rules-and-regulations.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/establish-trust") +@main.route("/using-notify/best-practices/establish-trust") @user_is_logged_in def establish_trust(): return render_template( "views/guides/establish-trust.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/write-for-action") +@main.route("/using-notify/best-practices/write-for-action") @user_is_logged_in def write_for_action(): return render_template( "views/guides/write-for-action.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/multiple-languages") +@main.route("/using-notify/best-practices/multiple-languages") @user_is_logged_in def multiple_languages(): return render_template( "views/guides/multiple-languages.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/benchmark-performance") +@main.route("/using-notify/best-practices/benchmark-performance") @user_is_logged_in def benchmark_performance(): return render_template( "views/guides/benchmark-performance.html", - navigation_links=best_practices_nav(), + navigation_links=using_notify_nav(), ) -@main.route("/guides/using-notify/guidance") +@main.route("/using-notify/guidance") @user_is_logged_in def guidance_index(): return render_template( "views/guidance/index.html", navigation_links=using_notify_nav(), - feature_best_practices_enabled=current_app.config[ - "FEATURE_BEST_PRACTICES_ENABLED" - ], ) @@ -357,14 +309,12 @@ def studio(): # --- Redirects --- # -@main.route("/roadmap", endpoint="old_roadmap") @main.route("/information-security", endpoint="information_security") @main.route("/using_notify", endpoint="old_using_notify") @main.route("/information-risk-management", endpoint="information_risk_management") @main.route("/integration_testing", endpoint="old_integration_testing") def old_page_redirects(): redirects = { - "main.old_roadmap": "main.roadmap", "main.information_security": "main.using_notify", "main.old_using_notify": "main.using_notify", "main.information_risk_management": "main.security", diff --git a/app/main/views/sub_navigation_dictionaries.py b/app/main/views/sub_navigation_dictionaries.py index 0e896b64e..3b2cf84c1 100644 --- a/app/main/views/sub_navigation_dictionaries.py +++ b/app/main/views/sub_navigation_dictionaries.py @@ -1,89 +1,45 @@ -from flask import current_app - - -def features_nav(): - return [ - { - "name": "Features", - "link": "main.features", - "sub_navigation_items": [ - # { - # "name": "Text messages", - # "link": "main.features_sms", - # }, - ], - }, - { - "name": "Roadmap", - "link": "main.roadmap", - }, - { - "name": "Security", - "link": "main.security", - }, - ] - - def using_notify_nav(): nav_items = [ {"name": "Get started", "link": "main.get_started"}, - {"name": "Guides", "link": "main.best_practices"}, + { + "name": "Best Practices", + "link": "main.best_practices", + "sub_navigation_items": [ + { + "name": "Clear goals", + "link": "main.clear_goals", + }, + { + "name": "Rules and regulations", + "link": "main.rules_and_regulations", + }, + { + "name": "Establish trust", + "link": "main.establish_trust", + }, + { + "name": "Write for action", + "link": "main.write_for_action", + }, + { + "name": "Multiple languages", + "link": "main.multiple_languages", + }, + { + "name": "Benchmark performance", + "link": "main.benchmark_performance", + }, + ], + }, {"name": "Trial mode", "link": "main.trial_mode_new"}, {"name": "Tracking usage", "link": "main.pricing"}, {"name": "Delivery Status", "link": "main.message_status"}, {"name": "Guidance", "link": "main.guidance_index"}, ] - if not current_app.config.get("FEATURE_BEST_PRACTICES_ENABLED"): - nav_items = [ - item for item in nav_items if item["link"] != "main.best_practices" - ] return nav_items -def best_practices_nav(): - return [ - { - "name": "Best Practices", - "link": "main.best_practices", - }, - { - "name": "Clear goals", - "link": "main.clear_goals", - }, - { - "name": "Rules and regulations", - "link": "main.rules_and_regulations", - }, - { - "name": "Establish trust", - "link": "main.establish_trust", - "sub_navigation_items": [ - { - "name": "Get the word out", - "link": "main.establish_trust#get-the-word-out", - }, - { - "name": "As people receive texts", - "link": "main.establish_trust#as-people-receive-texts", - }, - ], - }, - { - "name": "Write for action", - "link": "main.write_for_action", - }, - { - "name": "Multiple languages", - "link": "main.multiple_languages", - }, - { - "name": "Benchmark performance", - "link": "main.benchmark_performance", - }, - ] - - def about_notify_nav(): return [ { @@ -93,20 +49,6 @@ def about_notify_nav(): { "name": "Why text messaging", "link": "main.why_text_messaging", - "sub_sub_navigation_items": [ - { - "name": "Reach people using a common method", - "link": "main.why_text_messaging#reach-people-using-a-common-method", - }, - { - "name": "Improve customer experience", - "link": "main.why_text_messaging#improve-customer-experience", - }, - { - "name": "What texting is best for", - "link": "main.why_text_messaging#what-texting-is-best-for", - }, - ], }, { "name": "Security", diff --git a/app/navigation.py b/app/navigation.py index 271d6848b..424d03ae3 100644 --- a/app/navigation.py +++ b/app/navigation.py @@ -40,12 +40,6 @@ class HeaderNavigation(Navigation): "support": { "support", }, - "features": { - "features", - "features_sms", - "roadmap", - "security", - }, "best_practices": { "best_practices", "clear_goals", @@ -57,7 +51,6 @@ class HeaderNavigation(Navigation): }, "using_notify": { "get_started", - "using_notify", "pricing", "trial_mode_new", "message_status", diff --git a/app/templates/base.html b/app/templates/base.html index 0348832bd..1d2778a9e 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -56,28 +56,19 @@ {% for item in navigation_links %}
  • {% if item.sub_navigation_items %} @@ -85,6 +76,8 @@
  • {% endfor %} + +
    diff --git a/app/templates/components/guides/cards.html b/app/templates/components/guides/cards.html index 1fa6f9a75..372bcb2d6 100644 --- a/app/templates/components/guides/cards.html +++ b/app/templates/components/guides/cards.html @@ -1,18 +1,17 @@ -
    + {% if item.link %} + + {% endif %} {% endfor %} diff --git a/app/templates/components/header.html b/app/templates/components/header.html index 339e07518..2d8f5d2d6 100644 --- a/app/templates/components/header.html +++ b/app/templates/components/header.html @@ -1,15 +1,12 @@ +{% set is_about_page = request.path.startswith('/about') %} +{% set is_join_notify_page = request.path.startswith('/join-notify') %} +{% set is_contact_page = request.path.startswith('/contact') %} +{% set is_information_section = is_about_page or is_join_notify_page or is_contact_page %} + {% if current_user.is_authenticated %} {% set navigation = [ - {"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": header_navigation.is_selected('accounts-or-dashboard')}, - {"href": url_for('main.get_started'), "text": "Using Notify", "active": header_navigation.is_selected('using_notify')} -] %} - -{% if FEATURE_BEST_PRACTICES_ENABLED %} -{% set navigation = navigation + [{"href": url_for('main.best_practices'), "text": "Guides", "active": header_navigation.is_selected('best_practices')}] %} -{% endif %} - -{% set navigation = navigation + [ - {"href": url_for('main.features'), "text": "Features", "active": header_navigation.is_selected('features')}, + {"href": url_for("main.show_accounts_or_dashboard"), "text": "Current service", "active": request.path.startswith('/accounts')}, + {"href": url_for('main.get_started'), "text": "Using Notify", "active": request.path.startswith('/using-notify')}, {"href": url_for('main.support'), "text": "Contact us", "active": header_navigation.is_selected('support')} ] %} @@ -35,16 +32,17 @@ {% endif %} {% else %} -{% set navigation = [] %} - -{% if FEATURE_ABOUT_PAGE_ENABLED %} -{% set navigation = navigation + [ - {"href": url_for('main.about_notify'), "text": "About Notify", "active": request.path == '/about'}, - {"href": url_for('main.join_notify'), "text": "Join Notify", "active": request.path == '/join-notify'}, - {"href": url_for('main.contact'), "text": "Contact us", "active": request.path == '/contact'} +{% set navigation = [ + {"href": url_for('main.about_notify'), "text": "About Notify", "active": is_about_page}, + {"href": url_for('main.join_notify'), "text": "Join Notify", "active": is_join_notify_page}, + {"href": url_for('main.contact'), "text": "Contact us", "active": is_contact_page} ] %} {% endif %} -{% endif %} + + + + +
    @@ -63,7 +61,7 @@ {% endif %} - {% if not current_user.is_authenticated and FEATURE_ABOUT_PAGE_ENABLED and request.path == '/about'%} + {% if not current_user.is_authenticated and is_information_section%}

    text messages.

    - +

    Notify makes it easy to create, customize, and send text messages.

    +

    You do not need any technical knowledge to use Notify.

    {% if not current_user.is_authenticated %}

    Create an account for free and try it yourself.

    diff --git a/app/templates/views/guidance/index.html b/app/templates/views/guidance/index.html index 2e63c6212..062bae555 100644 --- a/app/templates/views/guidance/index.html +++ b/app/templates/views/guidance/index.html @@ -8,245 +8,103 @@ {% endblock %} {% block content_column_content %} +

    Guidance

    -

    Guidance

    +

    Notify allows you to easily create templates for messages for your recipients. You can customize messages to encourage +your recipient to manage their benefits and increase follow-through.

    +

    Below we explain how to:

    -

    Notify allows you easily to create templates for messages for your recipients. You can customize messages to encourage - your recipient to manage their benefits and increase follow through.

    -

    Below we explain how to:

    + - - - {# Format content #} -

    Format your content

    - {% if not feature_best_practices_enabled %} -

    Effective texts will help your message recipients take the steps needed to secure and keep the benefits and services - they depend on. To craft an effective text:

    - - - {% endif %} -

    To create and format your message

    -
      -
    1. All messages start from a template
    2. -
    3. Click "Send Messages". You'll see existing templates.
    4. -
    5. Add a new template or choose an existing template and select Edit.
    6. -
    - - {% if not feature_best_practices_enabled %} - {# Add links #} - -

    When composing a text message, links to websites or online applications can help your recipient respond quickly.

    - - - -

    About link-shortening services

    -

    We do not recommend using a third-party link-shortening service because:

    - - {% endif %} - - {# Personalize content #} -

    Personalize your content

    -

    Personalizing your content can increase response rates and help the recipient know the text is legitimate.

    - - -

    To personalize your content

    -
      -
    1. Add a placeholder to your content by placing two brackets around the personalized elements.
    2. -
    3. You can manually enter the personalized content or you can upload a spreadsheet with the details and let Notify do the - work for you. See data preparation.
    4. -
    - -

    Example

    -

    To personalize with the recipient's first name and include a reference number:

    -

    State WIC: Hello ((first name)), your reference is ((ref number)). Please provide this number when you call 555-123-1234 to make an appointment.

    - -

    Note that variations in the length of personalized content can impact the length of specific messages, and may affect - the number of parts used.

    - - {# Add conditional content #} -

    Add conditional content

    -

    Conditional (or optional) content appears only when a recipient meets certain criteria. This feature allows you to make - all or part of the message contingent upon specific criteria associated with the recipient.

    - -

    To add conditional content

    -
      -
    1. Use two brackets and ?? to define the conditional content.
    2. -
    3. You can manually enter the conditional content or you can upload a spreadsheet with the personal details and let Notify - do the work for you. See data preparation.
    4. -
    - -

    Examples

    -
      -
    1. If you only want to show something to people who are under 18: -
      -

      State SNAP: Renewal applications are due by March 15. ((under18??Please get your application signed by a parent or - guardian.))

      -
    2. -
    3. - If you want to make people who are homebound aware of the option of virtual visits (but not other message recipients): -
      -

      State Medicaid: Please call 555-123-1234 to schedule an appointment. ((homebound??Virtual visits are available.))

      -
    4. -
    5. - If you want to send a messages in different languages to different recipients: -
      -

      ((English??We’ve identified unauthorized use on your EBT account. Call the phone number on the back of your card to - cancel or go to your local CSO for immediate replacement.))((Spanish??Hemos identificado un uso no autorizado en su - cuenta EBT. Llame al número de teléfono que aparece en el reverso de su tarjeta para cancelarla o diríjase a su CSO - local para que se la sustituyan inmediatamente.))

      -
    6. -
    +{# Format content #} +

    Format your content

    - {# Identify your program #} -

    Identify your program

    -

    You can help your recipients identify your texts as legitimate by customizing your messages to clearly state who they - are from. Consider using the program or benefit name that is most familiar to your recipients.

    +

    To create and format your message

    +
      +
    1. All messages start from a template
    2. +
    3. Click "Send Messages". You'll see existing templates.
    4. +
    5. Add a new template or choose an existing template and select Edit.
    6. +
    -

    To customize your program name

    -

    To change the text message sender from the default service name:

    -
      -
    1. Go to the Settings page
    2. -
    3. Select “Start text messages with service name.”
    4. -
    5. Change the service name to a familiar program or benefit.
    6. -
    +{# Add links #} +

    When composing a text message, links to websites or online applications can help your recipient respond quickly.

    - {# Prepare your data #} -

    Prepare your data

    -

    The easiest and most efficient way to personalize your content is by uploading a spreadsheet. Notify can accommodate - many file formats and structures.

    + -

    File format

    -

    Notify can accept files in the following formats: CSV, TSV, ODS, and Microsoft Excel.

    +

    About link-shortening services

    +

    We do not recommend using a third-party link-shortening service because:

    + -

    File structure

    - +{# Personalize content #} +

    Personalize your content

    +

    Personalizing your content can increase response rates and help the recipient know the text is legitimate.

    + -

    Formatting personalized content

    -

    If you are sending a message with personalized content, such as the first name of the recipient or the appointment time - and location, the names of the column headings have to match the indicator included in the message template.

    -

    For example, if the personalized content is the first name of the recipient, and we are using the spreadsheet below, the - indicator in the message needs to be ((First name)), not ((firstname)) or ((name)).

    +

    To personalize your content

    +
      +
    1. Add a placeholder to your content by placing two brackets around the personalized elements.
    2. +
    3. You can manually enter the personalized content or you can upload a spreadsheet with the details and let Notify do the + work for you. See data preparation.
    4. +
    -

    Formatting conditional content

    -

    If you are sending messages with conditional content, such as content based on the recipient’s preferred language or - location, the flag to receive the content needs to be captured in its own column with a Yes or No (Y/N) flag.

    +

    Example

    +

    To personalize with the recipient's first name and include a reference number:

    +

    State WIC: Hello ((first name)), your reference is ((ref number)). Please provide this number when you call 555-123-1234 to make an appointment.

    -

    Example

    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - Example -
    Phone numberFirst nameLast nameSpanishEnglishDateTimeLocation
    123-456-7890LuluPraetherNYNovember 2, 20233:25123 Ford Rd.
    234-567-8901SelaAppelYNNovember 2, 20234:00123 Ford Rd.
    123-456-7890DexterMoseleyNYNovember 2, 20232:00123 Ford Rd.
    -
    +

    Note that variations in the length of personalized content can impact the length of specific messages, and may affect +the number of parts used.

    - {% if not feature_best_practices_enabled %} - {# Preventing fraud #} -

    Preventing fraud

    -

    Texting fraud is ever prevalent and while we can’t eliminate the risk, we can reduce the chances that recipients will - fall victim to fraud.

    -
      -
    1. Never send unnecessary or protected private information.
    2. -
    3. Remind your recipients that text messaging is not a secure means of communication and they should not send you private - information via text.
    4. -
    5. Only include links to websites and online applications that are secure.
    6. -
    7. Send an introductory text letting recipients know you will be texting them and to save the number in their phone.
    8. -
    9. Include an auto-response with the name of your organization and a contact phone number.
    10. -
    +{# Add conditional content #} +

    Add conditional content

    +

    Conditional (or optional) content appears only when a recipient meets certain criteria. This feature allows you to make +all or part of the message contingent upon specific criteria associated with the recipient.

    + +

    To add conditional content

    +
      +
    1. Use two brackets and ?? to define the conditional content.
    2. +
    3. You can manually enter the conditional content or you can upload a spreadsheet with the personal details and let Notify + do the work for you. See data preparation.
    4. +
    + +

    Examples

    +
      +
    1. If you only want to show something to people who are under 18: +
      +

      State SNAP: Renewal applications are due by March 15. ((under18??Please get your application signed by a parent or + guardian.))

      +
    2. +
    3. + If you want to make people who are homebound aware of the option of virtual visits (but not other message recipients): +
      +

      State Medicaid: Please call 555-123-1234 to schedule an appointment. ((homebound??Virtual visits are available.))

      +
    4. +
    5. + If you want to send a messages in different languages to different recipients: +
      +

      ((English??We’ve identified unauthorized use on your EBT account. Call the phone number on the back of your card to + cancel or go to your local CSO for immediate replacement.))((Spanish??Hemos identificado un uso no autorizado en su + cuenta EBT. Llame al número de teléfono que aparece en el reverso de su tarjeta para cancelarla o diríjase a su CSO + local para que se la sustituyan inmediatamente.))

      +
    6. +
    + +... -

    Examples

    -
      -
    1. Introductory text: -
      -

      State Transit Dept: We're piloting a new way to get important reminders to our staff. Save this number to your phone, - you'll receive updates from us here.

      -
    2. -
    3. Auto-response text: -
      -

      State Agency: This number is unmonitored. To contact us, call us at 555-123-1234. We will never ask for personal details - in a text. If you have questions about how to protect your privacy, see statename.gov/privacy.

      -
    4. -
    - {% endif %} {% endblock %} diff --git a/app/templates/views/guides/benchmark-performance.html b/app/templates/views/guides/benchmark-performance.html index 5e24dc9cd..bd2662fbe 100644 --- a/app/templates/views/guides/benchmark-performance.html +++ b/app/templates/views/guides/benchmark-performance.html @@ -8,7 +8,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    @@ -27,58 +27,46 @@ quantity of messages delivered, how people engage with messages, and how they take action.

    -

    Message delivery

    -

    Benchmark: 80% of texts are +

    Message delivery

    +

    Benchmark: 80% of texts are successfully delivered

    -
    -
      -
    • -

      - You may discover that some numbers are temporarily or permanently unavailable due to service being - discontinued, - numbers changing, or being a landline. -

      -
    • -
    -
    +
      +
    • +

      + You may discover that some numbers are temporarily or permanently unavailable due to service being + discontinued, + numbers changing, or being a landline. +

      +
    • +
    +

    Engagement

    +

    Benchmark: Engagement rates with texts ranged from 17% + to 26%

    +
      +
    • +

      + The highest rate of engagement with a text comes within hours of sending. Engagement rates include any kind + of + action taken due to a text, including replying “STOP” to prevent future texts. +

      +
    • +
    -

    Engagement

    -
    -

    Benchmark: Engagement rates with texts ranged from 17% - to 26%

    -
    -
    -
      -
    • -

      - The highest rate of engagement with a text comes within hours of sending. Engagement rates include any kind - of - action taken due to a text, including replying “STOP” to prevent future texts. -

      -
    • -
    -
    - -

    Appointment requests

    -
    -

    Benchmark: Requesting appointments after receiving texts ranged +

    Appointment requests

    +

    Benchmark: Requesting appointments after receiving texts ranged from 4% to 9%

    -
    -
    -
      -
    • -

      - Requesting appointments is a specific type of engagement. Provide a phone number or link to an online - appointment - request form. -

      -
    • -
    -
    - +
      +
    • +

      + Requesting appointments is a specific type of engagement. Provide a phone number or link to an online + appointment + request form. +

      +
    • +

    The Code for America’s Texting @@ -86,63 +74,42 @@ reported specific learnings around appointment reminders, completing document submission, and maintenance reminders.

    -

    Appointment reminders

    -
    -

    Benchmark: Clients were 79% more - likely - to keep - their appointment after receiving a text reminder.

    -
    -
    -
      -
    • -

      You will likely see more completed appointments.

      -
    • -
    -
    +

    Appointment reminders

    +

    Benchmark: Clients were 79% more + likely to keep their appointment after receiving a text reminder.

    +
      +
    • +

      You will likely see more completed appointments.

      +
    • +
    +

    Benchmark: Clients were 55% more + likely to complete an interview after receiving an interview reminder

    +
      +
    • +

      You will likely see more completed interviews.

      +
    • +
    -
    -

    Benchmark: Clients were 55% more - likely - to complete - an interview after receiving an interview reminder

    -
    -
    -
      -
    • -

      You will likely see more completed interviews.

      -
    • -
    -
    - -

    Document submission

    -
    -

    +

    Document submission

    +

    Benchmark: Clients were 6% more likely to complete document submission after receiving a customized list of required documents via text

    -
    -
    -
      -
    • -

      To encourage response, provide a custom list of the needed documents and information about how to submit - them. -

      -
    • -
    -
    +
      +
    • +

      To encourage response, provide a custom list of the needed documents and information about how to submit + them. +

      +
    • +
    -

    Reminders

    -
    -

    Benchmark: Text reminders improved case maintenance rates by 21%

    -
    -
    -
      -
    • -

      You may see less turnover in your case rates.

      -
    • -
    -
    +

    Reminders

    +

    Benchmark: Text reminders improved case maintenance rates by 21%

    +
      +
    • +

      You may see less turnover in your case rates.

      +
    • +
    {% endblock %} diff --git a/app/templates/views/guides/best-practices.html b/app/templates/views/guides/best-practices.html index 4784f72c4..9826e6a33 100644 --- a/app/templates/views/guides/best-practices.html +++ b/app/templates/views/guides/best-practices.html @@ -15,7 +15,7 @@

    This set of best practices will help you get an effective texting initiative up and running.

    -

    +

    Key elements of a texting campaign

    @@ -24,37 +24,37 @@ "svg_src": "goal", "card_heading": "Establish clear goals", "p_text": "Start with a singular purpose. Make explicit what you want to achieve.", - "link": "/guides/clear-goals" + "link": "/using-notify/best-practices/clear-goals" }, { "svg_src": "compliant", "card_heading": "Follow rules & regulations", "p_text": "Understand what is required when texting the public.", - "link": "/guides/rules-and-regulations" + "link": "/using-notify/best-practices/rules-and-regulations" }, { "svg_src": "trust", "card_heading": "Establish trust", "p_text": "Help your audience anticipate and welcome your texts.", - "link": "/guides/establish-trust" + "link": "/using-notify/best-practices/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/write-for-action" + "link": "/using-notify/best-practices/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/multiple-languages" + "link": "/using-notify/best-practices/multiple-languages" }, { "svg_src": "chart", "card_heading": "Measure performance with benchmarking", "p_text": "Learn how effective your texting program can be.", - "link": "/guides/benchmark-performance" + "link": "/using-notify/best-practices/benchmark-performance" } ] %} diff --git a/app/templates/views/guides/clear-goals.html b/app/templates/views/guides/clear-goals.html index 71ed0e1a3..d1054e3a9 100644 --- a/app/templates/views/guides/clear-goals.html +++ b/app/templates/views/guides/clear-goals.html @@ -8,7 +8,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    @@ -162,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/guides/establish-trust.html b/app/templates/views/guides/establish-trust.html index 3383315ba..0ab95c73a 100644 --- a/app/templates/views/guides/establish-trust.html +++ b/app/templates/views/guides/establish-trust.html @@ -10,7 +10,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    diff --git a/app/templates/views/guides/multiple-languages.html b/app/templates/views/guides/multiple-languages.html index dd9c3727f..f295df308 100644 --- a/app/templates/views/guides/multiple-languages.html +++ b/app/templates/views/guides/multiple-languages.html @@ -8,7 +8,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    diff --git a/app/templates/views/guides/rules-and-regulations.html b/app/templates/views/guides/rules-and-regulations.html index db06ab76e..5943e462d 100644 --- a/app/templates/views/guides/rules-and-regulations.html +++ b/app/templates/views/guides/rules-and-regulations.html @@ -8,7 +8,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    @@ -22,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.

    @@ -81,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="../best-practices/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/guides/write-for-action.html b/app/templates/views/guides/write-for-action.html index d3019596c..ff382864a 100644 --- a/app/templates/views/guides/write-for-action.html +++ b/app/templates/views/guides/write-for-action.html @@ -9,7 +9,7 @@ {% endblock %} {% block content_column_content %} -{{ breadcrumbs.breadcrumb(page_title, "Guides", "main.best_practices") }} +{{ breadcrumbs.breadcrumb(page_title, "Best Practices", "main.best_practices") }}

    {{page_title}}

    diff --git a/app/templates/views/message-status.html b/app/templates/views/message-status.html index 76ac9bb6a..243260531 100644 --- a/app/templates/views/message-status.html +++ b/app/templates/views/message-status.html @@ -77,7 +77,7 @@

    Sometimes Notify receives more detailed information from the carriers on the status of messages, and these can be found in the downloadable reports. Not all carriers provide the same level of detail regarding delivery and some delivery statutes have a slight variation in word choice. Notify includes this information in the reports to provide you as much - detail as possible. Remember, for security purposes, detailed information is only available for seven days after a + detail as possible. Remember, for security purposes, detailed information is only available for seven days after a message has been sent.

    Opting out

    diff --git a/app/templates/views/roadmap.html b/app/templates/views/roadmap.html deleted file mode 100644 index f9446aad5..000000000 --- a/app/templates/views/roadmap.html +++ /dev/null @@ -1,87 +0,0 @@ -{% extends "base.html" %} -{% from "components/table.html" import mapping_table, row, text_field, edit_field, field with context %} -{% from "components/content-metadata.html" import content_metadata %} - -{% block per_page_title %} - Roadmap -{% endblock %} - -{% block content_column_content %} - -

    Roadmap

    - - - - -

    The Notify roadmap shows what we’re working on and what we're planning to do next.

    -

    This roadmap is only a guide. It does not cover everything we do, and some things may change.

    -

    You can contact us if you have any questions about the roadmap or suggestions for new features.

    - -

    What we’re working on

    - -

    Now

    - -

    We are investigating the Notify concept, building on the notifications tool pioneered by the UK.

    -

    To do this, we are convening a pilot with a small set of partners.

    -

    Goals during this stage:

    - -
      -
    • Achieve compliance to begin piloting, such as ATO and privacy standards. - -
    • -
    • Demonstrate that a government-run notifications tool provides a unique value.
    • -
    • Gather data from the pilot to improve the product.
    • -
    - -

    Features prioritized during this stage:

    - -
      -
    • Bulk, individually customizable one-way SMS sending via web UI
    • -
    • Organization permissions settings for various team members to edit/send
    • -
    • Reusable message templates
    • -
    • Seven-day records deletion
    • -
    • Message send/failure analytics
    • -
    - -

    Next

    - -

    If the pilot is successful, we hope to recruit additional partners to improve outcomes for low-income individuals and families.

    - -

    Goals during this stage:

    - -
      -
    • Complement Notify with practical guidance and support services.
    • -
    • Iterate on existing features and implement new features based on what we've learned so far.
    • -
    • Hone our measurement approaches to better quantify impact.
    • -
    - -

    Features prioritized during this stage:

    - -
      -
    • SMS sending via API integration
    • -
    • Self-service account creation
    • -
    • Application status page
    • -
    • Improved scheduled send option
    • -
    - -

    Later

    - -

    In the future, we may decide to expand beyond SMS, or to offer the service government-wide.

    - -

    Features to be considered during this stage:

    - -
      - -
    • Two-way messaging
    • -
    • Multilingual interface and content library options
    • -
    • Recurring scheduled send (such as “Send each Monday for 3 weeks”)
    • -
    - -{% endblock %} diff --git a/app/templates/views/using-notify.html b/app/templates/views/using-notify.html index 0679229e7..d0279f446 100644 --- a/app/templates/views/using-notify.html +++ b/app/templates/views/using-notify.html @@ -21,7 +21,6 @@ diff --git a/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png new file mode 100644 index 000000000..5780ccb5e Binary files /dev/null and b/backstop_data/bitmaps_reference/backstop_test_About_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png index a1eb4e2b1..81fd6f432 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Add_Service_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png index f2b2c9e4a..506d06489 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Benchmark_Performance_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png index 81c1beaed..474f3b122 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Best_Practices_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png index cf18acec9..743c0c45b 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Clear_Goals_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Contact_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Contact_0_document_0_desktop.png new file mode 100644 index 000000000..5d264bffe Binary files /dev/null and b/backstop_data/bitmaps_reference/backstop_test_Contact_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png index 21cb94ec4..860b280cc 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Delivery_Status_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png index 25db02ceb..dd86b7b55 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Establish_Trust_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png deleted file mode 100644 index 66009a770..000000000 Binary files a/backstop_data/bitmaps_reference/backstop_test_Features_0_document_0_desktop.png and /dev/null differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png index be225111f..2bca25136 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Get_Started_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png index be225111f..2bca25136 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Get_Started_Page_-_Highlight_Trial_Mode_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png index c65fcc0c9..70b55e0a5 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Guidance_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Homepage_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Homepage_0_document_0_desktop.png index fd75611bb..686ce6fc5 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Homepage_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Homepage_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Join_Notify_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Join_Notify_0_document_0_desktop.png new file mode 100644 index 000000000..5d5df03ca Binary files /dev/null and b/backstop_data/bitmaps_reference/backstop_test_Join_Notify_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png index 1d91c1966..2774105e3 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Multiple_Languages_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png index 30ad020ee..ce776d661 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Pricing_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png deleted file mode 100644 index dfeecfa2a..000000000 Binary files a/backstop_data/bitmaps_reference/backstop_test_Roadmap_0_document_0_desktop.png and /dev/null differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png index 8a860dfb2..900d7febd 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Rules_And_Regulations_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Security_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Security_0_document_0_desktop.png index 65382a710..f1fea0a9e 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Security_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Security_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png index c89453061..56357f6cc 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Support_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png index b457a1d4d..67dc252b3 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Trial_Mode_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Why_Text_Messaging_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Why_Text_Messaging_0_document_0_desktop.png new file mode 100644 index 000000000..072e59d52 Binary files /dev/null and b/backstop_data/bitmaps_reference/backstop_test_Why_Text_Messaging_0_document_0_desktop.png differ diff --git a/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png b/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png index a1ac842f7..b18b2139a 100644 Binary files a/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png and b/backstop_data/bitmaps_reference/backstop_test_Write_For_Action_0_document_0_desktop.png differ diff --git a/deploy-config/demo.yml b/deploy-config/demo.yml index 05d167f4b..2787b130e 100644 --- a/deploy-config/demo.yml +++ b/deploy-config/demo.yml @@ -7,4 +7,3 @@ cloud_dot_gov_route: notify-demo.app.cloud.gov redis_enabled: 1 nr_agent_id: '1134302465' nr_app_id: '1083160688' -FEATURE_BEST_PRACTICES_ENABLED: true diff --git a/deploy-config/production.yml b/deploy-config/production.yml index 9f5cffc89..c27f93744 100644 --- a/deploy-config/production.yml +++ b/deploy-config/production.yml @@ -7,4 +7,3 @@ cloud_dot_gov_route: notify.app.cloud.gov redis_enabled: 1 nr_agent_id: '1050708682' nr_app_id: '1050708682' -FEATURE_BEST_PRACTICES_ENABLED: false diff --git a/deploy-config/sandbox.yml b/deploy-config/sandbox.yml index 5cee4f053..58180f409 100644 --- a/deploy-config/sandbox.yml +++ b/deploy-config/sandbox.yml @@ -12,4 +12,3 @@ SECRET_KEY: sandbox-notify-secret-key nr_agent_id: '' nr_app_id: '' NR_BROWSER_KEY: '' -FEATURE_BEST_PRACTICES_ENABLED: true diff --git a/deploy-config/staging.yml b/deploy-config/staging.yml index 036f4472e..0feb07a7f 100644 --- a/deploy-config/staging.yml +++ b/deploy-config/staging.yml @@ -7,4 +7,3 @@ cloud_dot_gov_route: notify-staging.app.cloud.gov redis_enabled: 1 nr_agent_id: '1134291385' nr_app_id: '1031640326' -FEATURE_BEST_PRACTICES_ENABLED: false diff --git a/gulpfile.js b/gulpfile.js index 068643e74..e1bf8ba5c 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -81,6 +81,8 @@ const javascripts = () => { paths.src + 'javascripts/main.js', paths.src + 'javascripts/totalMessagesChart.js', paths.src + 'javascripts/activityChart.js', + paths.src + 'javascripts/sidenav.js', + ]) .pipe(plugins.prettyerror()) .pipe( diff --git a/manifest.yml b/manifest.yml index 3e5f13b4c..8f8bae937 100644 --- a/manifest.yml +++ b/manifest.yml @@ -62,4 +62,3 @@ applications: LOGIN_DOT_GOV_CERTS_URL: ((LOGIN_DOT_GOV_CERTS_URL)) # feature flagging - FEATURE_BEST_PRACTICES_ENABLED: ((FEATURE_BEST_PRACTICES_ENABLED)) diff --git a/tests/app/main/views/test_index.py b/tests/app/main/views/test_index.py index 3a4c281b9..db166d21e 100644 --- a/tests/app/main/views/test_index.py +++ b/tests/app/main/views/test_index.py @@ -2,7 +2,7 @@ from functools import partial import pytest from bs4 import BeautifulSoup -from flask import current_app, url_for +from flask import url_for from freezegun import freeze_time from tests.conftest import SERVICE_ONE_ID, normalize_spaces @@ -83,8 +83,6 @@ def test_hiding_pages_from_search_engines( [ "privacy", "pricing", - "roadmap", - "features", "documentation", "best_practices", "clear_goals", @@ -93,9 +91,7 @@ def test_hiding_pages_from_search_engines( "write_for_action", "multiple_languages", "benchmark_performance", - "security", "message_status", - "features_sms", "how_to_pay", "get_started", "guidance_index", @@ -108,54 +104,33 @@ def test_hiding_pages_from_search_engines( def test_static_pages(client_request, mock_get_organization_by_domain, view, mocker): mocker.patch("app.notify_client.user_api_client.UserApiClient.deactivate_user") - # Function to check if a view is feature-flagged and should return 404 when disabled - def is_feature_flagged(view): - feature_flagged_views = [ - "best_practices", - "clear_goals", - "rules_and_regulations", - "establish_trust", - "write_for_action", - "multiple_languages", - "benchmark_performance", - "guidance_index", - ] - return ( - not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"] - and view in feature_flagged_views - ) - request = partial(client_request.get, "main.{}".format(view)) - # If the guidance feature is disabled, expect a 404 for feature-flagged views - if is_feature_flagged(view): - page = request(_expected_status=404) - else: - # Check the page loads when user is signed in - page = request() - assert page.select_one("meta[name=description]") + # Assert the page loads successfully + page = request(_expected_status=200) + assert page.select_one("meta[name=description]") - # Check it still works when they don’t have a recent service - with client_request.session_transaction() as session: - session["service_id"] = None - request() + # Check the behavior when no recent service is set + with client_request.session_transaction() as session: + session["service_id"] = None + request() - # Check it redirects to the login screen when they sign out - client_request.logout() - with client_request.session_transaction() as session: - session["service_id"] = None - session["user_id"] = None - request( - _expected_status=302, - _expected_redirect="/sign-in?next={}".format( - url_for("main.{}".format(view)) - ), - ) + # Check redirection to login screen when signed out + client_request.logout() + with client_request.session_transaction() as session: + session["service_id"] = None + session["user_id"] = None + request( + _expected_status=302, + _expected_redirect="/sign-in?next={}".format( + url_for("main.{}".format(view)) + ), + ) def test_guidance_pages_link_to_service_pages_when_signed_in(client_request, mocker): - mocker.patch("app.notify_client.user_api_client.UserApiClient.deactivate_user") + request = partial(client_request.get, "main.edit_and_format_messages") selector = ".list-number li a" @@ -177,18 +152,13 @@ def test_guidance_pages_link_to_service_pages_when_signed_in(client_request, moc with client_request.session_transaction() as session: session["service_id"] = None session["user_id"] = None - page = request(_expected_status=302) - assert not page.select_one(selector) + request(_expected_status=302) @pytest.mark.parametrize( ("view", "expected_view"), [ - ("information_risk_management", "security"), ("old_integration_testing", "integration_testing"), - ("old_roadmap", "roadmap"), - ("information_security", "using_notify"), - ("old_using_notify", "using_notify"), ("delivery_and_failure", "message_status"), ("callbacks", "documentation"), ], @@ -206,10 +176,6 @@ def test_old_static_pages_redirect(client_request, view, expected_view, mocker): ) -def test_old_using_notify_page(client_request): - client_request.get("main.using_notify", _expected_status=410) - - def test_css_is_served_from_correct_path(client_request): page = client_request.get("main.documentation") # easy static page diff --git a/tests/app/main/views/test_register.py b/tests/app/main/views/test_register.py index b3d70deb5..952aa8211 100644 --- a/tests/app/main/views/test_register.py +++ b/tests/app/main/views/test_register.py @@ -145,10 +145,9 @@ def test_should_return_200_when_email_is_not_gov_uk( ) assert ( - "Enter a public sector email address or find out who can use Notify" + "Enter a public sector email address." in normalize_spaces(page.select_one(".usa-error-message").text) ) - assert page.select_one(".usa-error-message a")["href"] == url_for("main.features") @pytest.mark.parametrize( diff --git a/tests/app/main/views/test_user_profile.py b/tests/app/main/views/test_user_profile.py index 4fd2004cd..0d71b0736 100644 --- a/tests/app/main/views/test_user_profile.py +++ b/tests/app/main/views/test_user_profile.py @@ -84,7 +84,7 @@ def test_should_redirect_after_email_change( [ ( "me@example.com", - "Enter a public sector email address or find out who can use Notify", + "Enter a public sector email address.", ), ( "not_valid", diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py index 8b9ade8c7..23199ca5d 100644 --- a/tests/app/test_navigation.py +++ b/tests/app/test_navigation.py @@ -94,8 +94,6 @@ EXCLUDED_ENDPOINTS = tuple( "email_not_received", "error", "establish_trust", - "features", - "features_sms", "find_services_by_name", "find_users_by_email", "forgot_password", @@ -140,7 +138,6 @@ EXCLUDED_ENDPOINTS = tuple( "notifications_sent_by_service", "old_guest_list", "old_integration_testing", - "old_roadmap", "old_service_dashboard", "old_using_notify", "organization_billing", @@ -169,9 +166,7 @@ EXCLUDED_ENDPOINTS = tuple( "resume_service", "revalidate_email_sent", "revoke_api_key", - "roadmap", "rules_and_regulations", - "security", "security_policy", "send_files_by_email", "send_files_by_email_contact_details", @@ -247,7 +242,6 @@ EXCLUDED_ENDPOINTS = tuple( "user_profile_name", "user_profile_password", "user_profile_preferred_timezone", - "using_notify", "verify", "verify_email", "view_job", diff --git a/tests/end_to_end/test_best_practices_content_pages.py b/tests/end_to_end/test_best_practices_content_pages.py deleted file mode 100644 index 5a75f9694..000000000 --- a/tests/end_to_end/test_best_practices_content_pages.py +++ /dev/null @@ -1,72 +0,0 @@ -import os -import re - -from playwright.sync_api import expect - -from tests.end_to_end.conftest import check_axe_report - -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}") - - page.wait_for_load_state("domcontentloaded") - check_axe_report(page) - - response = page.request.get(f"{E2E_TEST_URI}/test/feature-flags") - feature_flags = response.json() - feature_best_practices_enabled = feature_flags.get("FEATURE_BEST_PRACTICES_ENABLED") - - if feature_best_practices_enabled: - page.get_by_role("link", name="Best Practices").click() - expect(page).to_have_title(re.compile("Best Practice")) - - page.get_by_role("link", name="Clear goals", exact=True).click() - expect(page).to_have_title(re.compile("Establish clear goals")) - - page.get_by_role("link", name="Rules and regulations").click() - expect(page).to_have_title(re.compile("Rules and regulations")) - - page.get_by_role("link", name="Establish trust").click() - expect(page).to_have_title(re.compile("Establish trust")) - - page.get_by_role("link", name="Write for action").click() - expect(page).to_have_title(re.compile("Write texts that provoke")) - - page.get_by_role("link", name="Multiple languages").click() - expect(page).to_have_title(re.compile("Text in multiple languages")) - - page.get_by_role("link", name="Benchmark performance").click() - expect(page).to_have_title(re.compile("Measuring performance with")) - - parent_link = page.get_by_role("link", name="Establish trust") - parent_link.hover() - - submenu_item = page.get_by_role("link", name=re.compile("Get the word out")) - submenu_item.click() - - expect(page).to_have_url(re.compile(r"#get-the-word-out")) - - anchor_target = page.locator("#get-the-word-out") - expect(anchor_target).to_be_visible() - anchor_target.click() - - -def test_breadcrumbs_best_practices(authenticated_page): - page = authenticated_page - - page.goto(f"{E2E_TEST_URI}") - - page.wait_for_load_state("domcontentloaded") - check_axe_report(page) - - response = page.request.get(f"{E2E_TEST_URI}/test/feature-flags") - feature_flags = response.json() - feature_best_practices_enabled = feature_flags.get("FEATURE_BEST_PRACTICES_ENABLED") - - if feature_best_practices_enabled: - page.get_by_role("link", name="Clear goals", exact=True).click() - page.locator("ol").get_by_role("link", name="Best Practices").click() diff --git a/urls.js b/urls.js index bd693cc90..767c8f0fd 100644 --- a/urls.js +++ b/urls.js @@ -8,30 +8,48 @@ const sublinks = [ { label: 'Trial Mode', path: '/using-notify/trial-mode' }, { label: 'Pricing', path: '/using-notify/pricing' }, { label: 'Delivery Status', path: '/using-notify/delivery-status' }, - { label: 'Guidance', path: '/guides/using-notify/guidance' }, - { label: 'Features', path: '/features' }, - { label: 'Roadmap', path: '/features/roadmap' }, - { label: 'Security', path: '/features/security' }, + { label: 'Guidance', path: '/using-notify/guidance' }, { label: 'Support', path: '/support' }, - { label: 'Best Practices', path: '/guides/best-practices' }, - { label: 'Clear Goals', path: '/guides/clear-goals' }, + { label: 'Best Practices', path: '/using-notify/best-practices' }, + { label: 'Clear Goals', path: '/using-notify/best-practices/clear-goals' }, { label: 'Rules And Regulations', - path: '/guides/rules-and-regulations', + path: '/using-notify/best-practices//rules-and-regulations', }, - { label: 'Establish Trust', path: '/guides/establish-trust' }, + { label: 'Establish Trust', path: '/using-notify/best-practices//establish-trust' }, { label: 'Write For Action', - path: '/guides/write-for-action', + path: '/using-notify/best-practices//write-for-action', }, { label: 'Multiple Languages', - path: '/guides/multiple-languages', + path: '/using-notify/best-practices//multiple-languages', }, { label: 'Benchmark Performance', - path: '/guides/benchmark-performance', + path: '/using-notify/best-practices//benchmark-performance', }, + { + label: 'About', + path: '/about', + }, + { + label: 'Why Text Messaging', + path: '/about/why-text-messaging', + }, + { + label: 'Security', + path: '/about/security', + }, + { + label: 'Join Notify', + path: '/join-notify', + }, + { + label: 'Contact', + path: '/contact', + }, + // Add more links here as needed ];