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

fix(structured-list): remove unused prop #5592

Merged

Conversation

tw15egan
Copy link
Member

Closes #5590

Removes all references to the border prop. There were no associated styles with it, and it had no effect on the component. We can put it behind a deprecation flag, but I'm not sure that is necessary since this just seems like an old prop that was part of the original implementation that was never removed when we made the large changes to v10

Changelog

Removed

  • All references to border in the StructuredList component

Testing / Reviewing

Ensure the component renders properly

@tw15egan tw15egan requested a review from a team as a code owner March 10, 2020 21:37
@ghost ghost requested review from asudoh and joshblack March 10, 2020 21:37
/**
* Specify whether a border should be added to your StructuredListWrapper
*/
border: PropTypes.bool,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we might need to wrap this in a deprecate block as lame as that is otherwise if someone is passing in border it might get spread onto <section> with other accidentally 😞 This could cause React to complain about the extra attribute showing up.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😞

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to keep the rest of the border code as well? Or is keeping the prop definition wrapped in a deprecate enough?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tw15egan I doubt we need to keep the class name code. As long as we have:

    const { children, selection, className, ariaLabel, border: _border, ...other } = this.props;

I think it'd be fine so it doesn't get caught up in other. The rest of the code can totally be dropped I think (alongside the deprecate bit for the prop type)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright I've updated it, let me know if the changes look good 👍

@netlify
Copy link

netlify bot commented Mar 10, 2020

Deploy preview for carbon-components-react ready!

Built with commit 0974603

https://deploy-preview-5592--carbon-components-react.netlify.com

@netlify
Copy link

netlify bot commented Mar 10, 2020

Deploy preview for carbon-elements ready!

Built with commit d76eacf

https://deploy-preview-5592--carbon-elements.netlify.com

@netlify
Copy link

netlify bot commented Mar 10, 2020

Deploy preview for carbon-elements ready!

Built with commit 0974603

https://deploy-preview-5592--carbon-elements.netlify.com

@tw15egan tw15egan force-pushed the structured-list-prop-removal branch from 202a685 to 8817e43 Compare March 11, 2020 22:21
Copy link
Contributor

@asudoh asudoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 - Thanks @tw15egan!

@tw15egan tw15egan merged commit 9e7b37e into carbon-design-system:master Mar 13, 2020
aledavila pushed a commit that referenced this pull request Mar 18, 2020
* fix(structured-list): remove unused prop

* fix(structured-list): wrap prop in deprecate block

* fix(structured-list): remove border from other

Co-authored-by: Josh Black <[email protected]>
This was referenced Mar 18, 2020
renmaddox pushed a commit to renmaddox/carbon that referenced this pull request Mar 20, 2020
* fix(structured-list): remove unused prop

* fix(structured-list): wrap prop in deprecate block

* fix(structured-list): remove border from other

Co-authored-by: Josh Black <[email protected]>
renmaddox added a commit to renmaddox/carbon that referenced this pull request Mar 20, 2020
renmaddox added a commit to renmaddox/carbon that referenced this pull request Mar 20, 2020
renmaddox pushed a commit to renmaddox/carbon that referenced this pull request Mar 20, 2020
* fix(structured-list): remove unused prop

* fix(structured-list): wrap prop in deprecate block

* fix(structured-list): remove border from other

Co-authored-by: Josh Black <[email protected]>
@tw15egan tw15egan deleted the structured-list-prop-removal branch April 28, 2021 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[StructuredListWrapper] - border prop does nothing
3 participants