{"action":"created","issue":{"url":"https://api.github.com/repos/codaco/Architect/issues/242","repository_url":"https://api.github.com/repos/codaco/Architect","labels_url":"https://api.github.com/repos/codaco/Architect/issues/242/labels{/name}","comments_url":"https://api.github.com/repos/codaco/Architect/issues/242/comments","events_url":"https://api.github.com/repos/codaco/Architect/issues/242/events","html_url":"https://github.com/codaco/Architect/pull/242","id":362116481,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE2OTE2NzYw","number":242,"title":"Feature/delete type side effects","user":{"login":"wwqrd","id":776599,"node_id":"MDQ6VXNlcjc3NjU5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/776599?v=4","gravatar_id":"","url":"https://api.github.com/users/wwqrd","html_url":"https://github.com/wwqrd","followers_url":"https://api.github.com/users/wwqrd/followers","following_url":"https://api.github.com/users/wwqrd/following{/other_user}","gists_url":"https://api.github.com/users/wwqrd/gists{/gist_id}","starred_url":"https://api.github.com/users/wwqrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwqrd/subscriptions","organizations_url":"https://api.github.com/users/wwqrd/orgs","repos_url":"https://api.github.com/users/wwqrd/repos","events_url":"https://api.github.com/users/wwqrd/events{/privacy}","received_events_url":"https://api.github.com/users/wwqrd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-20T10:13:30Z","updated_at":"2018-09-21T10:53:48Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/codaco/Architect/pulls/242","html_url":"https://github.com/codaco/Architect/pull/242","diff_url":"https://github.com/codaco/Architect/pull/242.diff","patch_url":"https://github.com/codaco/Architect/pull/242.patch"},"body":"When deleting a type, checks for usage and deletes any affected objects.\r\n\r\nImplemented as a switch on the deleteType action `deleteType(entity, type, deleteRelatedObjects = false)`\r\n\r\n- [x] When deleting a type notify user of the impact on other objects.\r\n  - Currently implemented as a confirm dialog - thinking this might be better as an in-app modal so that we can do more with UI.\r\n- [x] Delete any associated stages/forms.\r\n- [x] Add information to node/edges registry indicating where assets are used\r\n\r\nResolves #232 "},"comment":{"url":"https://api.github.com/repos/codaco/Architect/issues/comments/423493512","html_url":"https://github.com/codaco/Architect/pull/242#issuecomment-423493512","issue_url":"https://api.github.com/repos/codaco/Architect/issues/242","id":423493512,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMzQ5MzUxMg==","user":{"login":"wwqrd","id":776599,"node_id":"MDQ6VXNlcjc3NjU5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/776599?v=4","gravatar_id":"","url":"https://api.github.com/users/wwqrd","html_url":"https://github.com/wwqrd","followers_url":"https://api.github.com/users/wwqrd/followers","following_url":"https://api.github.com/users/wwqrd/following{/other_user}","gists_url":"https://api.github.com/users/wwqrd/gists{/gist_id}","starred_url":"https://api.github.com/users/wwqrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwqrd/subscriptions","organizations_url":"https://api.github.com/users/wwqrd/orgs","repos_url":"https://api.github.com/users/wwqrd/repos","events_url":"https://api.github.com/users/wwqrd/events{/privacy}","received_events_url":"https://api.github.com/users/wwqrd/received_events","type":"User","site_admin":false},"created_at":"2018-09-21T10:53:48Z","updated_at":"2018-09-21T10:53:48Z","author_association":"CONTRIBUTOR","body":"> Deleting a type that led to a form being removed gave me the form name, but a type that led to the prompt being removed gave me two uid's instead, which isn't as helpful:\r\n\r\nAgreed, I'm going to update the mockProtocol with uuids to make this more obvious if it happens in future, and make the notice use the labels 👍\r\n\r\n> For example, I wasn't clear when a prompt told me a stage prompt would be removed that the entire stage would be (because it was the only prompt). It was what I expected to happen as a developer, but the message itself didn't indicate that it would.\r\n\r\nYou're right the user really needs to know that upfront! I'll add a check and maybe update the deleteType action to skip the prompt delete step where possible.\r\n\r\n> I think we don't need two confirmation dialogs; if I approve the stage/form being deleted, can that be enough to just go ahead and delete the type as well?\r\n\r\nI guess it is a little over cautious! We'll have undo functionality soon, so this probably could go."}}
{"actor":{"display_login":"wwqrd"}}