changed guidanced to best practices

This commit is contained in:
Beverly Nguyen
2024-10-24 17:03:45 -07:00
parent 4b85ae6493
commit 2bbc58c8af
9 changed files with 19 additions and 19 deletions

View File

@@ -87,7 +87,7 @@ class Config(object):
"tts-benefits-studio@gsa.gov", "tts-benefits-studio@gsa.gov",
], ],
} }
FEATURE_GUIDANCE_ENABLED = getenv("FEATURE_GUIDANCE_ENABLED", "false") FEATURE_BEST_PRACTICES_ENABLED = getenv("FEATURE_BEST_PRACTICES_ENABLED", "false")
def _s3_credentials_from_env(bucket_prefix): def _s3_credentials_from_env(bucket_prefix):

View File

@@ -7,4 +7,4 @@ cloud_dot_gov_route: notify-demo.app.cloud.gov
redis_enabled: 1 redis_enabled: 1
nr_agent_id: '1134302465' nr_agent_id: '1134302465'
nr_app_id: '1083160688' nr_app_id: '1083160688'
FEATURE_GUIDANCE_ENABLED: true FEATURE_BEST_PRACTICES_ENABLED: true

View File

@@ -7,4 +7,4 @@ cloud_dot_gov_route: notify.app.cloud.gov
redis_enabled: 1 redis_enabled: 1
nr_agent_id: '1050708682' nr_agent_id: '1050708682'
nr_app_id: '1050708682' nr_app_id: '1050708682'
FEATURE_GUIDANCE_ENABLED: false FEATURE_BEST_PRACTICES_ENABLED: false

View File

@@ -12,4 +12,4 @@ SECRET_KEY: sandbox-notify-secret-key
nr_agent_id: '' nr_agent_id: ''
nr_app_id: '' nr_app_id: ''
NR_BROWSER_KEY: '' NR_BROWSER_KEY: ''
FEATURE_GUIDANCE_ENABLED: true FEATURE_BEST_PRACTICES_ENABLED: true

View File

@@ -7,4 +7,4 @@ cloud_dot_gov_route: notify-staging.app.cloud.gov
redis_enabled: 1 redis_enabled: 1
nr_agent_id: '1134291385' nr_agent_id: '1134291385'
nr_app_id: '1031640326' nr_app_id: '1031640326'
FEATURE_GUIDANCE_ENABLED: false FEATURE_BEST_PRACTICES_ENABLED: false

View File

@@ -34,7 +34,7 @@ cf set-env <APP_NAME> <ENV_VAR_NAME> <VALUE>
#### Example: #### Example:
``` ```
cf set-env notify-admin-sandbox FEATURE_GUIDANCE_ENABLED true cf set-env notify-admin-sandbox FEATURE_BEST_PRACTICES_ENABLED true
``` ```
### 4. Restage the Application ### 4. Restage the Application

View File

@@ -62,4 +62,4 @@ applications:
LOGIN_DOT_GOV_CERTS_URL: ((LOGIN_DOT_GOV_CERTS_URL)) LOGIN_DOT_GOV_CERTS_URL: ((LOGIN_DOT_GOV_CERTS_URL))
# feature flagging # feature flagging
FEATURE_GUIDANCE_ENABLED: ((FEATURE_GUIDANCE_ENABLED)) FEATURE_BEST_PRACTICES_ENABLED: ((FEATURE_BEST_PRACTICES_ENABLED))

View File

@@ -13,7 +13,7 @@ from flask import url_for
"roadmap", "roadmap",
"features", "features",
"documentation", "documentation",
"guidance", "best_practices",
"clear_goals", "clear_goals",
"rules_and_regulations", "rules_and_regulations",
"establish_trust", "establish_trust",
@@ -37,11 +37,11 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc
# Function to check if a view is feature-flagged and should return 404 when disabled # Function to check if a view is feature-flagged and should return 404 when disabled
def is_feature_flagged(view): def is_feature_flagged(view):
feature_guidance_enabled = ( feature_best_practices_enabled = (
os.getenv("FEATURE_GUIDANCE_ENABLED", "false").lower() == "true" os.getenv("FEATURE_BEST_PRACTICES_ENABLED", "false").lower() == "true"
) )
feature_flagged_views = [ feature_flagged_views = [
"guidance", "best_practices",
"clear_goals", "clear_goals",
"rules_and_regulations", "rules_and_regulations",
"establish_trust", "establish_trust",
@@ -49,7 +49,7 @@ def test_static_pages(client_request, mock_get_organization_by_domain, view, moc
"multiple_languages", "multiple_languages",
"benchmark_performance", "benchmark_performance",
] ]
return not feature_guidance_enabled and view in feature_flagged_views return not feature_best_practices_enabled and view in feature_flagged_views
request = partial(client_request.get, "main.{}".format(view)) request = partial(client_request.get, "main.{}".format(view))

14
urls.js
View File

@@ -13,13 +13,13 @@ const sublinks = [
{ label: 'Roadmap', path: '/features/roadmap' }, { label: 'Roadmap', path: '/features/roadmap' },
{ label: 'Security', path: '/features/security' }, { label: 'Security', path: '/features/security' },
{ label: 'Support', path: '/support' }, { label: 'Support', path: '/support' },
{ label: 'Guidance', path: '/guidance' }, { label: 'Best Practices', path: '/best-practices' },
{ label: 'Clear Goals', path: '/guidance/clear-goals' }, { label: 'Clear Goals', path: '/best-practices/clear-goals' },
{ label: 'Rules And Regulations', path: '/guidance/rules-and-regulations' }, { label: 'Rules And Regulations', path: '/best-practices/rules-and-regulations' },
{ label: 'Establish Trust', path: '/guidance/establish-trust' }, { label: 'Establish Trust', path: '/best-practices/establish-trust' },
{ label: 'Write For Action', path: '/guidance/write-for-action' }, { label: 'Write For Action', path: '/best-practices/write-for-action' },
{ label: 'Multiple Languages', path: '/guidance/multiple-languages' }, { label: 'Multiple Languages', path: '/best-practices/multiple-languages' },
{ label: 'Benchmark Performance', path: '/guidance/benchmark-performance' }, { label: 'Benchmark Performance', path: '/best-practices/benchmark-performance' },
// Add more links here as needed // Add more links here as needed
]; ];