Skip to content

Commit ba9726e

Browse files
committed
Updated guide + circle ci
1 parent 631da79 commit ba9726e

File tree

2 files changed

+29
-20
lines changed

2 files changed

+29
-20
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
defaults: &defaults
22
working_directory: ~/sp-dev-fx-controls-react
33
docker:
4-
- image: circleci/node:8.9.1
4+
- image: circleci/node:10.22.0
55

66
version: 2
77
jobs:
Lines changed: 28 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
11
# Migrating from v1 to v2
2+
23
Most of the controls have no breaking changes when moving from v1 to v2. However, some APIs were changed to make the library more stable and controls behavior more even.
3-
Also, we've bumped up React and Fluent UI versions used in the library. It means you will need to update `package.json` file in your SPFx projects.
4-
The below guide is an overview of what it takes to migrate from v1 to v2. If we missed something, please let us know in the issues list so we can update the guide. Thanks!
54

6-
## v2 Supports SharePoint Online Only
7-
v2 of Reusable Controls is based on SharePoint Framework 1.11 and, as a result, does not support SharePoint On-Premise. **Please, use v1 if you plan to deploy your solution on-prem.**
5+
Also, we've bumped up React and Fluent UI versions used in the library. It means you will need to update the `package.json` file in your SPFx projects.
6+
7+
The below guide is an overview of what it takes to migrate from v1 to v2. If we missed something, please let us know on the issues list so we can update the guide. Thanks!
8+
9+
## v2 Supports SharePoint Online **only**
10+
11+
V2 of Reusable Controls is based on SharePoint Framework 1.11. Due to this change, it does not support SharePoint on-premises. **Please, use v1 if you plan to deploy your solution on-premises.**
812

913
## React and Fluent UI versions
10-
v2 of Reusable Controls uses React.js v16.8.5 and Fluent UI (Office UI Fabric React) v6.214.0.
14+
15+
V2 of Reusable Controls uses React.js v16.8.5 and Fluent UI (Office UI Fabric React) v6.214.0.
16+
1117
Although it is not necessary to use the same modules' versions in your project, we highly recommend to update your solution accordingly:
18+
1219
```json
1320
"dependencies": {
1421
// other dependencies
@@ -21,25 +28,29 @@ Although it is not necessary to use the same modules' versions in your project,
2128
"@types/react-dom": "16.8.3",
2229
},
2330
```
24-
The easiest way to upgrade SharePoint Framework solution is to use [Office365 CLI](https://pnp.github.io/office365-cli/cmd/spfx/project/project-upgrade/#spfx-project-upgrade) `spfx project upgrade` command.
31+
32+
The easiest way to upgrade the SharePoint Framework solution is to use [Office365 CLI](https://pnp.github.io/office365-cli/cmd/spfx/project/project-upgrade/#spfx-project-upgrade) `spfx project upgrade` command.
2533

2634
## APIs Changes
35+
2736
### PeoplePicker
28-
`isRequred` is renamed to `required`.<br/>
29-
The property has been renamed to use the common approach for mandatory field naming.
3037

31-
`errorMessage` represents a static error message to be displayed in the control. <br />
32-
In v1 `errorMessage` is used to provide the text that will be displayed if the field is set as `required` and no value is selected.
33-
In v2 you can use this property to display an error message for whatever reason statically.
38+
- `isRequired` is renamed to `required`
39+
- The property has been renamed to use the common approach for mandatory field naming.
40+
- `errorMessage` represents a static error message to be displayed in the control.
41+
- In v1 `errorMessage` is used to provide the text that will be displayed if the field is set as `required` and no value is selected.
42+
- In v2 you can use this property to display an error message for whatever reason statically.
43+
3444
```typescript
3545
/**
3646
* Static error message displayed below the text field. Use onGetErrorMessage to dynamically change the error message displayed (if any) based on the current value. errorMessage and onGetErrorMessage are mutually exclusive (errorMessage takes precedence).
3747
*/
3848
errorMessage?: string;
3949
```
4050

41-
`onGetErrorMessage` to get error message dynamically.<br />
42-
The method is used to get the validation error message and determine whether the input value is valid or not. Mutually exclusive with the static string errorMessage (it will take precedence over this).
51+
- `onGetErrorMessage` to get error messages dynamically.
52+
- The method is used to get the validation error message and determine whether the input value is valid. Mutually exclusive with the static string errorMessage (it will take precedence over this).
53+
4354
```typescript
4455
/**
4556
* The method is used to get the validation error message and determine whether the picker value is valid.
@@ -58,9 +69,7 @@ The method is used to get the validation error message and determine whether the
5869
onGetErrorMessage?: (items: IPersonaProps[]) => string | Promise<string>;
5970
```
6071

61-
`showRequiredError` has been deleted.<br />
62-
Use `errorMessage` or `onGetErrorMessage` to provide the error message.
63-
64-
`selectedItems` is renamed to `onChange`<br />
65-
`onChange` better describes the purpose of the property.
66-
72+
- `showRequiredError` has been deleted.
73+
- Use `errorMessage` or `onGetErrorMessage` to provide the error message.
74+
- `selectedItems` is renamed to `onChange`
75+
- `onChange` better describes the purpose of the property.

0 commit comments

Comments
 (0)