From 9e25a0485f79a53ddaec775565a432289f83f012 Mon Sep 17 00:00:00 2001 From: Jessica Dussault Date: Fri, 23 Aug 2024 10:29:12 -0500 Subject: [PATCH] updates design preferences and config example files --- .env.cloud.example.yml | 21 +++++++++------------ .env.example.local | 11 +++++++---- docs/dev-practices/USWDS.md | 15 ++++++++++----- 3 files changed, 26 insertions(+), 21 deletions(-) diff --git a/.env.cloud.example.yml b/.env.cloud.example.yml index 66a86d86..61f1fbd9 100644 --- a/.env.cloud.example.yml +++ b/.env.cloud.example.yml @@ -1,14 +1,11 @@ -# name and root url of this app -APP_NAME: cg-ui -ROOT_URL: replace_me - -# API config -CF_API_URL: https://replace_me/v3 - -# oauth/uaa configs +AUTH_CALLBACK_PATH: auth/login/callback +CF_API_URL: replace_me +DATABASE_SSL: true +NPM_CONFIG_PRODUCTION: false +OAUTH_CLIENT_ID: replace_me OAUTH_CLIENT_SECRET: replace_me +ROOT_URL: replace_me +UAA_AUTH_PATH: /oauth/authorize +UAA_LOGOUT_PATH: /logout.do UAA_ROOT_URL: replace_me -NEXT_PUBLIC_USER_INVITE_URL: replace_me - -# db -DB_NAME: cg-ui-datastore +UAA_TOKEN_PATH: /oauth/token diff --git a/.env.example.local b/.env.example.local index d91a9102..d056bcfd 100644 --- a/.env.example.local +++ b/.env.example.local @@ -6,6 +6,7 @@ DATABASE_URL=postgresql://postgres:password@localhost:5434/cgui # UAA # Connect to your local UAA instance +# These values should match configuration in uaa-docker/uaa.yml # AUTH_CALLBACK_PATH=auth/login/callback OAUTH_CLIENT_ID=my_client_id @@ -16,11 +17,13 @@ UAA_TOKEN_PATH=/oauth/token UAA_LOGOUT_PATH=/logout.do # CF API -# Only needed if you will be connecting to a CF API instance -# See README for information about how to generate +# Used to connect to the Cloud Foundry API. CF_API_URL should always end +# with /v3 regardless of the environment. +# The CF_API_TOKEN can be populated with `cf oauth-token` or by running +# npm run dev-cf # -CF_API_URL=https://api.example/v3 -CF_API_TOKEN=token-without-bearer-at-beginning +CF_API_URL=https://api.dev.us-gov-west-1.aws-us-gov.cloud.gov/v3 +CF_API_TOKEN= # S3 # Only needed if you will be connecting to the s3 storage bound to diff --git a/docs/dev-practices/USWDS.md b/docs/dev-practices/USWDS.md index 2cd1e21f..ee790734 100644 --- a/docs/dev-practices/USWDS.md +++ b/docs/dev-practices/USWDS.md @@ -3,17 +3,22 @@ Our team keeps custom CSS/SASS to a minimum and takes a [utilities-first](https://designsystem.digital.gov/utilities/) approach. When adding styles, work through this order: -1. Can [USWDS utilities](https://designsystem.digital.gov/utilities/) be used? -1. If not, can [USWDS Design Tokens](https://designsystem.digital.gov/design-tokens/) be used? -1. If not, then add custom CSS/SASS +1. Can [USWDS inline utility classes](https://designsystem.digital.gov/utilities/) be used? + - Ex: `.border-left-2` +1. If not, check if [USWDS theme settings](https://designsystem.digital.gov/documentation/settings/) would be appropriate to change: + - Ex: `$theme-banner-background-color: 'blue-warm-80'` +1. If not, can you create a custom utility class and / or use [USWDS Design Tokens](https://designsystem.digital.gov/design-tokens/)? + - Ex: `background-color: color('mint-cool-60v')` + - Ex: `.minw-305 { min-width: calc(units(3) + units(.5)); }` +1. If not, add custom CSS/SASS -The global SASS entrypoint is [assets/stylesheets/styles.scss](./assets/stylesheets/styles.scss). USWDS theme settings are configured at the top of that file. +The global SASS entrypoint is [assets/stylesheets/styles.scss](../../src/assets/stylesheets/styles.scss). USWDS theme settings are configured at the top of that file. ## Compiling By default, NextJS has a way of compiling SASS, as well as Autoprefixer. This eliminates the need to use tools like uswds-compile or Gulp. -SASS compilation configs can be found in [next.config.js](./next.config.js) +SASS compilation configs can be found in [next.config.js](../../next.config.js) In order to control when we upgrade USWDS, the `@uswds/uswds` npm package has been installed using the `--save-exact` flag.