-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
chore(package): update to react 16 #2131
Conversation
React 16 also shows warnings when refs are passed to Stateless Functional Components, which causes problems for a lot of core SUI components. Not sure if the fixes for those things should come in a different pull request, or if this one should be treated as a place to host all fixes to get rid of those warnings as well, but it would be nice to see them go away. |
Are there also plans to implement this for |
Yes, but the priority task is update deps and find broken things when we able run |
Also, we cannot abandon Portal while there are still users using React <16. Not sure what the migration path will look like there right now. |
@layershifter the chai-enzyme package has been updated to react 16.0.0 I am going to try and see if I can get securingsincity/react-ace#268 and securingsincity/react-ace#268 merged. I've never contributed or worked on this code base, but I'm curious how difficult it would be for me to produce a react-16 compatible build of semantic-ui-react to test with? Since react-ace is a dependency of the documentation site, I feel like it might be ok to start |
…React into chore/react-16
I've pushed some changes yesterday and will continue this work today.
|
wrapper.childAt(0).key().should.equal('.$first') | ||
|
||
// TODO: Re-enable in future | ||
// wrapper.childAt(0).key().should.equal('.$first') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A very strange thing, key()
is null
there. looks like bug in enzyme
.
.at(1) | ||
.simulate('click') | ||
|
||
const icons = wrapper.find('RatingIcon') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.should.not.be.checked() | ||
|
||
wrapper.simulate('click') | ||
wrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Chaining is broken 😭
.should.have.prop('active', true) | ||
// arrow up, selection moved to last item | ||
domEvent.keyDown(document, { key: 'ArrowUp' }) | ||
wrapper.should.have.state('selectedIndex', (categoryLength * categoryResultsLength) - 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't happy about this change, but it's impossible to test it now because children are not updated correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted them,
Waiting for: It's impossible to correctly update all Update, For mount, updates are sometimes required when they weren't before |
@@ -131,13 +131,13 @@ describe('Sticky', () => { | |||
mockPositions({ bottomOffset: 10, height: 50 }) | |||
wrapperMount(<Sticky {...positions} context={contextEl} onStick={onStick} onUnstick={onUnStick} />) | |||
|
|||
wrapper.childAt(1).should.have.style('position', 'fixed') | |||
wrapper.childAt(0).childAt(1).should.have.style('position', 'fixed') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codecov Report
@@ Coverage Diff @@
## master #2131 +/- ##
==========================================
- Coverage 99.76% 99.73% -0.04%
==========================================
Files 151 151
Lines 2606 2606
==========================================
- Hits 2600 2599 -1
- Misses 6 7 +1
Continue to review full report at Codecov.
|
StatusI'm fixed all tests, the test suite is running without changes in the source code ✌️
|
Great work @layershifter; thanks for getting this done. |
I've updated |
Wow, great work @layershifter 🙇 |
@layershifter Thanks for the speedy work on this ! |
any idea when this will be released? |
@deltaskelta New releases typically happen over the weekend. @levithomason is a machine. |
Released in |
Technically, where I am, I missed the weekend by 38 minutes 😄. Also, @layershifter is awesome. |
I'm using 0.75.1 and am still getting "Warning: Stateless function components cannot be given refs. Attempts to access this ref will fail." from all instances of Portal components. Is this expected? |
Yes, this will be fixed soon. |
I believe my above concern has been resolved in 0.76.0, is that reasonable? |
I believe too. Great work guys! I updated yesterday and it was a 100% smooth ride. |
Yes, |
Missing deps support from:
chai-enzyme
- Enzyme 3 enzymejs/chai-enzyme#198react-ace
chore(package): update to react 16 securingsincity/react-ace#284