You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/developer-documentation/building-your-application/available-scripts/index.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,15 +17,15 @@ import DocCardList from '@theme/DocCardList';
17
17
18
18
**`npm start`**
19
19
20
-
This script starts the Vite development server. It runs the app locally with hot module reloading, allowing for fast development and instant updates as you make changes. Open [http://localhost:3000](http://localhost:3000/) to view it in the browser.
20
+
Starts the Vite development server. It runs the app locally with hot module reloading, allowing for fast development and instant updates as you make changes. Open [http://localhost:3000](http://localhost:3000/) to view it in the browser.
21
21
22
22
**`npm run build`**
23
23
24
-
Builds the project for production by using Vite’s build tool. It generates optimized static assets, such as HTML, CSS, and JavaScript, which are output to the dist directory.
24
+
This script builds the project for production by using Vite’s build tool. It generates optimized static assets, such as HTML, CSS, and JavaScript, which are output to the `dist` directory.
25
25
26
26
**`npm run prebuild`**
27
27
28
-
Before the build process starts, this script ensures that the dist folder (which contains the previous build) is deleted. This helps prevent old build files from being included in the new build.
28
+
Before the build process starts, this script deletes the `dist` folder (which contains the previous build). This helps prevent old build files from being included in the new build.
29
29
30
30
**`npm test`**
31
31
@@ -37,15 +37,15 @@ Runs end-to-end (e2e) tests located in `./src/__tests__/e2e/integration.e2e.test
37
37
38
38
**`npm run lint`**
39
39
40
-
Runs ESLint with the `--fix` option, which automatically fixes certain linting issues in the code found in the src/ directory.
40
+
Runs ESLint with the `--fix` option, which automatically fixes certain linting issues in the code found in the `src/` directory.
41
41
42
42
**`npm run format`**
43
43
44
44
Formats the code in the `src/` directory using Prettier according to the configuration specified in the `.prettierrc` file. This ensures consistent code formatting across the project.
45
45
46
46
**`npm run serve`**
47
47
48
-
This script starts a local server to preview the production build. It serves the files from the `dist/` folder, allowing you to check how the app will behave in a production environment.
48
+
Starts a local server to preview the production build. It serves the files from the `dist/` folder, allowing you to check how the app will behave in a production environment.
Copy file name to clipboardExpand all lines: docs/developer-documentation/building-your-application/available-scripts/running-example.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,12 +4,12 @@ sidebar_position: 2
4
4
5
5
# Running an Example
6
6
7
-
RADFish ships with several different [boilerplate examples](../../examples-and-templates#examples) that demonstrate core pieces of functionality identified as critical for NOAA application development. You can use these examples as a reference point to build out your own implementation, or simply to get inspiration for your own design patterns with some pre-defined best practices.
7
+
RADFish ships with several different [boilerplate examples](../../examples-and-templates#examples). These examples demonstrate core functions identified as critical for NOAA application development. You can use these examples as a reference point to build out your own implementation. Or, they may serve as inspiration for your own designs and best practices.
8
8
9
-
For instance, there is an example that demonstrates how to build a multi-step form that caches each step within IndexedDB, so that it can be referenced without having network connection. In order to run this example, you can run the following command:
9
+
For instance, there's an example that demonstrates how to build a multi-step form that caches each step within IndexedDB. Caching the form allows it to be referenced without a network connection. In order to run this example, you can run this command:
This will clone the code from the `multistep-form` onto your machine, and spawn a new web process on port `3000` or another port if that is already taken.
13
+
This will clone the code from the `multistep-form` onto your machine. It also spawns a new web process on port `3000` or another port if that is already taken.
14
14
15
-
Feel free to utilize this code and modify it for your needs!
15
+
Feel free to use this code and modify it for your needs!
Copy file name to clipboardExpand all lines: docs/developer-documentation/building-your-application/development-life-cycle.md
+16-15Lines changed: 16 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,34 +5,35 @@ description: Setting up web projects with RADFish
5
5
6
6
# Project Setup
7
7
8
-
When setting up a web application within the NOAA ecosystem, it’s imperative that you setup your project properly in order to make life easier as development progresses. A strong setup includes proper development standards ie: File structure, linting, core frameworks, build tooling, etc.
8
+
When creating a web application in the NOAA ecosystem, take time to carefully set up your project. This will make ongoing development easier and reduce maintenance overhead. A proper setup follows best practices around file structure, linting, core frameworks, and build tooling.
9
9
10
-
For NOAA applications, tooling that supports full-featured web forms is a must. There are also branding/style guidelines and compliance regulations that must be adhered too. All of this must be considered when setting up a new project.
10
+
All new NOAA web applications must:
11
11
12
-
Setting up a project properly will improve developer velocity over the course of the project. In addition to this, it will limit maintenance overhead, especially if the project is setup using a standard environment and set of tools that are familiar to other NOAA developers.
12
+
- support full-featured web forms.
13
+
- adhere to compliance regulations.
14
+
- follow branding and style guidelines.
15
+
- use standard environments and tools that are familiar to other NOAA developers.
13
16
14
-
To setup a new NOAA web app project, we recommend following the instructions outlined in our [Getting Started](../getting-started) documentation.
17
+
To setup a new NOAA web app project, we recommend following [Getting Started](../getting-started) documentation.
15
18
16
19
## React Components
17
20
18
-
The following components are included by default with the RADFish Framework. The components build upon the ‣ component library, which adheres to [USWDS standards](https://designsystem.digital.gov/). For detailed information on the available components and what attributes they accept, please see the official storybook documentation: [https://trussworks.github.io/react-uswds/](https://trussworks.github.io/react-uswds/)
21
+
Trussworks React components are included by default with the RADFish Framework. The components build upon the component library, which adheres to [USWDS standards](https://designsystem.digital.gov/). For detailed information on the available components and what attributes they accept, please see the official storybook documentation: [https://trussworks.github.io/react-uswds/](https://trussworks.github.io/react-uswds/)
19
22
20
-
**Why Use It**
23
+
### Why Use React?
21
24
22
-
-**Responsive Design**: Automatically adjusts for different screen sizes with a collapsible menu.
23
-
-**Customizable**: Allows for easy customization of navigation links.
24
-
-**Integrated Search**: Includes a search bar for added functionality.
25
-
-**Branding**: Supports branding elements like logos in the header.
25
+
-**Responsive Design.** Automatically adjusts for different screen sizes with a collapsible menu.
26
+
-**Customizable.** Allows for easy customization of navigation links.
27
+
-**Integrated Search.** Includes a search bar for added functionality.
28
+
-**Branding.** Supports branding elements like logos in the header.
26
29
27
30
**Additional Notes**
28
31
29
-
- The **`@trussworks/react-uswds`** package is a requirement for this component to ensure proper styling and functionality. This package is included by default.
32
+
- The **`@trussworks/react-uswds`** package is required to ensure proper styling and functionality. This package is included by default, so you do not need to import it.
30
33
- Custom CSS can be applied for further customization.
By integrating these components into your React application, you can create a professional and responsive UI with minimal effort. The **`Layout`** and **`HeaderNav`** components work together to provide a structured and navigable interface, enhancing the overall user experience.
37
+
By integrating the [header](https://trussworks.github.io/react-uswds/?path=/docs/components-header--basic-header) components into your React application, you can create a professional and responsive UI with minimal effort. The **`Layout`** and **`HeaderNav`** components work together to provide a structured and navigable interface, enhancing the overall user experience.
Copy file name to clipboardExpand all lines: docs/developer-documentation/building-your-application/development-standards.md
+18-20Lines changed: 18 additions & 20 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,25 +5,23 @@ description: USWDS, NOAA branding and Styling, and 508 compliance
5
5
6
6
# Development Standards
7
7
8
-
**USWDS**
8
+
## USWDS
9
9
10
-
USWDS (United States Web Design System) is a web design system that specifies coding patterns, components, and design tokens that outline how government applications should be built while adhering to 508 compliance guidelines.
10
+
The U.S. Web Design System (USWDS) is a set of design and development principles and guidelines. It helps deveolpers create standardized, accessible, consistent, and user-friendly websites and applications. It helps developers adhere to 508 compliance guidelines.
11
11
12
-
More specifically, when building applications with React, there is an existing component library, [react-uswds](https://github.com/trussworks/react-uswds)that our project extends for the purposes of building any RADFish application. These components maintain all functionality of `react-uswds` components, but are branded with NOAA themes and styles. These components live in `react-radfish` directory, and allow for development in a modern React environment with NOAA look and feel.
12
+
In most cases, RADFish uses standard components from the [`react-uswds`](https://github.com/trussworks/react-uswds)open source project. The RADFish project further extends the react-uswds library. These components maintain the functionality of react-uswds, but are branded with NOAA themes and styles. These components live in the [`react-radfish` directory](https://github.com/NMFS-RADFish/react-components). This allows modern React development with NOAA look and feel.
13
13
14
-
For reference on the full `react-uswds` library, you can reference the deployed storybook:
14
+
For information on the full `react-uswds` library, refer to their [storybook](https://trussworks.github.io/react-uswds/?path=/docs/welcome--docs).
The benefit of referencing and leveraging `react-radfish` when building applications is to increase developer velocity, design consistency, and ensures that front-end development is happening in compliance with government regulation. The storybook above provides examples of a wide variety of compliant components that can be used to build apps for a wide variety of use cases.
16
+
Building applications with `react-radfish` leads to faster development, consistent design, and ensures compliance with government regulations. The [`react-uswds` storybook](https://trussworks.github.io/react-uswds/?path=/docs/welcome--docs) provides examples of compliant components that can be used to build apps for various use cases.
19
17
20
18
<!--
21
19
<aside>
22
20
If you need another component for your application support, please see `CONTRIBUTING` section (In progress)
23
21
</aside>
24
22
-->
25
23
26
-
**Example**
24
+
### Example
27
25
28
26
If you wanted to build a `TextInput` component into an existing form, you can use the `@trussworks`[storybook reference](https://trussworks.github.io/react-uswds/?path=/docs/components-text-input--docs) related to component props that are available.
Branding refers to the process of creating a distinct identity for a product or application. It involves defining and maintaining a set of visual elements, such as logos, colors, and typography, that represent the brand.
50
+
Branding creates a distinct identity for a product or application. It defines and maintains a set of visual elements that represent the brand. Branding can include logos, colors, and typography standards.
53
51
54
-
You will notice, that the components above do not have any `className` assigned, and you may be wondering how to style that component. To do this, there are a couple of things to keep in mind.
52
+
You might have noticed that the components above do not have any `className` assigned. You may be wondering how to style that component. There are a few things to keep in mind when styling components:
55
53
56
-
1. Each component in `react-radfish` has it’s own scoped css file, that modifies the existing `@trussworks`css in order to inject NOAA styles. This file should not be touched. If you notice a bug or issue, please see `CONTRIBUTING`
57
-
2. You can modify the general theme of these components in the `styles/theme.css` file. You can change things like color variables, font-family, and line-height here, and they will be propagated throughout the application, as well as throughout `react-radfish`. RADFish utilizes css variables, and can be used like so:
54
+
- Each component in `react-radfish` has it’s own scoped CSS file. This file modifies the existing `@trussworks`CSS to inject NOAA styles. This file should not be touched. If you notice a bug or issue, please consider [contributing to the project](https://nmfs-radfish.github.io/radfish/about/contribute).
55
+
- You can modify the general theme of these components in the `styles/theme.css` file. You can change things like color variables, font-family, and line-height here. They will be propagated throughout the application, as well as throughout `react-radfish`. RADFish uses CSS variables, like this:
58
56
59
57
```css
60
58
// styles/theme.js
@@ -68,7 +66,7 @@ You will notice, that the components above do not have any `className` assigned,
68
66
}
69
67
```
70
68
71
-
1. If you need to add additional styles to a particular component, you can do so by adding another `className`**after** the component has been imported from `react-radfish`
69
+
- If you need to add additional styles to a particular component, you can add another `className`**after** the component has been imported from `react-radfish`:
@@ -78,15 +76,15 @@ import { Label } from "@nmfs-radfish/react-radfish";
78
76
</Label>;
79
77
```
80
78
81
-
By following this method, you can leverage the underlying `uswds` component, maintain the NOAA theme, and can extend if further to suit you needs as a developer.
79
+
By following this method, you can use the `uswds` component, while still maintaining the NOAA themes. You can also extend it further to suit your needs as a developer.
82
80
83
-
**_508 Compliance (Section 508 of the Rehabilitation Act)_**
81
+
## 508 Compliance (Section 508 of the Rehabilitation Act)
84
82
85
-
508 compliance, also known as Section 508 compliance, refers to the adherence to accessibility standards outlined in Section 508 of the Rehabilitation Act. In the context of web development, it signifies the design and development of websites and digital content in a manner that ensures accessibility for individuals with disabilities. In a nutshell, this ensures that website can be navigated and understood by users with various disabilities, such as those with visual or auditory impairments. Developers must follow these guidelines to ensure their websites are accessible and usable by everyone, promoting an inclusive and diverse online experience.
83
+
Section 508 compliance refers to the adherence to accessibility standards outlined in [Section 508 of the Rehabilitation Act](https://www.section508.gov/). For web developers, it means designing and developing content that's accessible to individuals with disabilities. In other words, 508 compliant websites can be navigated and understood by users with various disabilities. For example, there are guidelines that aid those with visual or auditory impairments. Developers must follow these guidelines to ensure their websites are accessible and usable by everyone. This promotes an inclusive and diverse online experience.
86
84
87
-
As NOAA is a governmental agency, Section 508 compliance is crucial for the development of frontend apps because it ensures that these applications are accessible to all users, including those with disabilities. NOAA provides vital information related to weather, oceans, and atmospheric conditions, and it is imperative that individuals with diverse abilities can access and utilize these resources.
85
+
Because NOAA is a governmental agency, Section 508 compliance is required for the development of frontend apps. NOAA provides vital information related to weather, oceans, and atmospheric conditions. Individuals with diverse abilities need to access and use these resources.
88
86
89
-
508 compliance has been a driving factor for many decisions we make in RADFish, from extending a compliant component library in `@trussworks/react-uswds` to our UX strategies.
87
+
Section 508 compliance is a driving factor for many decisions we make in RADFish about our UX strategies. We have also extended a compliant component library in `@trussworks/react-uswds`.
90
88
91
-
**Resources:**
89
+
### Resources
92
90
Read more about 508 compliance here: [https://www.section508.gov/](https://www.section508.gov/)
0 commit comments