From 50e7f3d33c4562a7c6b4e3b04af11a5a2a8bd9fb Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 13 Nov 2024 14:32:15 -0800 Subject: [PATCH 01/10] first round of about content --- .../uswds/_uswds-theme-custom-styles.scss | 19 +++++ app/main/views/index.py | 10 +++ app/main/views/sub_navigation_dictionaries.py | 9 +++ app/templates/views/about/about.html | 80 +++++++++++++++++++ 4 files changed, 118 insertions(+) create mode 100644 app/templates/views/about/about.html diff --git a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss index fe98aed09..da5d77bf2 100644 --- a/app/assets/sass/uswds/_uswds-theme-custom-styles.scss +++ b/app/assets/sass/uswds/_uswds-theme-custom-styles.scss @@ -897,3 +897,22 @@ li.linked-card:hover svg, .usa-sidenav__item a { display: block; } + +.about-icon-list { + display: flex; + width: 24px; + height: 24px; + padding: 2px 1px; + justify-content: center; + align-items: center; + margin-right: 4px; +} + +.usa-icon-list__content{ + padding-left: 0; +} + +.indented-paragraph { + margin-left: calc(24px + 4px); + margin-top: 4px; +} diff --git a/app/main/views/index.py b/app/main/views/index.py index 7728cb325..484318a04 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -10,6 +10,7 @@ from app.formatters import apply_html_class, convert_markdown_template 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, @@ -268,6 +269,15 @@ def benchmark_performance(): ) +@main.route("/about/about") +@user_is_logged_in +def about_notify(): + return render_template( + "views/about/about.html", + navigation_links=about_notify_nav(), + ) + + @main.route("/using-notify/guidance") @user_is_logged_in def guidance_index(): diff --git a/app/main/views/sub_navigation_dictionaries.py b/app/main/views/sub_navigation_dictionaries.py index 0689c198d..cdb793d5c 100644 --- a/app/main/views/sub_navigation_dictionaries.py +++ b/app/main/views/sub_navigation_dictionaries.py @@ -101,3 +101,12 @@ def best_practices_nav(): "link": "main.benchmark_performance", }, ] + + +def about_notify_nav(): + return [ + { + "name": "About notify", + "link": "main.about_notify", + }, + ] diff --git a/app/templates/views/about/about.html b/app/templates/views/about/about.html new file mode 100644 index 000000000..4beff22d9 --- /dev/null +++ b/app/templates/views/about/about.html @@ -0,0 +1,80 @@ +{% extends "base.html" %} + +{% set page_title = "About notify" %} + +{% block per_page_title %} +{{page_title}} +{% 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 + effectively with the people they serve. With Notify.gov, federal and federally-funded programs can send customized + text messages that make it possible to:

+ +

Notify.gov is an easy-to-use, web-based platform. It requires no technical expertise or system integration — users + can create an account and get started within minutes. We take the security and privacy of messaging data seriously + by minimizing data retention and using modern encryption methods.

+ +

Product Highlights

+ {% set product_highlights = [ + { + "svg_src": "#send", + "card_heading": "Send customized one-way customized messages", + "p_text": "Upload a file with recipient phone numbers and Notify.gov sends customized messages", + }, + { + "svg_src": "#translate", + "card_heading": "Send in recipients’ preferred language", + "p_text": "Notify.gov supports more than 30 character sets to send messages in almost any language", + }, + { + "svg_src": "#trending_up", + "card_heading": "See how messages perform", + "p_text": "Track how many messages you’ve sent and monitor delivery rates", + }, + { + "svg_src": "#add", + "card_heading": "Create and manage multiple services within a single organization", + "p_text": "Set up individual workspaces for different texting services, allowing multiple teams or programs to manage + day-to-day texting operations across an organization", + }, + { + "svg_src": "#people", + "card_heading": "Manage team member and permissions on each service", + "p_text": "Administrators can add users and control what they can do in Notify.gov", + } + ] %} + +

See if Notify is right for you

+

Notify.gov is a product of the Public Benefits Studio, a product accelerator inside + the federal government.

+ + +
+{% endblock %} From 8d85da8a900d46e3609c70ea923a1f0ee0ba6ce4 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 13 Nov 2024 15:00:40 -0800 Subject: [PATCH 02/10] add testing --- tests/app/test_navigation.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/app/test_navigation.py b/tests/app/test_navigation.py index 8bf52d803..15be17081 100644 --- a/tests/app/test_navigation.py +++ b/tests/app/test_navigation.py @@ -17,6 +17,7 @@ EXCLUDED_ENDPOINTS = tuple( map( Navigation.get_endpoint_with_blueprint, { + "about_notify", "accept_invite", "accept_org_invite", "accessibility_statement", From 3a52cba23e12149f024462ac605e9674cad9ba5e Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Wed, 13 Nov 2024 15:02:35 -0800 Subject: [PATCH 03/10] add testing --- app/main/views/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 484318a04..e8dbc10b0 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -269,7 +269,7 @@ def benchmark_performance(): ) -@main.route("/about/about") +@main.route("/about") @user_is_logged_in def about_notify(): return render_template( From 70ecf8fa09d5190dab17c4d6b0679b8ea947a0fc Mon Sep 17 00:00:00 2001 From: alexjanousekGSA Date: Thu, 14 Nov 2024 10:53:48 -0500 Subject: [PATCH 04/10] Added feature flag for route --- .ds.baseline | 4 ++-- app/config.py | 4 ++++ app/main/views/index.py | 15 +++++++++------ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.ds.baseline b/.ds.baseline index 0aff1ada1..c64d22627 100644 --- a/.ds.baseline +++ b/.ds.baseline @@ -161,7 +161,7 @@ "filename": "app/config.py", "hashed_secret": "577a4c667e4af8682ca431857214b3a920883efc", "is_verified": false, - "line_number": 121, + "line_number": 125, "is_secret": false } ], @@ -684,5 +684,5 @@ } ] }, - "generated_at": "2024-10-29T19:28:03Z" + "generated_at": "2024-11-14T15:53:44Z" } diff --git a/app/config.py b/app/config.py index 249451c66..f40b46dea 100644 --- a/app/config.py +++ b/app/config.py @@ -91,6 +91,10 @@ class Config(object): getenv("FEATURE_BEST_PRACTICES_ENABLED", "false") == "true" ) + FEATURE_ABOUT_PAGE_ENABLED = ( + getenv("FEATURE_ABOUT_PAGE_ENABLED", "false") == "true" + ) + def _s3_credentials_from_env(bucket_prefix): return { diff --git a/app/main/views/index.py b/app/main/views/index.py index e8dbc10b0..98083e046 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -19,14 +19,18 @@ from app.utils.user import user_is_logged_in from notifications_utils.url_safe_token import generate_token -# Hook to check for guidance routes +# Hook to check for feature flags @main.before_request -def check_guidance_feature(): - current_app.logger.warning("best practices 1234") - current_app.logger.warning(current_app.config["FEATURE_BEST_PRACTICES_ENABLED"]) +def check_feature_flags(): if ( request.path.startswith("/best-practices") - and not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"] + 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) ): abort(404) @@ -270,7 +274,6 @@ def benchmark_performance(): @main.route("/about") -@user_is_logged_in def about_notify(): return render_template( "views/about/about.html", From 55ae37ad800c7c034ce62139055e3ffb4c4501d8 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 14 Nov 2024 11:23:23 -0800 Subject: [PATCH 05/10] note to add youtube video --- app/templates/views/about/about.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/app/templates/views/about/about.html b/app/templates/views/about/about.html index 4beff22d9..3b7aa54fe 100644 --- a/app/templates/views/about/about.html +++ b/app/templates/views/about/about.html @@ -23,10 +23,7 @@

Notify.gov is an easy-to-use, web-based platform. It requires no technical expertise or system integration — users can create an account and get started within minutes. We take the security and privacy of messaging data seriously by minimizing data retention and using modern encryption methods.

- +

Product Highlights

{% set product_highlights = [ { From cd7df2f9d2bee112380758447586c6f60a888516 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Thu, 14 Nov 2024 16:25:37 -0800 Subject: [PATCH 06/10] flake8 --- app/main/views/index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/main/views/index.py b/app/main/views/index.py index 80f8bf74d..0a1635d67 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -288,6 +288,7 @@ def about_notify(): navigation_links=about_notify_nav(), ) + @main.route("/using-notify/guidance/create-and-send-messages") @user_is_logged_in def create_and_send_messages(): From 2aa5dd0174f11ffe4e2491d77739d4e5f7469327 Mon Sep 17 00:00:00 2001 From: alexjanousekGSA Date: Fri, 15 Nov 2024 11:55:16 -0500 Subject: [PATCH 07/10] Added back removed code --- app/main/views/index.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 0a1635d67..5116cb634 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -18,13 +18,18 @@ from app.main.views.sub_navigation_dictionaries import ( from app.utils.user import user_is_logged_in from notifications_utils.url_safe_token import generate_token - # Hook to check for feature flags @main.before_request -def check_guidance_feature(): +def check_feature_flags(): if ( - request.path.startswith("/guides/best-practices") - and not current_app.config["FEATURE_BEST_PRACTICES_ENABLED"] + request.path.startswith("/best-practices") + 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) ): abort(404) From 5b48127155c65f0a12d4262f2ac6fe8d5749d24a Mon Sep 17 00:00:00 2001 From: alexjanousekGSA Date: Fri, 15 Nov 2024 12:00:06 -0500 Subject: [PATCH 08/10] Fixed linting error --- app/main/views/index.py | 1 + 1 file changed, 1 insertion(+) diff --git a/app/main/views/index.py b/app/main/views/index.py index 5116cb634..0ad44267e 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -18,6 +18,7 @@ from app.main.views.sub_navigation_dictionaries import ( from app.utils.user import user_is_logged_in from notifications_utils.url_safe_token import generate_token + # Hook to check for feature flags @main.before_request def check_feature_flags(): From c432e434ae9312337636a247eb2c20dc102f1aa2 Mon Sep 17 00:00:00 2001 From: alexjanousekGSA Date: Fri, 15 Nov 2024 12:12:04 -0500 Subject: [PATCH 09/10] Updated url --- app/main/views/index.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 0ad44267e..974e29211 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -23,7 +23,7 @@ from notifications_utils.url_safe_token import generate_token @main.before_request def check_feature_flags(): if ( - request.path.startswith("/best-practices") + request.path.startswith("/guides/best-practices") and not current_app.config.get("FEATURE_BEST_PRACTICES_ENABLED", False) ): abort(404) From 7390b60f2ab7795d5b3ad979a97b6ae07592d813 Mon Sep 17 00:00:00 2001 From: Beverly Nguyen Date: Fri, 15 Nov 2024 11:45:57 -0800 Subject: [PATCH 10/10] padding change --- app/templates/views/about/about.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/views/about/about.html b/app/templates/views/about/about.html index 3b7aa54fe..39dfce671 100644 --- a/app/templates/views/about/about.html +++ b/app/templates/views/about/about.html @@ -24,7 +24,7 @@ can create an account and get started within minutes. We take the security and privacy of messaging data seriously by minimizing data retention and using modern encryption methods.

-

Product Highlights

+

Product Highlights

{% set product_highlights = [ { "svg_src": "#send",