Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production release for 12/20/24 #2223

Merged
merged 100 commits into from
Dec 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
9a5a960
contact content
Nov 18, 2024
9a8d8e1
Added new header button that is displayed in header
alexjanousekGSA Nov 19, 2024
9023943
Fixed a few errors
alexjanousekGSA Nov 19, 2024
9b246aa
Fixed indent
alexjanousekGSA Nov 19, 2024
9e8e791
added content and styling
Nov 19, 2024
b4cc2a7
styling
Nov 19, 2024
4a41c61
updatel link
Nov 19, 2024
8d55815
a11y
Nov 19, 2024
3a6295b
update contact
Nov 20, 2024
9e6dd5d
links updated
Nov 20, 2024
9483c09
update content
Nov 20, 2024
8672960
content update
Nov 20, 2024
8231b67
Updated logic in init to include nonce and state and removed from index
alexjanousekGSA Nov 21, 2024
3595876
Send Message A11Y Audit - Adjust headers in Send Message flow
jonathanbobel Nov 22, 2024
90c7386
Header fix
jonathanbobel Nov 22, 2024
c768b09
Fixed indenting
alexjanousekGSA Nov 25, 2024
c941e14
Added more spacing
alexjanousekGSA Nov 25, 2024
1763e75
Cleaning up imports
alexjanousekGSA Nov 25, 2024
497533c
More linting stuff
alexjanousekGSA Nov 25, 2024
2d0a53e
Sorted init
alexjanousekGSA Nov 25, 2024
276802a
changed naming
Nov 26, 2024
86ddcd3
changed naming
Nov 26, 2024
d5ef264
changed naming
Nov 26, 2024
c37fd5d
Merge branch 'main' into 2109-build-out-architecture-for-new-about-pa…
alexjanousekGSA Nov 26, 2024
1931e43
Fixed more imports
alexjanousekGSA Nov 26, 2024
2fa9c1e
removed unnecessary route
Nov 26, 2024
562f835
convert include to macros
Nov 26, 2024
5e11409
merge main
Nov 27, 2024
68e5ac5
fix testing
Nov 27, 2024
b98e3d8
Fixing tests
jonathanbobel Dec 2, 2024
9a38792
Merge branch 'main' of https://github.com/GSA/notifications-admin int…
jonathanbobel Dec 2, 2024
6218d3e
Adjusting tests
jonathanbobel Dec 2, 2024
994a314
Trying to decouple this h1 from the templates folder structure
jonathanbobel Dec 2, 2024
4170ca7
Merge pull request #2132 from GSA/2109-build-out-architecture-for-new…
alexjanousekGSA Dec 2, 2024
66c377c
changed page title and h1 on choose.html
Dec 2, 2024
7ffb4b6
Bump moto from 5.0.18 to 5.0.22
dependabot[bot] Dec 3, 2024
b01f5be
Merge remote-tracking branch 'origin' into 2135-send-message-flow-h1-…
jonathanbobel Dec 3, 2024
b7b5714
Merge branch '2135-send-message-flow-h1-changes' of https://github.co…
jonathanbobel Dec 3, 2024
078f75b
Merge pull request #2154 from GSA/2119-clean-up-best-practices-folder…
heyitsmebev Dec 3, 2024
4946bed
fixed title testing
Dec 3, 2024
35c1379
Merge branch '2135-send-message-flow-h1-changes' of https://github.co…
jonathanbobel Dec 3, 2024
d92255c
Merge branch 'main' of https://github.com/GSA/notifications-admin int…
jonathanbobel Dec 3, 2024
d275e7b
Bump rollup from 4.27.3 to 4.28.0
dependabot[bot] Dec 3, 2024
f45454b
Bump sass-embedded from 1.81.0 to 1.82.0
dependabot[bot] Dec 3, 2024
9ef8966
fixed testing
Dec 4, 2024
8468b4d
fixed testing
Dec 4, 2024
02bffa8
fixed testing
Dec 4, 2024
b75d7dc
style changes
jonathanbobel Dec 4, 2024
30c2497
Merge branch '2135-send-message-flow-h1-changes' of https://github.co…
jonathanbobel Dec 4, 2024
0ba9943
Merge pull request #2170 from GSA/dependabot/npm_and_yarn/sass-embedd…
alexjanousekGSA Dec 4, 2024
46ee555
Merge pull request #2169 from GSA/dependabot/npm_and_yarn/rollup-4.28.0
alexjanousekGSA Dec 4, 2024
3728af6
Bump cross-spawn from 7.0.3 to 7.0.6
dependabot[bot] Dec 4, 2024
3c621ee
Merge pull request #2149 from GSA/dependabot/npm_and_yarn/cross-spawn…
alexjanousekGSA Dec 4, 2024
d684168
Style, clean up, a11y updates
jonathanbobel Dec 4, 2024
8e896eb
Merge pull request #2164 from GSA/dependabot/pip/moto-5.0.22
alexjanousekGSA Dec 4, 2024
cf45313
added youtube video to about page
Dec 4, 2024
a6a1aa0
Merge branch 'main' into 2104-join-notify
Dec 4, 2024
cce4997
moved join-notify out of about
Dec 4, 2024
167cd2c
Merge branch 'main' into 2105-contact
Dec 4, 2024
b49f579
updated contact route
Dec 4, 2024
0f7d09a
fixed flake8
Dec 4, 2024
83c21ec
fixed flake8
Dec 4, 2024
9c3560c
Merge pull request #2178 from GSA/2177-add-video-to-about-page
heyitsmebev Dec 5, 2024
7b56372
Merge pull request #2128 from GSA/2105-contact
heyitsmebev Dec 5, 2024
28a6b44
Merge pull request #2151 from GSA/2135-send-message-flow-h1-changes
heyitsmebev Dec 5, 2024
e3bb69b
First commit of new updated homepage content
alexjanousekGSA Dec 9, 2024
2fb4b75
added errors focus
Dec 10, 2024
27abdc6
flake
Dec 10, 2024
4c710b6
2133 - small a11y updates
jonathanbobel Dec 10, 2024
7f16edc
Removing comments
jonathanbobel Dec 10, 2024
0058152
Fixing tests
jonathanbobel Dec 10, 2024
1f3d202
refactor a bit
Dec 10, 2024
4d0affe
Bump playwright from 1.49.0 to 1.49.1
dependabot[bot] Dec 10, 2024
be5f789
Trying to get successful build
alexjanousekGSA Dec 11, 2024
dfef520
Fixed test
alexjanousekGSA Dec 11, 2024
92f3794
Updated some text
alexjanousekGSA Dec 11, 2024
1a9408a
Additional a11y updates
jonathanbobel Dec 11, 2024
1e3f15d
Reverting as this should be addressed in a future issue
jonathanbobel Dec 11, 2024
e1e0a4d
Fixing test
jonathanbobel Dec 11, 2024
649f3ee
Adding sr-only contextual content
jonathanbobel Dec 11, 2024
00949dc
Moving ul to pass E2E test
jonathanbobel Dec 11, 2024
ad836d0
Fixing the ul
jonathanbobel Dec 12, 2024
7aeb1c0
Bump sass-embedded from 1.82.0 to 1.83.0
dependabot[bot] Dec 12, 2024
1486680
Updating new home page styles to use more from the USWDS, and make su…
jonathanbobel Dec 13, 2024
c090794
Merge pull request #2192 from GSA/2124-send-message-a11y-audit-error-…
heyitsmebev Dec 16, 2024
12660ef
Merge pull request #2189 from GSA/2175-user-story-update-home-page-ph…
alexjanousekGSA Dec 16, 2024
15dbf4a
Bump @rollup/plugin-node-resolve from 15.3.0 to 16.0.0
dependabot[bot] Dec 16, 2024
6856ead
Merge branch 'main' into 2104-join-notify
Dec 17, 2024
89fe517
Merge pull request #2134 from GSA/2104-join-notify
jonathanbobel Dec 17, 2024
e0738dd
Merge branch 'main' of https://github.com/GSA/notifications-admin int…
jonathanbobel Dec 17, 2024
38da133
Merge pull request #2197 from GSA/2133-small-a11y-updates
stvnrlly Dec 18, 2024
ea20512
Added nav button for about page
alexjanousekGSA Dec 19, 2024
c1c298c
Merge pull request #2213 from GSA/dependabot/npm_and_yarn/rollup/plug…
alexjanousekGSA Dec 19, 2024
3461f38
Bump rollup from 4.28.0 to 4.28.1
dependabot[bot] Dec 19, 2024
c6d6818
Bump @rollup/plugin-commonjs from 28.0.1 to 28.0.2
dependabot[bot] Dec 19, 2024
cc02881
Merge pull request #2205 from GSA/dependabot/npm_and_yarn/sass-embedd…
alexjanousekGSA Dec 19, 2024
22f25b3
Merge pull request #2203 from GSA/dependabot/npm_and_yarn/playwright-…
alexjanousekGSA Dec 19, 2024
993e8f5
Merge pull request #2212 from GSA/dependabot/npm_and_yarn/rollup/plug…
alexjanousekGSA Dec 19, 2024
51e4fb3
Merge pull request #2187 from GSA/dependabot/npm_and_yarn/rollup-4.28.1
alexjanousekGSA Dec 19, 2024
e3674d1
Merge pull request #2215 from GSA/feature/added-about-nav-button
stvnrlly Dec 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 43 additions & 5 deletions app/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
import pathlib
import secrets
from functools import partial
from time import monotonic
from urllib.parse import urlparse, urlunparse
from urllib.parse import unquote, urlparse, urlunparse

import jinja2
from flask import (
Expand Down Expand Up @@ -114,6 +115,7 @@
get_lines_with_normalised_whitespace,
)
from notifications_utils.recipients import format_phone_number_human_readable
from notifications_utils.url_safe_token import generate_token

login_manager = LoginManager()
csrf = CSRFProtect()
Expand All @@ -139,6 +141,10 @@ def _csp(config):
logo_domain = config["LOGO_CDN_DOMAIN"]
return {
"default-src": ["'self'", asset_domain],
"frame-src": [
"https://www.youtube.com",
"https://www.youtube-nocookie.com",
],
"frame-ancestors": "'none'",
"form-action": "'self'",
"script-src": [
Expand Down Expand Up @@ -168,10 +174,42 @@ def create_app(application):

@application.context_processor
def inject_feature_flags():
feature_best_practices_enabled = application.config[
"FEATURE_BEST_PRACTICES_ENABLED"
]
return dict(FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled)
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,
)

@application.context_processor
def inject_initial_signin_url():
ttl = 24 * 60 * 60

# make and store the state
state = generate_token(
str(request.remote_addr),
current_app.config["SECRET_KEY"],
current_app.config["DANGEROUS_SALT"],
)

state_key = f"login-state-{unquote(state)}"
redis_client.set(state_key, state, ex=ttl)

# make and store the nonce
nonce = secrets.token_urlsafe()
nonce_key = f"login-nonce-{unquote(nonce)}"
redis_client.set(nonce_key, nonce, ex=ttl)

url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL")
if url is not None:
url = url.replace("NONCE", nonce)
url = url.replace("STATE", state)

return {"initial_signin_url": url}

notify_environment = os.environ["NOTIFY_ENVIRONMENT"]

Expand Down
17 changes: 17 additions & 0 deletions app/assets/images/contact.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions app/assets/images/fast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions app/assets/images/internet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading