{"action":"created","issue":{"url":"https://api.github.com/repos/kiwicom/mobile/issues/918","repository_url":"https://api.github.com/repos/kiwicom/mobile","labels_url":"https://api.github.com/repos/kiwicom/mobile/issues/918/labels{/name}","comments_url":"https://api.github.com/repos/kiwicom/mobile/issues/918/comments","events_url":"https://api.github.com/repos/kiwicom/mobile/issues/918/events","html_url":"https://github.com/kiwicom/mobile/pull/918","id":344318316,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAzNzQwNDkz","number":918,"title":"MMB: Prepare data for apple wallet screen","user":{"login":"tbergq","id":7705041,"node_id":"MDQ6VXNlcjc3MDUwNDE=","avatar_url":"https://avatars3.githubusercontent.com/u/7705041?v=4","gravatar_id":"","url":"https://api.github.com/users/tbergq","html_url":"https://github.com/tbergq","followers_url":"https://api.github.com/users/tbergq/followers","following_url":"https://api.github.com/users/tbergq/following{/other_user}","gists_url":"https://api.github.com/users/tbergq/gists{/gist_id}","starred_url":"https://api.github.com/users/tbergq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbergq/subscriptions","organizations_url":"https://api.github.com/users/tbergq/orgs","repos_url":"https://api.github.com/users/tbergq/repos","events_url":"https://api.github.com/users/tbergq/events{/privacy}","received_events_url":"https://api.github.com/users/tbergq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-25T07:05:41Z","updated_at":"2018-07-25T08:04:27Z","closed_at":null,"author_association":"COLLABORATOR","pull_request":{"url":"https://api.github.com/repos/kiwicom/mobile/pulls/918","html_url":"https://github.com/kiwicom/mobile/pull/918","diff_url":"https://github.com/kiwicom/mobile/pull/918.diff","patch_url":"https://github.com/kiwicom/mobile/pull/918.patch"},"body":"I considered two approaches to get data for the apple wallet screen. \r\n\r\nA: Use query renderer\r\n• I would have to pass legId and passengerId the new screen\r\n• Query the booking for all legs, loop all legs to find my leg, loop pkpasses to find my passenger\r\n• This does not sound optimal\r\n\r\nB: The chosen approach. \r\n• Prepare data in context and set the selected one when clicking on the passenger\r\n• I would then be able to get all needed data on the apple wallet screen from the context through the selectedSegment. \r\n• I do have to prop drill legId down to the click handler, but I would have had to do that with approach A also. \r\n\r\nC: Could be an approach I did not consider, so please let me know if you see another way 😄 "},"comment":{"url":"https://api.github.com/repos/kiwicom/mobile/issues/comments/407669842","html_url":"https://github.com/kiwicom/mobile/pull/918#issuecomment-407669842","issue_url":"https://api.github.com/repos/kiwicom/mobile/issues/918","id":407669842,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNzY2OTg0Mg==","user":{"login":"RobinCsl","id":22741774,"node_id":"MDQ6VXNlcjIyNzQxNzc0","avatar_url":"https://avatars3.githubusercontent.com/u/22741774?v=4","gravatar_id":"","url":"https://api.github.com/users/RobinCsl","html_url":"https://github.com/RobinCsl","followers_url":"https://api.github.com/users/RobinCsl/followers","following_url":"https://api.github.com/users/RobinCsl/following{/other_user}","gists_url":"https://api.github.com/users/RobinCsl/gists{/gist_id}","starred_url":"https://api.github.com/users/RobinCsl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RobinCsl/subscriptions","organizations_url":"https://api.github.com/users/RobinCsl/orgs","repos_url":"https://api.github.com/users/RobinCsl/repos","events_url":"https://api.github.com/users/RobinCsl/events{/privacy}","received_events_url":"https://api.github.com/users/RobinCsl/received_events","type":"User","site_admin":false},"created_at":"2018-07-25T08:04:27Z","updated_at":"2018-07-25T08:04:27Z","author_association":"COLLABORATOR","body":"Well, interestingly, this is the same kind of problem I am dealing with at the moment: how to pass data correctly when navigating from one screen to another when this deals with one item of a list... \r\nI think the approach with the context is quite good because it really is about the context and all the information is managed by one state store. \r\nIf we had had some global store, then it could have been slightly easier as we would just need to connect to that store and all the information would be available. I guess people are using the Relay Store as a replacement for Redux. SO maybe it would be possible to do something similar? My 2 cents.\r\n\r\nOne further comment, more specific to the code: it does not look like you are using `selectedSegment` anywhere yet. Is it by design and will be used later?"}}
{"actor":{"display_login":"RobinCsl"}}