Skip to content

Commit c6ab8b4

Browse files
authored
Merge pull request #110 from kevinkuszyk/v2-upgrade-docs
V2 upgrade docs
2 parents bab95d5 + 98cdf3d commit c6ab8b4

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,12 @@
22

33
- [NHS.UK React Components](#nhsuk-react-components)
44
- [Coming from 0.x?](#coming-from-0x)
5+
- [Upgrading to 2.0](#upgrading-to-20)
56
- [Installation](#installation)
67
- [Usage](#usage)
78
- [Storybook](#storybook)
89
- [Maintainers](#maintainers)
9-
- [Preparing Releases](#preparing-releases)
10+
- [Preparing Releases](#preparing-releases)
1011

1112
NHS.UK Frontend ported to React
1213

@@ -16,6 +17,10 @@ NHS.UK Frontend ported to React
1617

1718
If you're coming from versions of the library prior to 1.0.0, please give [this doc](/docs/upgrade-to-1.0.md) a brief read, as there a number of changes between 0.x release and the 1.0 release.
1819

20+
## Upgrading to 2.0
21+
22+
If you're upgrading to 2.0, please be aware we have made some breaking changes. [This doc](/docs/upgrade-to-2.0.md) has the details.
23+
1924
## Installation
2025

2126
You can install this package using either `yarn` or `npm`.
@@ -55,8 +60,9 @@ A storybook containing all of the components and their usage can be found [here]
5560
- Thomas Judd-Cooper ([GitHub](https://github.com/tomdango))
5661
- Sam Brown ([GitHub](https://github.com/samueldavidbrown))
5762
- Luke Pearson ([GitHub](https://github.com/lukepearson))
63+
- Kevin Kuszyk ([GitHub](https://github.com/kevinkuszyk))
5864

59-
### Preparing Releases
65+
## Preparing Releases
6066

6167
Releases run in CI using github actions.
6268

CHANGELOG.md renamed to docs/upgrade-to-2.0.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
# Unreleased Changes
1+
# Upgrading to 2.0
2+
3+
There are some breaking changes you'll need to be aware of when upgrading to v2. These are mostly related to us upgrading our dependency on [nhsuk-frontend to v4](https://github.com/nhsuk/nhsuk-frontend/blob/master/CHANGELOG.md#400---26-october-2020) which also includes some breaking changes.
4+
25
## New Card Component
36

47
The new Card component from `nhsuk-frontend` 4 has been added. Check out the storybook for usage examples!
58

6-
## WarningCallout
9+
## Warning Callout
710

8-
### Removal of WarningCallout "label" prop
11+
### Removal of Warning Callout `label` prop
912

1013
The WarningCallout `label` prop has been removed, and replaced with `WarningCallout.Label`.
1114

@@ -30,7 +33,7 @@ Existing usages of the WarningCallout will need to be replaced with the new synt
3033
</WarningCallout>
3134
```
3235

33-
### Addition of hidden text on the WarningCallout.Label
36+
### Addition of hidden text on the Warning Callout Label
3437

3538
The `WarningCallout.Label` now has the hidden text `Important: ` before the label content. If this causes an issue in your application, and you would like to change or disable this hidden text you are able to do via the `visuallyHiddenText` prop.
3639

@@ -64,3 +67,17 @@ import { Panel, Promo } from "nhsuk-react-components/deprecated";
6467
```
6568

6669
A warning is printed to the console in dev environments when using these components, as they are set to be removed in the next major release.
70+
71+
## Date component input type has changed
72+
73+
In line with the upstream nhsuk-frontend, NHS Design Kit and GDS recommendations, we now render the input boxes in the date component as follows:
74+
75+
```html
76+
<input type="text" inputType="numeric" pattern="[0-9]*">
77+
```
78+
79+
There is more on this change here:
80+
81+
- [NHSDigital/nhsuk-react-components#108](https://github.com/NHSDigital/nhsuk-react-components/pull/108)
82+
- [nhsuk/nhsuk-frontend#666](https://github.com/nhsuk/nhsuk-frontend/pull/666)
83+
- https://technology.blog.gov.uk/2020/02/24/why-the-gov-uk-design-system-team-changed-the-input-type-for-numbers/

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "nhsuk-react-components",
3-
"version": "2.0.0-beta.1",
3+
"version": "2.0.0",
44
"author": {
55
"email": "[email protected]",
66
"name": "Thomas Judd-Cooper",

0 commit comments

Comments
 (0)