{"action":"created","issue":{"url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/340","repository_url":"https://api.github.com/repos/NYCPlanning/labs-zap-search","labels_url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/340/labels{/name}","comments_url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/340/comments","events_url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/340/events","html_url":"https://github.com/NYCPlanning/labs-zap-search/pull/340","id":340878978,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxMTg1ODA4","number":340,"title":"persist filter view by making show-project a child of projects","user":{"login":"chriswhong","id":1833820,"node_id":"MDQ6VXNlcjE4MzM4MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1833820?v=4","gravatar_id":"","url":"https://api.github.com/users/chriswhong","html_url":"https://github.com/chriswhong","followers_url":"https://api.github.com/users/chriswhong/followers","following_url":"https://api.github.com/users/chriswhong/following{/other_user}","gists_url":"https://api.github.com/users/chriswhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswhong/subscriptions","organizations_url":"https://api.github.com/users/chriswhong/orgs","repos_url":"https://api.github.com/users/chriswhong/repos","events_url":"https://api.github.com/users/chriswhong/events{/privacy}","received_events_url":"https://api.github.com/users/chriswhong/received_events","type":"User","site_admin":false},"labels":[{"id":961462909,"node_id":"MDU6TGFiZWw5NjE0NjI5MDk=","url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/labels/in%20progress","name":"in progress","color":"ededed","default":false}],"state":"open","locked":false,"assignee":{"login":"chriswhong","id":1833820,"node_id":"MDQ6VXNlcjE4MzM4MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1833820?v=4","gravatar_id":"","url":"https://api.github.com/users/chriswhong","html_url":"https://github.com/chriswhong","followers_url":"https://api.github.com/users/chriswhong/followers","following_url":"https://api.github.com/users/chriswhong/following{/other_user}","gists_url":"https://api.github.com/users/chriswhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswhong/subscriptions","organizations_url":"https://api.github.com/users/chriswhong/orgs","repos_url":"https://api.github.com/users/chriswhong/repos","events_url":"https://api.github.com/users/chriswhong/events{/privacy}","received_events_url":"https://api.github.com/users/chriswhong/received_events","type":"User","site_admin":false},"assignees":[{"login":"chriswhong","id":1833820,"node_id":"MDQ6VXNlcjE4MzM4MjA=","avatar_url":"https://avatars1.githubusercontent.com/u/1833820?v=4","gravatar_id":"","url":"https://api.github.com/users/chriswhong","html_url":"https://github.com/chriswhong","followers_url":"https://api.github.com/users/chriswhong/followers","following_url":"https://api.github.com/users/chriswhong/following{/other_user}","gists_url":"https://api.github.com/users/chriswhong/gists{/gist_id}","starred_url":"https://api.github.com/users/chriswhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chriswhong/subscriptions","organizations_url":"https://api.github.com/users/chriswhong/orgs","repos_url":"https://api.github.com/users/chriswhong/repos","events_url":"https://api.github.com/users/chriswhong/events{/privacy}","received_events_url":"https://api.github.com/users/chriswhong/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-07-13T04:37:35Z","updated_at":"2018-07-13T14:17:49Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/pulls/340","html_url":"https://github.com/NYCPlanning/labs-zap-search/pull/340","diff_url":"https://github.com/NYCPlanning/labs-zap-search/pull/340.diff","patch_url":"https://github.com/NYCPlanning/labs-zap-search/pull/340.patch"},"body":"This PR attempts to solve the problem of the filter state resetting when the user navigates back from a project page.\n\n- `show-geography` is renamed to `projects`, and the routes are updated accordingly.\n- `show-projects` is rendered into the `{{outlet}}` of `projects`, so when a user clicks on a project in the list view, the route transitions, but the project view is rendered into the existing filter view.  \n- Using CSS, we position the projects view over the filter view to keep it hidden from view until the user navigates back.\n- When they navigate back, the model has persisted, the list is in the same scroll position the user left it in, the map never went away and doesn't need to initialize again.\n\nSome things to consider:\n- I'm not sure of the implications of not clearing the store between these transitions, as the filter and project models share ids for projects, but contain different-ish data.  I haven't seen anything out of the ordinary yet.\n- The project view inherits the query params from the filter view... they have no effect on the project view if you load it directly with them there, they just clutter up the URL and are a bit out of place.\n\nTODO: There are inline styles on the containers for `show-project` and `show-project-loading`, these should be classes and styles with SCSS\n\nCloses #339 when complete"},"comment":{"url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/comments/404846801","html_url":"https://github.com/NYCPlanning/labs-zap-search/pull/340#issuecomment-404846801","issue_url":"https://api.github.com/repos/NYCPlanning/labs-zap-search/issues/340","id":404846801,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDg0NjgwMQ==","user":{"login":"allthesignals","id":5004319,"node_id":"MDQ6VXNlcjUwMDQzMTk=","avatar_url":"https://avatars2.githubusercontent.com/u/5004319?v=4","gravatar_id":"","url":"https://api.github.com/users/allthesignals","html_url":"https://github.com/allthesignals","followers_url":"https://api.github.com/users/allthesignals/followers","following_url":"https://api.github.com/users/allthesignals/following{/other_user}","gists_url":"https://api.github.com/users/allthesignals/gists{/gist_id}","starred_url":"https://api.github.com/users/allthesignals/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/allthesignals/subscriptions","organizations_url":"https://api.github.com/users/allthesignals/orgs","repos_url":"https://api.github.com/users/allthesignals/repos","events_url":"https://api.github.com/users/allthesignals/events{/privacy}","received_events_url":"https://api.github.com/users/allthesignals/received_events","type":"User","site_admin":false},"created_at":"2018-07-13T14:17:49Z","updated_at":"2018-07-13T14:17:49Z","author_association":"MEMBER","body":"> filter state resetting when the user navigates back from a project page\r\n\r\nIs this true? I was not seeing this behavior. Does this happen when you click a fresh ‘link-to’ or back button? \r\n\r\n> Using CSS, we position the projects view over the filter view to keep it hidden from view until the user navigates back.\r\n\r\nThis is not what nested routes are for. Your route nesting should mirror the visual nesting of your UI. Controllers are singletons and their state should not change even when navigating to different routes. I think there are configuration options that make QPs sticky. @andycochran ran into this once.\r\n\r\n> clearing the store between these transitions\r\n\r\nHmmm we aren’t clearing the store anywhere anymore \r\n\r\n> filter and project models share ids for projects, but contain different-ish data. I haven't seen anything out of the ordinary yet.\r\n\r\nIn the show-project route, the ember data ‘findRecord’ API has an option for making another round trip for data so that should not be an issue \r\n\r\n> TODO: There are inline styles on the containers for show-project and show-project-loading, these should be classes and styles with SCSS\r\n\r\nAgree!!!\r\n\r\n> Closes #339 when complete\r\n\r\nIsn’t this also related to #300 in a lot of ways?\r\n"}}
{"actor":{"display_login":"allthesignals"}}