- Fork & Clone this repo
nvm install
nvm use
yarn install
yarn build
-
Run the documentation via
yarn docs dev
-
Visit http://localhost:5000/
-
Create/Update content based on the URL.
For example, the content for http://localhost:5000/components/authenticator is located at
docs/src/pages/components/authenticator/index.mdx
Internally, this content is served by a single, Next.js optional catch all route:
docs/src/pages/[[...slugs]].tsx
.
yarn ui build
to rebuild for production.yarn ui dev
to watch & rebuild for development.
yarn react build
to rebuild for production.yarn react dev
to watch & rebuild for development.yarn next-example dev
to run React examples on Next.js.
yarn vue build
to rebuild for productionyarn vue dev
to watch & rebuild for development.yarn vue-example dev
to run Vue examples on Vite.
yarn angular build
to rebuild for productionyarn angular dev
to watch & rebuild for developmentyarn angular-example dev
to run Angular examples.
Whenever yarn angular build
is run, such as part of postinstall script, you want to run yarn angular dev
again. This is to ensure that both yarn angular
and yarn angular-example
have ivy enabled for local development.
-
Create or Update an example at
examples/{next,vue,angular}/...
For your
aws-exports.js
, you can reference an existing or create a new environment.// examples/next/pages/components/authenticator/sign-up-with-username.tsx import { Authenticator } from '@aws-amplify/ui-react'; import { Amplify } from 'aws-amplify'; import awsExports from '../../../../../environments/auth-with-username-no-attributes/src/aws-exports'; Amplify.configure(awsExports); export default function AuthenticatorWithUsername() { return <Authenticator />; }
-
Run your example:
yarn {next,vue,angular}-example dev
-
Visit your example (e.g. http://localhost:3000/ui/components/authenticator/sign-up-with-username)
-
Make changes to
@aws-amplify/ui-{react,vue,angular}
& save.Examples should automatically hot-reload your changes in the example.
-
Create or Update a
${feature}.feature
file (using Gherkin) describing the behavior inpackages/e2e/features/${slug}
.Feature: My new feature Documentation-friendly description of this feature, why it exists, & how to use it. @angular @react @vue Scenario: Example scenario using this feature Given some "STARTING_POINT" When I DO "SOMETHING" And I DO SOMETHING "ELSE" Then I see "THE DESIRED BEHAVIOR" @react @skip Scenario: Some React-specific scenario that can't be rain in CI @angular @todo-react @todo-vue Scenario: Some scenario supported in Angular, but React & Vue haven't added yet
-
Create or Update the accompanying
${slug}.feature
tests (e.g.packages/e2e/cypress/integration/${slug}/${feature}/${feature}.steps.ts
-
Start one of the examples.
-
Run
yarn e2e dev
to load CypressTAGS='@react and not (@skip or @todo-react)' yarn e2e dev
-
Click on your updated
${feature}.feature
file to validate your changes -
Add tags above your
Scenario
to indicate how this feature should be tested:-
If the library supports it, then add one of the following:
@angular
for@aws-amplify/ui-angular
@react
for@aws-amplify/ui-react
@vue
for@aws-amplify/ui-vue
This will ensure automated documentation marks these as supported features.
-
If the library supports it, but tests cannot be ran in CI for technical reasons, then also add:
@skip
for all libraries@skip-angular
for specifically@aws-amplify/ui-angular
@skip-react
for specifically@aws-amplify/ui-react
@skip-vue
for specifically@aws-amplify/ui-vue
This will ensure automated documentation marks these as supported features, but won't block builds (in PRs or
main
) with test failures. -
If the library should support it, then also add:
@todo-angular
for@aws-amplify/ui-angular
@todo-react
for@aws-amplify/ui-react
@todo-vue
for@aws-amplify/ui-vue
This will ensure automated documentation marks these as upcoming features, will skip these on PRs, but will error on
main
until completed.
-
If material design icon svg files are updated upstream, follow these steps to update our icons components for all frameworks:
- Copy material-design-icons repo svg icons to
material-design-icons
folder (TODO: create script for this step) - Update components for all frameworks by runing the following command at root:
yarn build:icons
- Review and commit changes to icons
- Submit PR for review
Bug reports and feature requests are always welcome. Good bug reports are extremely helpful, so thanks in advance!
When filing a bug, please try to be as detailed as possible. In addition to the bug report form information, details like these are incredibly useful:
- A reproducible test case or series of steps
- The date/commit/version(s) of the code you're running
- Any modifications you've made relevant to the bug
- Anything unusual about your environment or deployment
Guidelines for bug reports:
- Check to see if a duplicate or closed issue already exists!
- Provide a short and descriptive issue title
- Remove any sensitive data from your examples or snippets
- Format any code snippets using Markdown syntax
Finally, thank you for taking the time to read this, and taking the time to write a good bug report.