-
Notifications
You must be signed in to change notification settings - Fork 3.6k
[changed] collapsable => collapsible property #609
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
Conversation
); | ||
} | ||
return React.PropTypes.bool.call(null, props, propName, componentName); | ||
} |
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'd rather not see deprecation specific warnings here as it will cause this file to churn a lot. How about putting this in it's own file? Then when it's time to remove this old logic it's as simple as deleting some files with little footprint of code files that will be retained.
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.
No problem. I was asking about it here #425 (comment), but it seems I'm asking a lot of questions in a row and some of them are lost 😄
No problem. |
When deprecated `Collaps_a_bleNav` is imported it also tags `Collaps_i_bleNav` element as deprecated, because it is done by using pointers which points to the same object. ```js let CollapsableNav = CollapsibleNav; CollapsableNav.__deprecated__ = true; ``` https://github.com/react-bootstrap/react-bootstrap/blob/92c57ef7ee/src/CollapsableNav.js#L5 The right and simplest way to make deprecation in the case of component renaming `CollapsableNav => CollapsibleNav` by using general for both components part - `classSpecifications`. Like this: ```js // NewNameComponent.js const classSpecificationsFor_NewNameComponent = { /* existing code */ }; const NewNameComponent = React.createClass( classSpecificationsFor_NewNameComponent ); export {classSpecificationsFor_NewNameComponent}; // for old component export default NewNameComponent; // OldNameComponent.js import {classSpecificationsFor_NewNameComponent} from 'NewNameComponent'; const classSpecsFor_OldNameComponent = assign({}, classSpecificationsFor_NewNameComponent, { // here we add deprecation warning }); const OldNameComponent = React.createClass( classSpecsFor_OldNameComponent ); export default OldNameComponent; ```
Discussion is here react-bootstrap#425. Components are involved: - Nav - Panel - CollapsibleNav Current property type checking for `collapsable` in `PanelGroup` is needless and has been removed. Tests for deprecated `collapsable` property for all three components has been placed into one file `CollapsableNavSpec.js`
Done. Off-topic: |
In case this PR is merged, we should re-apply @tacomanator work #536 I've merged it all locally and checked. All is green now. |
Wait #536 was reverted? Why were these collapsable changes breaking that to cause a revert. |
Ok, I see what's going on now. I'll get this sorted out real quick. |
[changed] collapsable => collapsible property
Restored branch for #603.
I was cleaning up my branches and accidentally removed
AlexKVal:collapsiblePro
branchand #603 was automatically closed by GitHub :)
And I have not found a way to re-open it.
Closes #425