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(UIShell): omit passing isSideNavExpanded prop to Link component #4349

Merged
merged 9 commits into from
Oct 22, 2019

Conversation

metonym
Copy link
Collaborator

@metonym metonym commented Oct 16, 2019

Closes #4348

Omit passing isSideNavExpanded prop by destructuring it in props.

Changelog

Changed

  • destructure isSideNavExpanded prop

Testing / Reviewing

In the React workspace, run yarn start to start the storybook locally. Navigate to the UI Shell header base w/ sidenav story. Open the console; the React warning should not be emitted.

@metonym metonym requested a review from a team as a code owner October 16, 2019 14:09
@ghost ghost requested review from aledavila and asudoh October 16, 2019 14:09
@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for the-carbon-components ready!

Built with commit 5dbc09f

https://deploy-preview-4349--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-elements ready!

Built with commit 5dbc09f

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

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-components-react failed.

Built with commit 5dbc09f

https://app.netlify.com/sites/carbon-components-react/deploys/5da7249f2d583a00076d5715

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for the-carbon-components ready!

Built with commit d518978

https://deploy-preview-4349--the-carbon-components.netlify.com

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-elements ready!

Built with commit d518978

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

@netlify
Copy link

netlify bot commented Oct 16, 2019

Deploy preview for carbon-components-react ready!

Built with commit d518978

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

Copy link
Contributor

@joshblack joshblack left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! Just curious, does this syntax end up disabling the eslint violation? Would be great if we could scope it to the line instead of the file 👍

Co-Authored-By: Josh Black <josh@josh.black>
@metonym metonym changed the title fix(react): omit passing isSideNavExpanded prop in Link component fix(UIShell): omit passing isSideNavExpanded prop to Link component Oct 16, 2019
@metonym metonym requested a review from joshblack October 16, 2019 18:05
Co-Authored-By: Akira Sudoh <asudoh@gmail.com>
const SideNavLink = ({
className: customClassName,
children,
renderIcon: IconElement,
isActive,
large,
// eslint-disable-next-line no-unused-vars
Copy link
Contributor

Choose a reason for hiding this comment

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

Thank you for the update; BTW I thought https://twitter.com/dan_abramov/status/838576620235550720 is applied to our ESLint config. Did you see it's not the case...?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Before I pushed the first commit, I didn't disable any eslint rules. I ran "yarn ci-check" on my local machine and then faced the error "no-unused-vars."

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, fair enough - Thank you for clarifying!

const SideNavLink = ({
className: customClassName,
children,
renderIcon: IconElement,
isActive,
large,
// eslint-disable-next-line no-unused-vars
Copy link
Contributor

Choose a reason for hiding this comment

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

OK, fair enough - Thank you for clarifying!

@asudoh
Copy link
Contributor

asudoh commented Oct 22, 2019

@metonym Would you be able to re-run Prettier? Thanks!

@Debirpriya
Copy link

The UiShell SideNav behavior is fixed in 10.7.1 .
10.3.1 version the rail menu does not behave properly

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.

[React]: isSidenavExpanded prop passed to Link component throws React warning
4 participants