Skip to content

Commit 7992096

Browse files
cram-cfaclaude
andauthored
Remove unused CfA USWDS design system scaffolding (FFB-2) (#1439)
The cfa-uswds design system option was started in late 2023 (#400, #443) but never filled in: the template folder held only an empty headLinks fragment, so enabling it added no styling. Remove it entirely: - ThymeleafConfiguration and its cfa-uswds-templates resolver bean (gated on form-flow.design-system.name=cfa-uswds) - src/main/resources/cfa-uswds-templates/ - ThymeleafConfigurationLoadedTest / ThymeleafConfigurationUnloadedTest - README "Design System" section and the "Gradle tasks" section, which documented the starter app's USWDS npm/Sass/JS build tasks Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent a373139 commit 7992096

7 files changed

Lines changed: 0 additions & 256 deletions

File tree

‎README.md‎

Lines changed: 0 additions & 149 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@ Table of Contents
9797
* [Application Configuration](#application-configuration)
9898
* [Disabling a Flow](#disabling-a-flow)
9999
* [Locking the Submission for a Flow Once It Has Been Submitted](#locking-the-submission-for-a-flow-once-it-has-been-submitted)
100-
* [Design System](#design-system)
101100
* [File Upload Properties](#file-upload-properties)
102101
* [Error Properties](#error-properties)
103102
* [Actuator Endpoints](#actuator-endpoints)
@@ -129,18 +128,6 @@ Table of Contents
129128
* [Setup Platform Flavored Google Styles for Java](#setup-platform-flavored-google-styles-for-java)
130129
* [Testing](#testing)
131130
* [Setup Fake Filler (Optional - Recommended for Chrome &amp; Firefox)](#setup-fake-filler-optional---recommended-for-chrome--firefox)
132-
* [Gradle tasks](#gradle-tasks)
133-
* [checkForNpm](#checkForNpm)
134-
* [npmInstall](#npmInstall)
135-
* [moveNodeModulesToGenerated](#moveNodeModulesToGenerated)
136-
* [moveUSWDSImagesToGenerated](#moveUSWDSImagesToGenerated)
137-
* [compileSass](#compileSass)
138-
* [compileJs](#compileJs)
139-
* [watchCompileSass](#watchCompileSass)
140-
* [watchCompileJs](#watchCompileJs)
141-
* [cleanGenerated](#cleanGenerated)
142-
* [clean](#clean)
143-
* [processResources](#processResources)
144131
* [How to contribute](#how-to-contribute)
145132
* [Maintainer information](#maintainer-information)
146133

@@ -3175,30 +3162,6 @@ The default message can be overwritten by placing a message string with the
31753162
key `general.locked-submission`
31763163
and your desired value in your application's `messages.properties` file.
31773164

3178-
### Design System
3179-
3180-
We are moving towards using a [custom theme](https://codeforamerica.github.io/uswds/dist/) of
3181-
the [US Web Design System (USWDS)](https://designsystem.digital.gov/). Enabling this
3182-
property will set template resolution to use USWDS styling in place of our default design system. The USWDS
3183-
template location will become the default for your application, pulling USWDS styles, templates and
3184-
fragments
3185-
in place of our default ones. The USWDS file path will be `/resources/cfa-uswds-templates/`. You can
3186-
override templates and fragments in this path by placing a file with the same name and path in your
3187-
application. For example, placing a file at `/resources/cfa-uswds-templates/fragments/example.html`
3188-
would override the fragment with the same name in the USWDS fragments folder.
3189-
3190-
You can view all the USWDS templates and fragments in
3191-
the [USWDS templates folder](https://github.com/codeforamerica/form-flow/tree/main/src/main/resources/cfa-uswds-templates).
3192-
3193-
When using `cfa-uswds`, we also enable several Gradle tasks that compile Sass and Javascript in the
3194-
starter application. These tasks will automatically run when building/starting the application
3195-
locally. You can learn more about the [Gradle tasks in the section below](#gradle-tasks).
3196-
3197-
| Property | Default | Description |
3198-
|--------------------------------|---------|--------------------------------------------------------------------------------------------------------------------------------------|
3199-
| `form-flow.design-system.name` | none | Can use `cfa-uswds` to enable the CfA USWDS design system assets and templates. Otherwise our default assets and templates are used. |
3200-
|
3201-
32023165
### File Upload Properties
32033166

32043167
| Property | Default | Description |
@@ -3705,118 +3668,6 @@ or [Fake Filler for FireFox](https://addons.mozilla.org/en-US/firefox/addon/fake
37053668
on [Keyboard Shortcuts (chrome)](chrome-extension://bnjjngeaknajbdcgpfkgnonkmififhfo/options.html#/keyboard-shortcuts)
37063669
to choose the shortcut you want to use to fill out the page.
37073670

3708-
# Gradle tasks
3709-
3710-
This documentation is for custom tasks written in
3711-
the [Starter Application's `build.gradle`](https://github.com/codeforamerica/form-flow-starter-app/blob/main/build.gradle).
3712-
3713-
## checkForNpm
3714-
3715-
- **Description**: Check if `npm` is accessible and install it if not.
3716-
- **Usage**:
3717-
```
3718-
./gradlew checkForNpm
3719-
```
3720-
This task will automatically run in the `build` process if the `cfa-uswds` design system
3721-
application
3722-
property is set.
3723-
3724-
## npmInstall
3725-
3726-
- **Description**: Install frontend dependencies using `npm`.
3727-
- **Usage**:
3728-
```
3729-
./gradlew npmInstall
3730-
```
3731-
This task will automatically run in the `build` process if the `cfa-uswds` design system
3732-
application
3733-
property is set.
3734-
3735-
## moveNodeModulesToGenerated
3736-
3737-
- **Description**: Move Node Modules into Generated so that Spring Boot can use the assets.
3738-
- **Usage**:
3739-
```
3740-
./gradlew moveNodeModulesToGenerated
3741-
```
3742-
This task will automatically run in the `build` process if `cfa-uswds` design system application
3743-
property is set.
3744-
3745-
## moveUSWDSImagesToGenerated
3746-
3747-
- **Description**: Move USWDS images into generated folder for Spring Boot to use it.
3748-
- **Usage**:
3749-
```
3750-
./gradlew moveUSWDSImagesToGenerated
3751-
```
3752-
This task will automatically run in the `build` process if the `cfa-uswds` design system
3753-
application
3754-
property is set.
3755-
3756-
## compileSass
3757-
3758-
- **Description**: Compile Sass files into CSS.
3759-
- **Usage**:
3760-
```
3761-
./gradlew compileSass
3762-
```
3763-
This task will automatically run in the `build` process if the `cfa-uswds` design system
3764-
application
3765-
property is set.
3766-
3767-
## compileJs
3768-
3769-
- **Description**: Compile CommonJS into JavaScript.
3770-
- **Usage**:
3771-
```
3772-
./gradlew compileJs
3773-
```
3774-
This task will automatically run in the `build` process if the `cfa-uswds` design system
3775-
application
3776-
property is set.
3777-
3778-
## watchCompileSass
3779-
3780-
- **Description**: Infinite task to watch and recompile changes with SCSS.
3781-
- **Usage**:
3782-
```
3783-
./gradlew watchCompileSass
3784-
```
3785-
You will want to have this task run in a separate terminal as it will continue to run until you
3786-
terminate it.
3787-
3788-
## watchCompileJs
3789-
3790-
- **Description**: Infinite task to watch and recompile changes with JavaScript.
3791-
- **Usage**:
3792-
```
3793-
./gradlew watchCompileJs
3794-
```
3795-
You will want to have this task run in a separate terminal as it will continue to run until you
3796-
terminate it.
3797-
3798-
## cleanGenerated
3799-
3800-
- **Description**: Deletes the 'generated' directory.
3801-
- **Usage**:
3802-
```
3803-
./gradlew cleanGenerated
3804-
```
3805-
3806-
## clean
3807-
3808-
- **Description**: When `cfa-uswds` is set, the standard `clean` task will also delete `generated/`
3809-
and `node_modules/`
3810-
- **Usage**:
3811-
```
3812-
./gradlew clean
3813-
```
3814-
3815-
## processResources
3816-
3817-
- **Description**: When `cfa-uswds` is set, when building the application, this task will
3818-
call `compileSass` and `compileJS`.
3819-
38203671
# How to contribute
38213672

38223673

‎src/main/java/formflow/library/config/ThymeleafConfiguration.java‎

Lines changed: 0 additions & 48 deletions
This file was deleted.

‎src/main/resources/cfa-uswds-templates/.keep‎

Whitespace-only changes.

‎src/main/resources/cfa-uswds-templates/fragments/.keep‎

Whitespace-only changes.

‎src/main/resources/cfa-uswds-templates/fragments/libraryHead.html‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎src/test/java/formflow/library/config/ThymeleafConfigurationLoadedTest.java‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎src/test/java/formflow/library/config/ThymeleafConfigurationUnloadedTest.java‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)