Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CARBON-926 - Updating React Version 15.6 > 16.2 (update Carbon to Version 3.0.0) #1659

Merged
merged 69 commits into from
Jan 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
69 commits
Select commit Hold shift + click to select a range
5e7eeef
CARBON-196 - Updating React Version 15.6 > 16.2
Jan 4, 2018
72be0b1
Update package-lock
Jan 4, 2018
258880d
Merge remote-tracking branch 'origin/master' into carbon_926
Jan 4, 2018
a43fe5b
Version bump
Jan 4, 2018
23008af
Updating react-highlight
Jan 4, 2018
a2ca31f
Merge remote-tracking branch 'origin/master' into carbon_926
Jan 4, 2018
e4bbe45
move shallow to mount
Jan 4, 2018
717789c
Merge remote-tracking branch 'origin/master' into carbon_926
Jan 5, 2018
cd4c8e1
remove error about onClick not being a function
andrewjtait Jan 5, 2018
c296f14
updated package-lock
andrewjtait Jan 5, 2018
c6a86fc
Updates to README
Jan 8, 2018
1289468
Merge branch 'carbon_926' of github.com:Sage/carbon into carbon_926
Jan 8, 2018
c661fb2
Allow minor version changed for jest
Jan 9, 2018
601b09e
Adding create-react-class to package.json
Jan 9, 2018
0c54acf
Updating changelog around create-react-class
Jan 9, 2018
3e1aa96
Update package.lock version from 3.0.0 to 3.0.0-rc1
Jan 10, 2018
3f43770
ReactPortal upgrade and tests
JohnStuartBarrie Jan 10, 2018
c222a7d
react-portal removed
JohnStuartBarrie Jan 11, 2018
04c3ce3
* Prop 'open' removed
JohnStuartBarrie Jan 11, 2018
a9cdb0e
Tests for Portal
JohnStuartBarrie Jan 11, 2018
4d864a2
Trailing space
JohnStuartBarrie Jan 11, 2018
3a839d9
downgraded jest back to 20.0.4
andrewjtait Jan 12, 2018
13c3c2a
Temporary removing of Browser
JohnStuartBarrie Jan 12, 2018
024a00e
Merge branch 'carbon_926' into CARBON-1025_react_portal_upgrade
JohnStuartBarrie Jan 12, 2018
8d575c9
Fixing Icon tests
JohnStuartBarrie Jan 12, 2018
9b81690
Form element is Browser replaced by form and used in Portal
JohnStuartBarrie Jan 12, 2018
e88cfad
Changes following andrewjtait review
JohnStuartBarrie Jan 12, 2018
0a36ac1
Following review
JohnStuartBarrie Jan 15, 2018
b08a5a8
Browser.getDocument() used
JohnStuartBarrie Jan 15, 2018
dbec7d1
Second portal added and removed
JohnStuartBarrie Jan 15, 2018
8966438
fix decimal precision issue - cap precision at 20
abramin Jan 15, 2018
5c57339
const to avoid repeat call of getWindow()
JohnStuartBarrie Jan 15, 2018
c5f0ef8
no need to test if defaultNode is defined
JohnStuartBarrie Jan 15, 2018
adb6290
No need to test validDate since Portal is not mounted.
JohnStuartBarrie Jan 15, 2018
a0036b3
Modification from review
JohnStuartBarrie Jan 15, 2018
982ae9c
document.create stubbed and test as undefined
JohnStuartBarrie Jan 16, 2018
08be688
Better portal tests
JohnStuartBarrie Jan 16, 2018
7e513a5
snapshots added
JohnStuartBarrie Jan 16, 2018
a9161db
Release notes
JohnStuartBarrie Jan 16, 2018
4471374
ReactWrapper removed
JohnStuartBarrie Jan 16, 2018
9df9fdc
ensure config grids constants are unique
andrewjtait Jan 16, 2018
006e21b
Merge pull request #1667 from Sage/CARBON-1025_react_portal_upgrade
andrewjtait Jan 16, 2018
56f60ac
Update changelog to include fix to precision, use logger rather than …
Jan 16, 2018
d445c9f
Merge pull request #1669 from Sage/fix-decimal-precision
andrewjtait Jan 16, 2018
057707b
fixes event propagation on portal'd element
andrewjtait Jan 16, 2018
b6b6977
removed unused semicolon
andrewjtait Jan 16, 2018
3a0a2ee
increase specificity on form buttons
andrewjtait Jan 16, 2018
688f038
Scroll bug fix proposition
JohnStuartBarrie Jan 17, 2018
f88ce3b
Merge branch 'carbon_926' into PF-3474_date_picker_scroll_bug
JohnStuartBarrie Jan 17, 2018
66912a3
Portal scroll listeners
JohnStuartBarrie Jan 17, 2018
daf06cf
findDOMNode call moved out of render function
JohnStuartBarrie Jan 17, 2018
12febed
scroll listener in Portal
JohnStuartBarrie Jan 17, 2018
0857e2e
No parent sent to Portal
JohnStuartBarrie Jan 17, 2018
a3a34f2
resize listener added
JohnStuartBarrie Jan 17, 2018
3366abc
* Passing but unfinished tests
JohnStuartBarrie Jan 18, 2018
4555287
Coverage passing
JohnStuartBarrie Jan 18, 2018
a2eba63
scroll handling
JohnStuartBarrie Jan 18, 2018
ffbc3b0
Lint issues
JohnStuartBarrie Jan 18, 2018
89df9ac
css transition removed from Dialog
JohnStuartBarrie Jan 18, 2018
b13d235
Dialog demo with scrolling Date
JohnStuartBarrie Jan 18, 2018
95c29a1
Release notes
JohnStuartBarrie Jan 18, 2018
b880c5d
Revised release notes
JohnStuartBarrie Jan 18, 2018
1ae0496
Resize listeners not answered
JohnStuartBarrie Jan 19, 2018
797ec33
Merge branch 'master' into carbon_926
Jan 19, 2018
be96d5c
Merge pull request #1670 from Sage/PF-3474_date_picker_scroll_bug
andrewjtait Jan 19, 2018
6944b29
getScrollParent in Portal made more readable
JohnStuartBarrie Jan 19, 2018
5d6e035
eslint issue fixes
JohnStuartBarrie Jan 19, 2018
01218d0
Merge pull request #1676 from Sage/PF-3474_date_picker_scroll_bug
andrewjtait Jan 19, 2018
a839a8d
Merge branch 'master' into carbon_926
andrewjtait Jan 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 95 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,98 @@
# 3.0.0

## Package Updates

* React has been updated to v16.2.0
* React-DOM has been updated to v16.2.0 for React upgrade
* Enzyme has been updated to v3.3.0 for React upgrade
* Raf has been added at v3.4.0 for React upgrade
* ReactTestRenderer has been updated to v16.2.0 for React upgrade
* React-Highcharts has been updated to v15.0.0 for React upgrade
* React-Transition-Group has been updated to v1.2.1 for React upgrade
* ReactHighlight has been updated to a forked version which works with React v16
* React-Addons-Perf has been removed due to deprecation
* React-Addons-Test-Utils has been removed due to deprecation

## Breaking Changes

### Unstable HandleError

React 15 had limited, undocumented support for error boundaries using `unstable_handleError`. This method has been renamed to `componentDidCatch`.

### Decimal Precision Capped at 20

Previously this would return an error if the given precision was higher than 20 but would not actually enforce the limit. Now, if a value of greater than 20 is set the precision will be set to exactly 20.

### ReactDOM methods

`ReactDOM.render` and `ReactDOM.unstable_renderSubtreeIntoContainer`now return null if called from inside a lifecycle method. To work around this, you can use portals or refs.

### setState

Calling `setState` with null no longer triggers an update. This allows you to decide in an updater function if you want to re-render.

Calling `setState` directly in render always causes an update. This was not previously the case. Regardless, you should not be calling `setState` from render.

`setState` callbacks (second argument) now fire immediately after `componentDidMount` / `componentDidUpdate` instead of after all components have rendered.

### Enzyme

Part of updating react from 15.6.0 to 16.2.0 included also updating enzyme to 3.3.0. https://github.com/airbnb/enzyme/blob/enzyme%403.3.0/docs/guides/migration-from-2-to-3.md

#### Upgrading a project that uses Carbon

##### Installing peer dependencies

If you're upgrading an application that uses Carbon to 3.0.0 you'll need to make sure you have `raf` in your project's dependencies. To add `raf` to your project dependencies run the following command:

```
npm install raf --save-dev
```

You'll also need to add the following line to your jest.conf.json:
```
"setupFiles": [
"raf/polyfill"
]
```

##### Upgrading Carbon and using the new Carbon dependencies

To Install the latest Carbon:

```
npm install --save carbon-react@3.0.0
```

### React-Addons

React has discontinued support for all react-addons, the latest version of each addon should continue to work (except react-addons-perf).
`React.createClass` is deprecated and `create-react-class` should be used instead
`React.PropTypes` is now available as `prop-types`
`React.DOM` is now available as `react-dom-factories`
`react-addons-test-utils` is now available as `react-dom/test-utils`

### React and React Dom

Both `react` and `react-dom` will need to be updated to version 16.2.0

```
npm install react@^16.2.0 react-dom@^16.2.0 --save
```

## React Portal

We have updated the `Portal` component to use React's own version of portal which is available with React 16, removing the `react-portal` dependency.
`Portal` now has an additional prop `onReposition` which is an optional callback function, called when the window resizes or a parent DOM element is scrolled.

## Bug Fixes

* The DatePicker element will now reposition itself when the DateInput is scrolled.

### Hydrate Deprecation

Hydrating a server-rendered container now has an explicit API. If you’re reviving server-rendered HTML, use `ReactDOM.hydrate` instead of `ReactDOM.render`. Keep using `ReactDOM.render` if you’re just doing client-side rendering.

# 2.6.4

* Upgrade marked package from v0.3.6 to 0.3.9 to address security vulnerabilities
Expand Down
1 change: 1 addition & 0 deletions jest.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"preset": "./node_modules/carbon-factory/jest.conf.json",
"notify": false,
"setupFiles": [
"raf/polyfill",
"./src/__spec_helper__/index.js"
]
}
Loading