Merge pull request #3091 from GSA/fix/css-touchup

CSS follow up fixes
This commit is contained in:
ccostino
2025-11-12 13:40:33 -05:00
committed by GitHub
6 changed files with 90 additions and 67 deletions

View File

@@ -23,3 +23,36 @@ p,
font-family: family('sans');
font-size: size('body', 6);
}
// Loading spinner for button states (e.g., after hitting send on text messages)
.loading-spinner {
display: inline-block;
margin-left: 0.5rem;
width: 1em;
height: 1em;
border: 2px solid transparent;
border-top-color: currentColor;
border-radius: 50%;
animation: spin 0.75s linear infinite;
vertical-align: middle;
}
@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}
// Style for disabled loading button
.usa-button[disabled] {
position: relative;
.loading-spinner {
display: inline-block;
}
min-width: 120px;
}

View File

@@ -30,6 +30,11 @@
}
}
.browse-list + .js-stick-at-bottom-when-scrolling .usa-button {
width: auto;
white-space: nowrap;
}
.usa-button img {
margin-left: 0.5rem;
height: 1rem;

View File

@@ -135,7 +135,7 @@
}
.template-list-item {
padding: units(1) 0;
padding: units(1) units(3);
&:empty {
display: none;
@@ -147,13 +147,11 @@
&:hover {
background-color: color('gray-cool-5');
padding-left: units(1);
margin-left: units(-1);
padding-right: units(1);
margin-right: units(-1);
}
padding-left: units(3);
}
}
li.template-list-item.margin-bottom-2 {
margin-bottom: units(1);
}

View File

@@ -49,11 +49,11 @@
{% block maincolumn_content %}
<h1 class="font-heading-xl {% if current_user.has_access_to_live_and_trial_mode_services %}usa-sr-only{% endif %}">
<h1 class="font-heading-xl">
Choose service
</h1>
<nav class="browse-list {% if current_user.has_access_to_live_and_trial_mode_services %}top-gutter-2-3{% endif %}">
<nav class="browse-list">
{% if current_user.platform_admin %}
<div class="grid-row">
@@ -101,23 +101,12 @@
{% if can_add_service %}
<div class="js-stick-at-bottom-when-scrolling">
{% if current_user.has_access_to_live_and_trial_mode_services %}
<div class="grid-row">
<div class="grid-col-3">
&nbsp;
</div>
<div class="grid-col-9">
{% endif %}
{{ usaButton({
"element": "a",
"text": "Add service",
"href": url_for('.add_service'),
"classes": ""
}) }}
{% if current_user.has_access_to_live_and_trial_mode_services %}
</div>
</div>
{% endif %}
</div>
{% endif %}

82
package-lock.json generated
View File

@@ -101,6 +101,7 @@
"integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@babel/code-frame": "^7.27.1",
"@babel/generator": "^7.28.5",
@@ -1917,6 +1918,7 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
},
@@ -1940,6 +1942,7 @@
}
],
"license": "MIT",
"peer": true,
"engines": {
"node": ">=18"
}
@@ -3687,8 +3690,7 @@
"optional": true,
"os": [
"android"
],
"peer": true
]
},
"node_modules/@rollup/rollup-android-arm64": {
"version": "4.52.4",
@@ -3701,8 +3703,7 @@
"optional": true,
"os": [
"android"
],
"peer": true
]
},
"node_modules/@rollup/rollup-darwin-arm64": {
"version": "4.52.4",
@@ -3715,8 +3716,7 @@
"optional": true,
"os": [
"darwin"
],
"peer": true
]
},
"node_modules/@rollup/rollup-darwin-x64": {
"version": "4.52.4",
@@ -3729,8 +3729,7 @@
"optional": true,
"os": [
"darwin"
],
"peer": true
]
},
"node_modules/@rollup/rollup-freebsd-arm64": {
"version": "4.52.4",
@@ -3743,8 +3742,7 @@
"optional": true,
"os": [
"freebsd"
],
"peer": true
]
},
"node_modules/@rollup/rollup-freebsd-x64": {
"version": "4.52.4",
@@ -3757,8 +3755,7 @@
"optional": true,
"os": [
"freebsd"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-arm-gnueabihf": {
"version": "4.52.4",
@@ -3771,8 +3768,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-arm-musleabihf": {
"version": "4.52.4",
@@ -3785,8 +3781,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-arm64-gnu": {
"version": "4.52.4",
@@ -3799,8 +3794,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-arm64-musl": {
"version": "4.52.4",
@@ -3813,8 +3807,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-loong64-gnu": {
"version": "4.52.4",
@@ -3827,8 +3820,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-ppc64-gnu": {
"version": "4.52.4",
@@ -3841,8 +3833,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-riscv64-gnu": {
"version": "4.52.4",
@@ -3855,8 +3846,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-riscv64-musl": {
"version": "4.52.4",
@@ -3869,8 +3859,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-s390x-gnu": {
"version": "4.52.4",
@@ -3883,8 +3872,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-x64-gnu": {
"version": "4.52.4",
@@ -3897,8 +3885,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-linux-x64-musl": {
"version": "4.52.4",
@@ -3911,8 +3898,7 @@
"optional": true,
"os": [
"linux"
],
"peer": true
]
},
"node_modules/@rollup/rollup-openharmony-arm64": {
"version": "4.52.4",
@@ -3925,8 +3911,7 @@
"optional": true,
"os": [
"openharmony"
],
"peer": true
]
},
"node_modules/@rollup/rollup-win32-arm64-msvc": {
"version": "4.52.4",
@@ -3939,8 +3924,7 @@
"optional": true,
"os": [
"win32"
],
"peer": true
]
},
"node_modules/@rollup/rollup-win32-ia32-msvc": {
"version": "4.52.4",
@@ -3953,8 +3937,7 @@
"optional": true,
"os": [
"win32"
],
"peer": true
]
},
"node_modules/@rollup/rollup-win32-x64-gnu": {
"version": "4.52.4",
@@ -3967,8 +3950,7 @@
"optional": true,
"os": [
"win32"
],
"peer": true
]
},
"node_modules/@rollup/rollup-win32-x64-msvc": {
"version": "4.52.4",
@@ -3981,8 +3963,7 @@
"optional": true,
"os": [
"win32"
],
"peer": true
]
},
"node_modules/@rollup/stream": {
"version": "3.0.1",
@@ -4743,6 +4724,7 @@
"integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
"dev": true,
"license": "MIT",
"peer": true,
"bin": {
"acorn": "bin/acorn"
},
@@ -4791,6 +4773,7 @@
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.16.0.tgz",
"integrity": "sha512-F0twR8U1ZU67JIEtekUcLkXkoO5mMMmgGD8sK/xUFzJ805jxHQl92hImFAqqXMyMYjSPOyUPAwHYhB72g5sTXw==",
"dev": true,
"peer": true,
"dependencies": {
"fast-deep-equal": "^3.1.3",
"json-schema-traverse": "^1.0.0",
@@ -5487,6 +5470,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"baseline-browser-mapping": "^2.8.25",
"caniuse-lite": "^1.0.30001754",
@@ -6396,6 +6380,7 @@
"resolved": "https://registry.npmjs.org/d3-selection/-/d3-selection-3.0.0.tgz",
"integrity": "sha512-fmTRWbNMmsmWq6xJV8D19U/gw/bwrHfNXxrIN+HfZgnzqTHp9jOmKMhsTUjXOJnZOdZY9Q28y4yebKzqDKlxlQ==",
"license": "ISC",
"peer": true,
"engines": {
"node": ">=12"
}
@@ -6657,7 +6642,8 @@
"version": "0.0.1312386",
"resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1312386.tgz",
"integrity": "sha512-DPnhUXvmvKT2dFA/j7B+riVLUt9Q6RKJlcppojL5CoRywJJKLDYnRlw0gTFKfgDPHP5E04UoB71SxoJlVZy8FA==",
"dev": true
"dev": true,
"peer": true
},
"node_modules/diff": {
"version": "3.5.0",
@@ -10169,6 +10155,7 @@
"integrity": "sha512-Cvc9WUhxSMEo4McES3P7oK3QaXldCfNWp7pl2NNeiIFlCoLr3kfq9kb1fxftiwk1FLV7CvpvDfonxtzUDeSOPg==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"cssstyle": "^4.2.1",
"data-urls": "^5.0.0",
@@ -11569,6 +11556,7 @@
}
],
"license": "MIT",
"peer": true,
"dependencies": {
"nanoid": "^3.3.8",
"picocolors": "^1.1.1",
@@ -12171,6 +12159,7 @@
"integrity": "sha512-Dqh7SiYcaFtdv5Wvku6QgS5IGPm281L+ZtVD1U2FJa7Q0EFRlq8Z3sjYtz6gYObsYThUOz9ArwFqPZx+1azILQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"chokidar": "^4.0.0",
"immutable": "^5.0.2",
@@ -12191,6 +12180,7 @@
"resolved": "https://registry.npmjs.org/sass-embedded/-/sass-embedded-1.93.3.tgz",
"integrity": "sha512-+VUy01yfDqNmIVMd/LLKl2TTtY0ovZN0rTonh+FhKr65mFwIYgU9WzgIZKS7U9/SPCQvWTsTGx9jyt+qRm/XFw==",
"license": "MIT",
"peer": true,
"dependencies": {
"@bufbuild/protobuf": "^2.5.0",
"buffer-builder": "^0.2.0",
@@ -13761,6 +13751,7 @@
"integrity": "sha512-7h/weGm9d/ywQ6qzJ+Xy+r9n/3qgp/thalBbpOi5i223dPXKi04IBtqPN9nTd+jBc7QKfvDbaBnFipYp4sJAUQ==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@types/eslint-scope": "^3.7.7",
"@types/estree": "^1.0.8",
@@ -13810,6 +13801,7 @@
"integrity": "sha512-MfwFQ6SfwinsUVi0rNJm7rHZ31GyTcpVE5pgVA3hwFRb7COD4TzjUUwhGWKfO50+xdc2MQPuEBBJoqIMGt3JDw==",
"dev": true,
"license": "MIT",
"peer": true,
"dependencies": {
"@discoveryjs/json-ext": "^0.6.1",
"@webpack-cli/configtest": "^3.0.1",

View File

@@ -1735,7 +1735,9 @@ def test_organization_dashboard_shows_edit_service_form(
"total_message_limit": 0,
},
)
mocker.patch("app.organizations_client.get_organization_services", return_value=[service])
mocker.patch(
"app.organizations_client.get_organization_services", return_value=[service]
)
mocker.patch(
"app.organizations_client.get_organization_dashboard",
return_value={"services": []},
@@ -1778,7 +1780,9 @@ def test_organization_dashboard_edit_service_updates_service(
"total_message_limit": 0,
},
)
mocker.patch("app.organizations_client.get_organization_services", return_value=[service])
mocker.patch(
"app.organizations_client.get_organization_services", return_value=[service]
)
mocker.patch(
"app.organizations_client.get_organization_dashboard",
return_value={"services": []},
@@ -1804,4 +1808,6 @@ def test_organization_dashboard_edit_service_updates_service(
assert mock_update_service.call_count == 3
mock_update_service.assert_any_call(SERVICE_ONE_ID, name="New Name")
mock_update_service.assert_any_call(SERVICE_ONE_ID, billing_contact_email_addresses="new@example.com")
mock_update_service.assert_any_call(
SERVICE_ONE_ID, billing_contact_email_addresses="new@example.com"
)