{"action":"created","issue":{"url":"https://api.github.com/repos/tivac/crucible/issues/132","repository_url":"https://api.github.com/repos/tivac/crucible","labels_url":"https://api.github.com/repos/tivac/crucible/issues/132/labels{/name}","comments_url":"https://api.github.com/repos/tivac/crucible/issues/132/comments","events_url":"https://api.github.com/repos/tivac/crucible/issues/132/events","html_url":"https://github.com/tivac/crucible/pull/132","id":173334837,"number":132,"title":"Hidden field behavior","user":{"login":"ctcleary","id":4128038,"avatar_url":"https://avatars.githubusercontent.com/u/4128038?v=3","gravatar_id":"","url":"https://api.github.com/users/ctcleary","html_url":"https://github.com/ctcleary","followers_url":"https://api.github.com/users/ctcleary/followers","following_url":"https://api.github.com/users/ctcleary/following{/other_user}","gists_url":"https://api.github.com/users/ctcleary/gists{/gist_id}","starred_url":"https://api.github.com/users/ctcleary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ctcleary/subscriptions","organizations_url":"https://api.github.com/users/ctcleary/orgs","repos_url":"https://api.github.com/users/ctcleary/repos","events_url":"https://api.github.com/users/ctcleary/events{/privacy}","received_events_url":"https://api.github.com/users/ctcleary/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tivac/crucible/labels/bug","name":"bug","color":"d4c5f9"},{"url":"https://api.github.com/repos/tivac/crucible/labels/enhancement","name":"enhancement","color":"d4c5f9"}],"state":"open","locked":false,"assignee":{"login":"tivac","id":49545,"avatar_url":"https://avatars.githubusercontent.com/u/49545?v=3","gravatar_id":"","url":"https://api.github.com/users/tivac","html_url":"https://github.com/tivac","followers_url":"https://api.github.com/users/tivac/followers","following_url":"https://api.github.com/users/tivac/following{/other_user}","gists_url":"https://api.github.com/users/tivac/gists{/gist_id}","starred_url":"https://api.github.com/users/tivac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tivac/subscriptions","organizations_url":"https://api.github.com/users/tivac/orgs","repos_url":"https://api.github.com/users/tivac/repos","events_url":"https://api.github.com/users/tivac/events{/privacy}","received_events_url":"https://api.github.com/users/tivac/received_events","type":"User","site_admin":false},"assignees":[{"login":"tivac","id":49545,"avatar_url":"https://avatars.githubusercontent.com/u/49545?v=3","gravatar_id":"","url":"https://api.github.com/users/tivac","html_url":"https://github.com/tivac","followers_url":"https://api.github.com/users/tivac/followers","following_url":"https://api.github.com/users/tivac/following{/other_user}","gists_url":"https://api.github.com/users/tivac/gists{/gist_id}","starred_url":"https://api.github.com/users/tivac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tivac/subscriptions","organizations_url":"https://api.github.com/users/tivac/orgs","repos_url":"https://api.github.com/users/tivac/repos","events_url":"https://api.github.com/users/tivac/events{/privacy}","received_events_url":"https://api.github.com/users/tivac/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-08-25T23:24:52Z","updated_at":"2016-08-29T23:22:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/tivac/crucible/pulls/132","html_url":"https://github.com/tivac/crucible/pull/132","diff_url":"https://github.com/tivac/crucible/pull/132.diff","patch_url":"https://github.com/tivac/crucible/pull/132.patch"},"body":"As requested in #93 the behavior is now:\r\n* A user enters data into a field \"X\" e.g. \"This is an answer\"\r\n* \"X\" becomes hidden.\r\n* `Save` action does not persist the data in \"X\"\r\n* \"X\" becomes visible, \"This is an answer\" is still populated in the now-shown field.\r\n\r\nTo do this I had to entirely rework the hiding mechanism. The per-type hiding behavior is no longer needed. Since every input is constructed through `/types/children.js`, the hiding behavior is now mostly centralized there.\r\n* The field's `field.show` object is assigned a `field.show.hidden` boolean so we can determine when its hidden status has changed.\r\n* Whenever a field's hidden status changes, we register it with the controller from `content-edit/index.js` since this component's data is what gets sent to the `save` action.\r\n* In the `save` action, we create a copy of the current data and set any hidden field's data to `null` in the clone, this filtered data is what ends up persisted to the datastore.\r\n\r\n[Fixes #93]"},"comment":{"url":"https://api.github.com/repos/tivac/crucible/issues/comments/243287371","html_url":"https://github.com/tivac/crucible/pull/132#issuecomment-243287371","issue_url":"https://api.github.com/repos/tivac/crucible/issues/132","id":243287371,"user":{"login":"tivac","id":49545,"avatar_url":"https://avatars.githubusercontent.com/u/49545?v=3","gravatar_id":"","url":"https://api.github.com/users/tivac","html_url":"https://github.com/tivac","followers_url":"https://api.github.com/users/tivac/followers","following_url":"https://api.github.com/users/tivac/following{/other_user}","gists_url":"https://api.github.com/users/tivac/gists{/gist_id}","starred_url":"https://api.github.com/users/tivac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tivac/subscriptions","organizations_url":"https://api.github.com/users/tivac/orgs","repos_url":"https://api.github.com/users/tivac/repos","events_url":"https://api.github.com/users/tivac/events{/privacy}","received_events_url":"https://api.github.com/users/tivac/received_events","type":"User","site_admin":false},"created_at":"2016-08-29T23:22:09Z","updated_at":"2016-08-29T23:22:09Z","body":"Ah, sure. I need to stew on they way that's wired up for a bit because right now it's very bodged together and I forgot just how clunky it was.\r\n\r\nI'd like the tests to be cleaned up (either removed if now-irrelevant or fixed) and then I think we're good to merge. This will need to be rebased on master before that can happen, but that should be pretty small."}}
{"actor":{"display_login":"tivac"}}