{"action":"created","issue":{"url":"https://api.github.com/repos/5calls/5calls/issues/222","repository_url":"https://api.github.com/repos/5calls/5calls","labels_url":"https://api.github.com/repos/5calls/5calls/issues/222/labels{/name}","comments_url":"https://api.github.com/repos/5calls/5calls/issues/222/comments","events_url":"https://api.github.com/repos/5calls/5calls/issues/222/events","html_url":"https://github.com/5calls/5calls/issues/222","id":210271489,"number":222,"title":"Remove hash routing","user":{"login":"oderby","id":1351158,"avatar_url":"https://avatars0.githubusercontent.com/u/1351158?v=3","gravatar_id":"","url":"https://api.github.com/users/oderby","html_url":"https://github.com/oderby","followers_url":"https://api.github.com/users/oderby/followers","following_url":"https://api.github.com/users/oderby/following{/other_user}","gists_url":"https://api.github.com/users/oderby/gists{/gist_id}","starred_url":"https://api.github.com/users/oderby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oderby/subscriptions","organizations_url":"https://api.github.com/users/oderby/orgs","repos_url":"https://api.github.com/users/oderby/repos","events_url":"https://api.github.com/users/oderby/events{/privacy}","received_events_url":"https://api.github.com/users/oderby/received_events","type":"User","site_admin":false},"labels":[{"id":492574682,"url":"https://api.github.com/repos/5calls/5calls/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":532377213,"url":"https://api.github.com/repos/5calls/5calls/labels/frontend","name":"frontend","color":"1d76db","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-02-25T23:55:52Z","updated_at":"2017-03-07T11:24:48Z","closed_at":null,"body":"We should remove the hash from our routes, for the following reasons:\r\n1. We can't provide customized metadata for issues shared on social media (#218), because that requires server-side logic and the hash of a url (which currently specifies the current issue) is stripped before being sent to the server\r\n2. There are some subtle bugs around [browser history when using hash routes on IE](https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/3740423/) that means we need to do some custom workaround (#221) work to get navigation working correctly in our app.\r\n\r\nAt this point, this work is not planned, as nothing is broken and the change will be significant. I just want a place to track the problems we encounter with hash routing, so we know what to touch/revisit when we remove it."},"comment":{"url":"https://api.github.com/repos/5calls/5calls/issues/comments/284695417","html_url":"https://github.com/5calls/5calls/issues/222#issuecomment-284695417","issue_url":"https://api.github.com/repos/5calls/5calls/issues/222","id":284695417,"user":{"login":"greggraf","id":983894,"avatar_url":"https://avatars2.githubusercontent.com/u/983894?v=3","gravatar_id":"","url":"https://api.github.com/users/greggraf","html_url":"https://github.com/greggraf","followers_url":"https://api.github.com/users/greggraf/followers","following_url":"https://api.github.com/users/greggraf/following{/other_user}","gists_url":"https://api.github.com/users/greggraf/gists{/gist_id}","starred_url":"https://api.github.com/users/greggraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greggraf/subscriptions","organizations_url":"https://api.github.com/users/greggraf/orgs","repos_url":"https://api.github.com/users/greggraf/repos","events_url":"https://api.github.com/users/greggraf/events{/privacy}","received_events_url":"https://api.github.com/users/greggraf/received_events","type":"User","site_admin":false},"created_at":"2017-03-07T11:24:48Z","updated_at":"2017-03-07T11:24:48Z","body":"Rendering the template in Go:\r\n\r\nI am assuming the Go application acts as an http server using the generated directory /app/static/ as the server root.\r\n\r\nA visitor is served the index.html page which has general content about 5calls.org. The Choo app kicks in, fetches the issues feed, zip code of the user, etc. then updates the DOM with the issue list, new content in the main area, and content derived from the IP address.\r\n\r\n(The served markup is momentarily visible, then gets replaced with client side rendered content after the app starts up.)\r\n\r\nThe tree is delivered, then it is lit up.\r\n\r\nWe don't *need* server rendered issue detail pages to be a full replica of the client rendered views for twitter/facebook/spidering purposes. We probably don't even want the contact information as that is visitor specific and should be determined as it is now, client side.\r\n\r\nWe DO need:\r\n- updated `<title>` tag with issue title\r\n- updated `<meta>` tags for social media services\r\n- basic markup about the issue (title and details)\r\n\r\nThen the Choo app starts up and contacts, zip code, latest issues, etc get added client side.\r\n\r\nI am imagining the Go server could:\r\n- respond to requests for `/` or `/index.html` by delivering `/app/static/index.html` as it does now\r\n- respond to request for `/issue/XXXXXXXXX` \r\n  - gather the data for issue xxxxxxxxx\r\n  - read in the `/index.html` from the file system\r\n  - replace existing title and metatags in the header with issue xxxxxxxxx appropriate content\r\n  - replace the markup in the main content area with a very basic rendering of the issue specific markup\r\n  - serve the result\r\n  \r\nThis basic page gets turned into the full featured issue detail page client side.\r\n\r\nGenerating the markup in Go:\r\n \r\n- simplest: Go could naively replace the main content with a vanilla h2 and div tags containing the issue title and a text.\r\n- less simple: the styles and markup for the content area on index and issue detail pages could be made consistent. Go would use the index page markup and replace issue detail content where appropriate\r\n- even less simple, but keeps view generation code in one place: the index.html page could provide a chunk of hidden markup that can be used by Go as a template. This code could be rendered from the Choo app then inserted into the index.html page during a build step so we the markup stays in sync with changes to the Choo view.\r\n- way too complex, there could be a NodeJS 'service' similar to my experiment that the Go app could request server side to get the markup to deliver... sort of a Go proxy in front of a Choo rendering NodeJS server.  \r\n\r\nMy instinct is to start with the first approach and iterate."}}
{"actor":{"display_login":"greggraf"}}