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

Remove navigation warnings #4192

Merged
merged 5 commits into from Oct 2, 2017
Merged

Remove navigation warnings #4192

merged 5 commits into from Oct 2, 2017

Conversation

@edmundoa
Copy link
Member

@edmundoa edmundoa commented Sep 29, 2017

Since the update to React 15, our navigation was triggering a few react-unknown-prop warnings, polluting the web console during development with some stacktraces.

This PR tackles the underlying problems, making the development experience slightly less annoying. There are still some warnings, mostly from react-router, but those will be fixed with a future update.

This PR should be applied both to master and 2.4.

edmundoa added 5 commits Sep 29, 2017
Filter out `active` prop on logo link.
This is not needed and triggers a warning, as it is passed down to the
div doing the collapse.
Replace hack to remove active MenuItem state with a custom component.
This makes more clear what we want to achieve and removes the warning
from the console.
Replacing the custom `span` tags with `Badge` also removes a warning
from the web console.

We also remove the inline styles with a Badge.css file, which allows us
to apply different appearances to badges. This is not supported by
react-bootstrap or bootstrap out of the box.
@edmundoa edmundoa added this to the 2.4.0 milestone Sep 29, 2017
@bernd bernd self-assigned this Oct 2, 2017
bernd
bernd approved these changes Oct 2, 2017
Copy link
Member

@bernd bernd left a comment

LGTM 👍

@bernd bernd merged commit 3dc1a29 into master Oct 2, 2017
5 checks passed
@bernd bernd deleted the remove-navigation-warnings branch Oct 2, 2017
bernd added a commit that referenced this issue Oct 2, 2017
* Fix react-unknown-prop on brand link

Filter out `active` prop on logo link.

* Remove eventKey from Navbar.Collapse

This is not needed and triggers a warning, as it is passed down to the
div doing the collapse.

* Use consistent indentation

* Fix another react-unknown-prop warning

Replace hack to remove active MenuItem state with a custom component.
This makes more clear what we want to achieve and removes the warning
from the console.

* Use react-bootstrap's Badge in navigation bar

Replacing the custom `span` tags with `Badge` also removes a warning
from the web console.

We also remove the inline styles with a Badge.css file, which allows us
to apply different appearances to badges. This is not supported by
react-bootstrap or bootstrap out of the box.

(cherry picked from commit 3dc1a29)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants