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

Conversation

Projects
None yet
2 participants
@edmundoa
Member

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 some commits Sep 29, 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.
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.

@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

LGTM 👍

@bernd bernd merged commit 3dc1a29 into master Oct 2, 2017

5 checks passed

ci-web-linter Jenkins build graylog-pr-linter-check 1954 has succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
graylog-project/pr Jenkins build graylog-project-pr-snapshot 523 has succeeded
Details
license/cla Contributor License Agreement is signed.
Details

@bernd bernd deleted the remove-navigation-warnings branch Oct 2, 2017

bernd added a commit that referenced this pull request Oct 2, 2017

Remove navigation warnings (#4192)
* 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