{"action":"created","issue":{"url":"https://api.github.com/repos/open-company/open-company-web/issues/147","repository_url":"https://api.github.com/repos/open-company/open-company-web","labels_url":"https://api.github.com/repos/open-company/open-company-web/issues/147/labels{/name}","comments_url":"https://api.github.com/repos/open-company/open-company-web/issues/147/comments","events_url":"https://api.github.com/repos/open-company/open-company-web/issues/147/events","html_url":"https://github.com/open-company/open-company-web/pull/147","id":158147553,"number":147,"title":"improve redirect logic on signup","user":{"login":"martinklepsch","id":97496,"avatar_url":"https://avatars.githubusercontent.com/u/97496?v=3","gravatar_id":"","url":"https://api.github.com/users/martinklepsch","html_url":"https://github.com/martinklepsch","followers_url":"https://api.github.com/users/martinklepsch/followers","following_url":"https://api.github.com/users/martinklepsch/following{/other_user}","gists_url":"https://api.github.com/users/martinklepsch/gists{/gist_id}","starred_url":"https://api.github.com/users/martinklepsch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martinklepsch/subscriptions","organizations_url":"https://api.github.com/users/martinklepsch/orgs","repos_url":"https://api.github.com/users/martinklepsch/repos","events_url":"https://api.github.com/users/martinklepsch/events{/privacy}","received_events_url":"https://api.github.com/users/martinklepsch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bago2k4","id":642704,"avatar_url":"https://avatars.githubusercontent.com/u/642704?v=3","gravatar_id":"","url":"https://api.github.com/users/bago2k4","html_url":"https://github.com/bago2k4","followers_url":"https://api.github.com/users/bago2k4/followers","following_url":"https://api.github.com/users/bago2k4/following{/other_user}","gists_url":"https://api.github.com/users/bago2k4/gists{/gist_id}","starred_url":"https://api.github.com/users/bago2k4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bago2k4/subscriptions","organizations_url":"https://api.github.com/users/bago2k4/orgs","repos_url":"https://api.github.com/users/bago2k4/repos","events_url":"https://api.github.com/users/bago2k4/events{/privacy}","received_events_url":"https://api.github.com/users/bago2k4/received_events","type":"User","site_admin":false},"milestone":null,"comments":9,"created_at":"2016-06-02T13:58:57Z","updated_at":"2016-06-07T13:05:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/open-company/open-company-web/pulls/147","html_url":"https://github.com/open-company/open-company-web/pull/147","diff_url":"https://github.com/open-company/open-company-web/pull/147.diff","patch_url":"https://github.com/open-company/open-company-web/pull/147.patch"},"body":"[trello card](https://trello.com/c/5h8tjfIT/450-create-company-flow-for-newly-seen-org-id)\r\n\r\n- improves the redirect logic when users sign up\r\n   1. /create-company if they don't have a company yet\r\n   2. redirect via cookie if present\r\n   3. redirect to their company if they have exactly one\r\n   4. redirect to /companies if they have multiple\r\n- adds a few button helper classes that replace the custom styling for save/remove buttons\r\n- improves design on /create-company page to be more in line with Mark's work\r\n\r\n**To test**\r\n\r\n- [x] log out\r\n- [x] sign in with account that has no company\r\n  - [x] do you get to to `/create-company`?\r\n  - [x] is the name field prepopulated?\r\n  - [x] when creating the company, are you redirected to the new dashboard?\r\n- [ ] sign out\r\n- [ ] sign in with account that has one or more companies\r\n  - [ ] do you get back to the page you were on before? great!\r\n\r\nYou can check this for the case that the redirect cookie doesn't exist as well but this is unlikely at best so maybe fine to not test explicitly (code is straightforward).\r\n\r\n<span class=\"emoji-outer emoji-sizer\"><span class=\"emoji-inner\" style=\"background: url(chrome-extension://immhpnclomdloikkpcefncmfgjbkojmh/emoji-data/sheet_apple_64.png);background-position:72.5% 27.5%;background-size:4100%\" title=\"rocket\"></span></span> "},"comment":{"url":"https://api.github.com/repos/open-company/open-company-web/issues/comments/224274016","html_url":"https://github.com/open-company/open-company-web/pull/147#issuecomment-224274016","issue_url":"https://api.github.com/repos/open-company/open-company-web/issues/147","id":224274016,"user":{"login":"bago2k4","id":642704,"avatar_url":"https://avatars.githubusercontent.com/u/642704?v=3","gravatar_id":"","url":"https://api.github.com/users/bago2k4","html_url":"https://github.com/bago2k4","followers_url":"https://api.github.com/users/bago2k4/followers","following_url":"https://api.github.com/users/bago2k4/following{/other_user}","gists_url":"https://api.github.com/users/bago2k4/gists{/gist_id}","starred_url":"https://api.github.com/users/bago2k4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bago2k4/subscriptions","organizations_url":"https://api.github.com/users/bago2k4/orgs","repos_url":"https://api.github.com/users/bago2k4/repos","events_url":"https://api.github.com/users/bago2k4/events{/privacy}","received_events_url":"https://api.github.com/users/bago2k4/received_events","type":"User","site_admin":false},"created_at":"2016-06-07T13:05:39Z","updated_at":"2016-06-07T13:05:39Z","body":"@martinklepsch i think there one thing left:\r\n- [ ] I shouldn't be able visit /create-company while i'm logged out (ie: no jwt cookie)"}}
{"actor":{"display_login":"bago2k4"}}