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
React 16 support #242
React 16 support #242
Conversation
Looks great! I'll test it out later. One thing though - do you think you can do the formatting changes separately for the sake of the Git history? |
Okay, I removed my readme changes for now. I also added support for React 16 beta. |
webpack.dev.js
Outdated
@@ -39,7 +39,13 @@ module.exports = { | |||
'commonjs2': 'react-dom/server', | |||
'amd': 'react-dom/server', | |||
'root': 'ReactDOMServer' | |||
} | |||
}, |
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.
This block seems misaligned relative to its neighbors - tabs v spaces issue?
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.
Yeah, it seems like that file is using tabs for some reason?
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.
Let's just stick with whatever is there for now, I'll run the linter over everything later. Same with the whitespace changes in the component.
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.
Library was indeed authored with tabs. I dropped that battle eventually, but this is indeed not the right time to diverge. It will be dealt with later in one shot.
package.json
Outdated
@@ -49,7 +49,7 @@ | |||
"react-dom-factories": "^1.0.0" | |||
}, | |||
"peerDependencies": { | |||
"react": "^0.14.9 || ^15.3.0 || ^16.0.0" | |||
"react": "^0.14.9 || ^15.3.0 || ^16.0.0-beta" |
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'm torn on this. I don't think it's a big deal if you get peer warnings for betas.
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.
Agree, even if it is technically true, it doesn't make sense for package consumers to mark compatibility with unreleased versions with unstable APIs.
package.json
Outdated
@@ -44,25 +44,27 @@ | |||
], | |||
"dependencies": { | |||
"lodash": "^4.17.4", | |||
"quill": "^1.2.6" | |||
"prop-types": "^15.5.10", | |||
"quill": "^1.3.0", |
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.
Is this a hard requirement? Technically I don't see any 1.3.0-specific APIs being used.
Let me know what you think now. I think I've made all of the changes requested. |
will this be merged soon, because we want to upgrade to react 16 |
Thanks @mikecousins! Will do some manual testing to confirm everything works and then merge if 🍏 |
@mikecousins I'm getting the |
I don't have make, so I can't run the build. Where do I get make from? Is it this? http://gnuwin32.sourceforge.net/packages/make.htm Edit: nevermind I installed this and am trying it out now (https://www.npmjs.com/package/make) |
|
|
Yeah, that will probably only work on a Unix-y system, like Bash on Windows/Cygwin/MacOS/Linux. Really you just need to translate these commands for the ./node_modules/.bin/webpack --config webpack.dev.js # Build
./node_modules/.bin/webpack --config webpack.prod.js # Build
cp node_modules/quill/dist/quill.core.css dist # Copy assets
cp node_modules/quill/dist/quill.snow.css dist # Copy assets
cp node_modules/quill/dist/quill.bubble.css dist # Copy assets
mkdir -p ./lib # Make lib folder
cp -Rfv ./src/* ./lib/ # Copy built files to lib folder |
|
I just went down a pretty deep rabbit hole trying to modify the makefile. I'm going to give up for now. |
Did you see the comment above about the webpack commands? I think on Windows you just need to translate the mkdir and cp commands - could just use File Explorer and copy-paste. Sorry for the difficulty - we should probably rewrite these actions as cross-platform node scripts. If you don't have more time I'll try again later on a different computer. |
I manually ran those commands now and I get a React not found popup followed by a ReactQuill not found popup. |
Yes, it works on current master. |
Well, I have no idea why. |
Here's why: https://github.com/mikecousins/react-quill/pull/2 😄 Since prop-types is an external in webpack we need to add it our demos and codepen examples. |
@mikecousins, I believe this might be an issue with symbolic link support on Windows: Have a look at your |
@zenoamaro see the PR I made into @mikecousins branch that adds a symlink for https://github.com/mikecousins/react-quill/pull/2 If you want to work on it further I pulled in the changes in this PR onto https://github.com/zenoamaro/react-quill/tree/react-16-compat |
Nice work guys. 👍 I'll take a look at the new branch. |
Closing in favor of #253 |
This should cover everything from #191. I think I've fixed all of the remaining things: moving it to dependencies, marking it external and fixing the react dom factories issue.