Skip to content

Commit

Permalink
docs: added docs for breaking changes and using withDeprecationWarning (
Browse files Browse the repository at this point in the history
werdnanoslen authored Mar 15, 2024
1 parent 0d67159 commit 305e116
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/codespace_pr_reviews.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Using Codesapces to review PRs without pulling a repo to your machine
# Using Codespaces to review PRs without pulling a repo to your machine

1. go to the PR
2. click the `Code` button in the top right corner
2 changes: 2 additions & 0 deletions docs/contributing.md
Original file line number Diff line number Diff line change
@@ -70,6 +70,8 @@ For example: `hw-accordion-component-112`
- Maintain a high standard of unit test coverage and cross-browser/device support, so that projects including this dependency can focus on integration and implementation.
- Provide thorough documentation (in Storybook) so that users can view the components as they render in the UI, the source code required to use them, and specifications such as how props are used, a11y support, and test coverage.
- Consistent and transparent versioning so that multiple projects can rely on this package, and it can be maintained as React and USWDS release new versions while also providing backwards compatibility.
- If you are introducing a breaking change, consider taking a staged approach if it gives consumers a chance to change their code to avoid the break. That is, create a non-breaking change using [`withDeprecationWarning`](../src/components/hoc/withDeprecationWarning.tsx) to be merged first, and create a follow-up PR or issue with a due date to finally implement the breaking change.
- For example, if you are [deprecating](https://github.com/trussworks/react-uswds/pull/825) or [renaming](https://github.com/trussworks/react-uswds/pull/2415) a component, you may wrap it (or the new component, if renaming) with `withDeprecationWarning`. Your message will show up as a console warning in consumers' development environments, so describe what they should do and by when, and link to the PR/issue for the eventual breaking change.

More guidance for preferred React practices can be found in the [adding new components](./adding_new_components.md) documentation.

3 changes: 2 additions & 1 deletion docs/for_maintainers.md
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ This will be Truss billable work for Truss staff, assuming your project teams us

### Support users of the library

- Watch and moderate discussions on Github in alignment with [Truss values](https://truss.works/values)
- Watch and moderate [discussions](https://github.com/trussworks/react-uswds/discussions) on Github in alignment with [Truss values](https://truss.works/values)
- Respond to initial issues and questions on the repo, ideally within ~ one week
- Encourage outside contributors to put up PRs
- Ensure storybook is deployed and up to date
@@ -32,6 +32,7 @@ This will be Truss billable work for Truss staff, assuming your project teams us
- Advocate for closing long standing pull requests.
- Triage incoming issues, ensure they have the right labels, and announce issues that are time sensitive to #react-uswds Truss slack channel
- Watch [@uswds/uswds](https://github.com/uswds/uswds) for updates, create new issues in @trussworks/react-uswds as needed
- Mitigate the impact of breaking changes by seeking community and Trussel input, combining multiple breaking changes into the same release, and preceding its release with a non-breaking change using [withDeprecationWarning](../src/components/hoc/withDeprecationWarning.tsx). In the latter case, ensure a new issue is created with a due date to finally remove the deprecated component.

### Manage our Github tools

0 comments on commit 305e116

Please sign in to comment.