{"action":"created","issue":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/1660","repository_url":"https://api.github.com/repos/mitodl/micromasters","labels_url":"https://api.github.com/repos/mitodl/micromasters/issues/1660/labels{/name}","comments_url":"https://api.github.com/repos/mitodl/micromasters/issues/1660/comments","events_url":"https://api.github.com/repos/mitodl/micromasters/issues/1660/events","html_url":"https://github.com/mitodl/micromasters/issues/1660","id":187375671,"number":1660,"title":"Search: blank pane is displayed instead of \"no results\" error message","user":{"login":"gsidebo","id":14932219,"avatar_url":"https://avatars.githubusercontent.com/u/14932219?v=3","gravatar_id":"","url":"https://api.github.com/users/gsidebo","html_url":"https://github.com/gsidebo","followers_url":"https://api.github.com/users/gsidebo/followers","following_url":"https://api.github.com/users/gsidebo/following{/other_user}","gists_url":"https://api.github.com/users/gsidebo/gists{/gist_id}","starred_url":"https://api.github.com/users/gsidebo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsidebo/subscriptions","organizations_url":"https://api.github.com/users/gsidebo/orgs","repos_url":"https://api.github.com/users/gsidebo/repos","events_url":"https://api.github.com/users/gsidebo/events{/privacy}","received_events_url":"https://api.github.com/users/gsidebo/received_events","type":"User","site_admin":false},"labels":[{"id":334645557,"url":"https://api.github.com/repos/mitodl/micromasters/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-11-04T16:15:07Z","updated_at":"2016-12-22T13:55:56Z","closed_at":null,"body":"This is effectively re-opening #1449 due to an error that was discovered on release candidate 0.21.0\r\n\r\nThe logic to display \"no results\" messages to users on the search results page seems to be faulty. Here's a code snippet on the release-candidate branch:\r\n\r\n```javascript\r\nrenderFacets: Function = (currentProgramEnrollment: ProgramEnrollment): React$Element<*> => {\r\n    if (_.isNull(this.getResults())) {\r\n      return (\r\n        <Card className=\"fullwidth\" shadow={1}>\r\n          <div className=\"no-hits left-nav\">\r\n            {`There are no users in the ${currentProgramEnrollment.title} program.`}\r\n          </div>\r\n        </Card>\r\n      );\r\n    }\r\n```\r\n\r\nHere's a screenshot of some `console.log` lines I put into `renderFacets` to debug this:\r\n\r\n![ss 2016-11-04 at 11 28 40](https://cloud.githubusercontent.com/assets/14932219/20011413/f70f92aa-a281-11e6-9e3b-4a1c663e8868.png)\r\n\r\n`this.getResults()` is not returning `null`. It's returning an object with no hits."},"comment":{"url":"https://api.github.com/repos/mitodl/micromasters/issues/comments/268804264","html_url":"https://github.com/mitodl/micromasters/issues/1660#issuecomment-268804264","issue_url":"https://api.github.com/repos/mitodl/micromasters/issues/1660","id":268804264,"user":{"login":"pdpinch","id":430126,"avatar_url":"https://avatars.githubusercontent.com/u/430126?v=3","gravatar_id":"","url":"https://api.github.com/users/pdpinch","html_url":"https://github.com/pdpinch","followers_url":"https://api.github.com/users/pdpinch/followers","following_url":"https://api.github.com/users/pdpinch/following{/other_user}","gists_url":"https://api.github.com/users/pdpinch/gists{/gist_id}","starred_url":"https://api.github.com/users/pdpinch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pdpinch/subscriptions","organizations_url":"https://api.github.com/users/pdpinch/orgs","repos_url":"https://api.github.com/users/pdpinch/repos","events_url":"https://api.github.com/users/pdpinch/events{/privacy}","received_events_url":"https://api.github.com/users/pdpinch/received_events","type":"User","site_admin":false},"created_at":"2016-12-22T13:55:56Z","updated_at":"2016-12-22T13:55:56Z","body":"This may be the same issue as #2182 Search: confusing error message when there are no results"}}
{"actor":{"display_login":"pdpinch"}}