{"action":"created","issue":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/185","repository_url":"https://api.github.com/repos/mitodl/micromasters","labels_url":"https://api.github.com/repos/mitodl/micromasters/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/185/comments","events_url":"https://api.github.com/repos/mitodl/micromasters/issues/185/events","html_url":"https://github.com/mitodl/micromasters/pull/185","id":148683248,"number":185,"title":"Fixed a JS console warning, react-router and react-bootstrap","user":{"login":"aliceriot","id":6207644,"avatar_url":"https://avatars.githubusercontent.com/u/6207644?v=3","gravatar_id":"","url":"https://api.github.com/users/aliceriot","html_url":"https://github.com/aliceriot","followers_url":"https://api.github.com/users/aliceriot/followers","following_url":"https://api.github.com/users/aliceriot/following{/other_user}","gists_url":"https://api.github.com/users/aliceriot/gists{/gist_id}","starred_url":"https://api.github.com/users/aliceriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliceriot/subscriptions","organizations_url":"https://api.github.com/users/aliceriot/orgs","repos_url":"https://api.github.com/users/aliceriot/repos","events_url":"https://api.github.com/users/aliceriot/events{/privacy}","received_events_url":"https://api.github.com/users/aliceriot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mitodl/micromasters/labels/Needs%20Review","name":"Needs Review","color":"fad8c7"}],"state":"open","locked":false,"assignee":{"login":"aliceriot","id":6207644,"avatar_url":"https://avatars.githubusercontent.com/u/6207644?v=3","gravatar_id":"","url":"https://api.github.com/users/aliceriot","html_url":"https://github.com/aliceriot","followers_url":"https://api.github.com/users/aliceriot/followers","following_url":"https://api.github.com/users/aliceriot/following{/other_user}","gists_url":"https://api.github.com/users/aliceriot/gists{/gist_id}","starred_url":"https://api.github.com/users/aliceriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aliceriot/subscriptions","organizations_url":"https://api.github.com/users/aliceriot/orgs","repos_url":"https://api.github.com/users/aliceriot/repos","events_url":"https://api.github.com/users/aliceriot/events{/privacy}","received_events_url":"https://api.github.com/users/aliceriot/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-15T14:58:58Z","updated_at":"2016-04-15T17:48:36Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mitodl/micromasters/pulls/185","html_url":"https://github.com/mitodl/micromasters/pull/185","diff_url":"https://github.com/mitodl/micromasters/pull/185.diff","patch_url":"https://github.com/mitodl/micromasters/pull/185.patch"},"body":"#### What are the relevant tickets?\r\n\r\nnone, this fixes a bug I noticed.\r\n\r\n#### What's this PR do?\r\n\r\nthis adds a library called react-router-bootstrap that is designed to\r\nmake react-router and react-bootstrap play nicely together.\r\n\r\nbasically, we were getting a JS warning that looks like this:\r\n\r\n```\r\nwarning.js:45 Warning: validateDOMNesting(...): <a> cannot appear as a descendant of <a>. See LoginButton > MenuItem > SafeAnchor > a > ... > Link > a\r\n```\r\n\r\nthis is occurring because we had the following code:\r\n\r\n```javascript\r\n<MenuItem>\r\n  <Link to=\"/profile\">\r\n    Profile\r\n  </Link>\r\n</MenuItem>\r\n```\r\n\r\n`MenuItem` comes from `react-bootstrap`, and `Link` is a `react-router`\r\nlink. basically, the problem is that `MenuItem` implicitly includes an\r\n`<a ..></a>` element, and places `this.props.children` inside that\r\nelement.\r\n\r\nhence, we get a console warning about improperly nesting `<a>` tags.\r\n\r\nof course, the outer one has `href=undefined`, so only the inner\r\n`<Link>` tag does anything, and the ui works as expected, but still, the\r\nwarning.\r\n\r\nthe `react-router-bootstrap` library saves us here. we get a component\r\ncalled `<LinkContainer>` which can wrap any `react-bootstrap` component\r\nand make it behave like a `react-router` `<Link>`. we just set a `to`\r\nprop on the `<LinkContainer>` with the path we want and any url params,\r\nand off we go!\r\n\r\n#### Where should the reviewer start?\r\n\r\nI think just take a look in here:\r\n\r\n\tmodified:   static/js/containers/LoginButton.js\r\n\r\n#### How should this be manually tested?\r\n\r\npull down the branch, restart docker, visit `/dashboard` and confirm the\r\njs console error is gone.\r\n\r\n#### Any background context you want to provide?\r\n\r\ndocs for the lib here:\r\nhttps://github.com/react-bootstrap/react-router-bootstrap"},"comment":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/comments/210562730","html_url":"https://github.com/mitodl/micromasters/pull/185#issuecomment-210562730","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/185","id":210562730,"user":{"login":"noisecapella","id":863262,"avatar_url":"https://avatars.githubusercontent.com/u/863262?v=3","gravatar_id":"","url":"https://api.github.com/users/noisecapella","html_url":"https://github.com/noisecapella","followers_url":"https://api.github.com/users/noisecapella/followers","following_url":"https://api.github.com/users/noisecapella/following{/other_user}","gists_url":"https://api.github.com/users/noisecapella/gists{/gist_id}","starred_url":"https://api.github.com/users/noisecapella/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/noisecapella/subscriptions","organizations_url":"https://api.github.com/users/noisecapella/orgs","repos_url":"https://api.github.com/users/noisecapella/repos","events_url":"https://api.github.com/users/noisecapella/events{/privacy}","received_events_url":"https://api.github.com/users/noisecapella/received_events","type":"User","site_admin":false},"created_at":"2016-04-15T17:48:36Z","updated_at":"2016-04-15T17:48:36Z","body":"Functionality looks good but I see this blue background now when I'm on the user profile:\r\n\r\n![screenshot from 2016-04-15 13-48-10](https://cloud.githubusercontent.com/assets/863262/14570149/b652fd80-0310-11e6-9e4a-f1b4fd832835.png)\r\n\r\nWe can deal with it in another PR if you prefer :+1: "}}