fix(Collapse,Fade): Ensuring props don't leak to child and adding new production/limited dist builds.#598
Conversation
a8dd208 to
10f60ba
Compare
… production/limited dist builds.
| import React from 'react'; | ||
| import PropTypes from 'prop-types'; | ||
| import classNames from 'classnames'; | ||
| import Transition, { ENTERING, ENTERED, EXITING } from 'react-transition-group/Transition'; |
There was a problem hiding this comment.
Looks like you are removing these enums to better support when ReactTransitionGroup is not included, but can you put these in the utils and reference them from there?
There was a problem hiding this comment.
Yes, we can move these to utils. The main reason is that since we are cherry picking an export it prevents using the full ES6 capability for the module in production. (This gives reduced file size in the now reactstrap.full.min.js; however, at the expense of not being able to use these.
| const umdFullConfig = baseConfig(); | ||
| umdFullConfig.external = peerDependencies; | ||
| umdFullConfig.plugins.push(replace({ | ||
| 'process.env.NODE_ENV': JSON.stringify('production'), |
There was a problem hiding this comment.
formatting, 2 spaces (this whole file).
| @@ -0,0 +1,13 @@ | |||
| #!/usr/bin/env bash | |||
There was a problem hiding this comment.
Any way to support windows <10 which do not have bash? Maybe have a node.js script and have the script in the package.json be node <file>
There was a problem hiding this comment.
I tried to emulate the other scripts that were there. Let me investigate a little further. If we do node file does it autochoose the file/extension based on OS? Example of that somewhere?
There was a problem hiding this comment.
Those scripts don't work for me (on windows), I have to run those steps manually (which is easy since they are mostly git commands) and they only run on the "release". This is in the build, which is probably more common for others to do.
| const childProps = omit(otherProps, TransitionPropTypeKeys); | ||
|
|
||
| return ( | ||
| <Transition |
There was a problem hiding this comment.
I would like to have a basic fallback which instantly shows/hides (no animation), but we would probably want to tie in the callbacks to that to be more compatible.
There was a problem hiding this comment.
At some point in future we can do better fallback whereby we don't even use the Fade elements for non fading elements. A lot more work needs to be done for that.
Uh oh!
There was an error while loading. Please reload this page.