{"action":"created","comment":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/32556892","id":32556892,"diff_hunk":"@@ -863,6 +925,74 @@ private void TextBoxBase_OnTextChanged(object sender, TextChangedEventArgs e)\n             LogScroller.ScrollToBottom();\n         }\n \n+        private void LoadStateMenus(object sender, RoutedEventArgs e)\n+        {\n+            //grab serialized designoptions from current workspace... hopefully this is loaded?\n+            var PresetSet = dynamoViewModel.Model.CurrentWorkspace.PresetsCollection;\n+            // now grab all the states off the set and create a menu item for each one\n+\n+           \n+            //only update the states menus if the states have been updated or the user\n+            // has switched workspace contexts, can check if designOptionsSet collection is different\n+            if (!PresetSet.PresetStates.SequenceEqual(((MenuItem)(sender)).Items.OfType<MenuItem>().Select(x=>x.Tag).ToList()))","path":"src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs","position":96,"original_position":96,"commit_id":"646387d8894cbe2c514111d59c96fea1df13ec2a","original_commit_id":"646387d8894cbe2c514111d59c96fea1df13ec2a","user":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"body":"This LINQ statement is very hard to read, an likely hard to debug.  \r\n\r\nInstead of using inline c-style casts, use `OfType<T>`","created_at":"2015-06-16T18:52:39Z","updated_at":"2015-06-16T18:52:39Z","html_url":"https://github.com/DynamoDS/Dynamo/pull/4530#discussion_r32556892","pull_request_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530","_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments/32556892"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/4530#discussion_r32556892"},"pull_request":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530"}}},"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530","id":35887841,"html_url":"https://github.com/DynamoDS/Dynamo/pull/4530","diff_url":"https://github.com/DynamoDS/Dynamo/pull/4530.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/4530.patch","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4530","number":4530,"state":"open","locked":false,"title":"Workspace Presets","user":{"login":"holyjewsus","id":508936,"avatar_url":"https://avatars.githubusercontent.com/u/508936?v=3","gravatar_id":"","url":"https://api.github.com/users/holyjewsus","html_url":"https://github.com/holyjewsus","followers_url":"https://api.github.com/users/holyjewsus/followers","following_url":"https://api.github.com/users/holyjewsus/following{/other_user}","gists_url":"https://api.github.com/users/holyjewsus/gists{/gist_id}","starred_url":"https://api.github.com/users/holyjewsus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holyjewsus/subscriptions","organizations_url":"https://api.github.com/users/holyjewsus/orgs","repos_url":"https://api.github.com/users/holyjewsus/repos","events_url":"https://api.github.com/users/holyjewsus/events{/privacy}","received_events_url":"https://api.github.com/users/holyjewsus/received_events","type":"User","site_admin":false},"body":"### Purpose\r\n\r\nMAGN 6558, minimal implementation of preset states for the graph, this includes menu options for creating, restoring and deleting states. This PR does not include a states editor and is very similar to the branch build that was given to users on the forum a few weeks ago.\r\n\r\nStates are stored in the .dyn file under a preset state object, this implementation will serialize all node types and restore all serialized node data, ~~meaning it will move nodes to the position they were located at when a state was created.~~, This behavior has been changed, nodes will stay at their current position. If a node is missing from a state ( a user has deleted it), a restore state command will ignore this node, but this orphan node data will not be removed from the state as future work may enable re-associating this data.\r\n\r\nplease see this video of behavior, menus are nested in the edit menu.\r\nhttps://www.dropbox.com/s/2phdoax81knoarx/states%20video%202.mov?dl=0\r\n\r\n### Impact assessment\r\n\r\n\r\n- [x] Changes a public interface (Add lukechurch to the reviewer list)\r\n- [x] Affects which components of the system depends on which other components (Add pboyer to the reviewer list)\r\n- [x] Introduces new components (Add lukechurch to the reviewer list)\r\n\r\n#### References\r\n![screen shot 2015-05-20 at 6 47 10 pm](https://cloud.githubusercontent.com/assets/508936/7738340/3934ffe0-ff21-11e4-9034-3078e3452549.png)\r\nPlease see Lilli's design options doc\r\n\r\n#### Testing strategy\r\n\r\nThere are tests added to core tests and a preset state tests added to dynamo core tests project. Tests try creating, undoing, saving, and loading states as well as trying to opening files without states and malformed states. I believe I have made the necessary changes and these tests no longer require the view model as @pboyer required in his review of those specifically.\r\n\r\nalso just ran(june 8) self serve ci branch, no failures)\r\n\r\n### Reviewers\r\n\r\n@pboyer \r\n\r\n### FYIs\r\n\r\n@jnealb -for the tests\r\n@lillismith\r\n@kronz \r\n@ikeough fyi as per email discussion\r\n@lukechurch ","created_at":"2015-05-20T23:47:34Z","updated_at":"2015-06-16T18:52:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f3739e71bc064a985a11673d2ba868e2a8ea3993","assignee":{"login":"pboyer","id":916345,"avatar_url":"https://avatars.githubusercontent.com/u/916345?v=3","gravatar_id":"","url":"https://api.github.com/users/pboyer","html_url":"https://github.com/pboyer","followers_url":"https://api.github.com/users/pboyer/followers","following_url":"https://api.github.com/users/pboyer/following{/other_user}","gists_url":"https://api.github.com/users/pboyer/gists{/gist_id}","starred_url":"https://api.github.com/users/pboyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboyer/subscriptions","organizations_url":"https://api.github.com/users/pboyer/orgs","repos_url":"https://api.github.com/users/pboyer/repos","events_url":"https://api.github.com/users/pboyer/events{/privacy}","received_events_url":"https://api.github.com/users/pboyer/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4530/comments","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/646387d8894cbe2c514111d59c96fea1df13ec2a","head":{"label":"holyjewsus:designOptionsTests","ref":"designOptionsTests","sha":"646387d8894cbe2c514111d59c96fea1df13ec2a","user":{"login":"holyjewsus","id":508936,"avatar_url":"https://avatars.githubusercontent.com/u/508936?v=3","gravatar_id":"","url":"https://api.github.com/users/holyjewsus","html_url":"https://github.com/holyjewsus","followers_url":"https://api.github.com/users/holyjewsus/followers","following_url":"https://api.github.com/users/holyjewsus/following{/other_user}","gists_url":"https://api.github.com/users/holyjewsus/gists{/gist_id}","starred_url":"https://api.github.com/users/holyjewsus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holyjewsus/subscriptions","organizations_url":"https://api.github.com/users/holyjewsus/orgs","repos_url":"https://api.github.com/users/holyjewsus/repos","events_url":"https://api.github.com/users/holyjewsus/events{/privacy}","received_events_url":"https://api.github.com/users/holyjewsus/received_events","type":"User","site_admin":false},"repo":{"id":14159492,"name":"Dynamo","full_name":"holyjewsus/Dynamo","owner":{"login":"holyjewsus","id":508936,"avatar_url":"https://avatars.githubusercontent.com/u/508936?v=3","gravatar_id":"","url":"https://api.github.com/users/holyjewsus","html_url":"https://github.com/holyjewsus","followers_url":"https://api.github.com/users/holyjewsus/followers","following_url":"https://api.github.com/users/holyjewsus/following{/other_user}","gists_url":"https://api.github.com/users/holyjewsus/gists{/gist_id}","starred_url":"https://api.github.com/users/holyjewsus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/holyjewsus/subscriptions","organizations_url":"https://api.github.com/users/holyjewsus/orgs","repos_url":"https://api.github.com/users/holyjewsus/repos","events_url":"https://api.github.com/users/holyjewsus/events{/privacy}","received_events_url":"https://api.github.com/users/holyjewsus/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/holyjewsus/Dynamo","description":"Visual Programming For Revit","fork":true,"url":"https://api.github.com/repos/holyjewsus/Dynamo","forks_url":"https://api.github.com/repos/holyjewsus/Dynamo/forks","keys_url":"https://api.github.com/repos/holyjewsus/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/holyjewsus/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/holyjewsus/Dynamo/teams","hooks_url":"https://api.github.com/repos/holyjewsus/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/holyjewsus/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/holyjewsus/Dynamo/events","assignees_url":"https://api.github.com/repos/holyjewsus/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/holyjewsus/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/holyjewsus/Dynamo/tags","blobs_url":"https://api.github.com/repos/holyjewsus/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/holyjewsus/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/holyjewsus/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/holyjewsus/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/holyjewsus/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/holyjewsus/Dynamo/languages","stargazers_url":"https://api.github.com/repos/holyjewsus/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/holyjewsus/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/holyjewsus/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/holyjewsus/Dynamo/subscription","commits_url":"https://api.github.com/repos/holyjewsus/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/holyjewsus/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/holyjewsus/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/holyjewsus/Dynamo/issues/comments{/number}","contents_url":"https://api.github.com/repos/holyjewsus/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/holyjewsus/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/holyjewsus/Dynamo/merges","archive_url":"https://api.github.com/repos/holyjewsus/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/holyjewsus/Dynamo/downloads","issues_url":"https://api.github.com/repos/holyjewsus/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/holyjewsus/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/holyjewsus/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/holyjewsus/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/holyjewsus/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/holyjewsus/Dynamo/releases{/id}","created_at":"2013-11-06T01:18:42Z","updated_at":"2015-01-20T19:30:58Z","pushed_at":"2015-06-16T17:11:19Z","git_url":"git://github.com/holyjewsus/Dynamo.git","ssh_url":"git@github.com:holyjewsus/Dynamo.git","clone_url":"https://github.com/holyjewsus/Dynamo.git","svn_url":"https://github.com/holyjewsus/Dynamo","homepage":"http://dynamobim.org","size":837879,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"DynamoDS:master","ref":"master","sha":"d0a33b09fc4fef5fa135d665abcba2255c7b12dd","user":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"repo":{"id":3395179,"name":"Dynamo","full_name":"DynamoDS/Dynamo","owner":{"login":"DynamoDS","id":6528209,"avatar_url":"https://avatars.githubusercontent.com/u/6528209?v=3","gravatar_id":"","url":"https://api.github.com/users/DynamoDS","html_url":"https://github.com/DynamoDS","followers_url":"https://api.github.com/users/DynamoDS/followers","following_url":"https://api.github.com/users/DynamoDS/following{/other_user}","gists_url":"https://api.github.com/users/DynamoDS/gists{/gist_id}","starred_url":"https://api.github.com/users/DynamoDS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DynamoDS/subscriptions","organizations_url":"https://api.github.com/users/DynamoDS/orgs","repos_url":"https://api.github.com/users/DynamoDS/repos","events_url":"https://api.github.com/users/DynamoDS/events{/privacy}","received_events_url":"https://api.github.com/users/DynamoDS/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DynamoDS/Dynamo","description":"Visual Programming","fork":false,"url":"https://api.github.com/repos/DynamoDS/Dynamo","forks_url":"https://api.github.com/repos/DynamoDS/Dynamo/forks","keys_url":"https://api.github.com/repos/DynamoDS/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DynamoDS/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DynamoDS/Dynamo/teams","hooks_url":"https://api.github.com/repos/DynamoDS/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/DynamoDS/Dynamo/events","assignees_url":"https://api.github.com/repos/DynamoDS/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/DynamoDS/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/tags","blobs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/DynamoDS/Dynamo/languages","stargazers_url":"https://api.github.com/repos/DynamoDS/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/DynamoDS/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/DynamoDS/Dynamo/subscription","commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/comments{/number}","contents_url":"https://api.github.com/repos/DynamoDS/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/DynamoDS/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DynamoDS/Dynamo/merges","archive_url":"https://api.github.com/repos/DynamoDS/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DynamoDS/Dynamo/downloads","issues_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/DynamoDS/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/DynamoDS/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DynamoDS/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/DynamoDS/Dynamo/releases{/id}","created_at":"2012-02-09T07:35:33Z","updated_at":"2015-06-16T06:32:29Z","pushed_at":"2015-06-16T17:38:13Z","git_url":"git://github.com/DynamoDS/Dynamo.git","ssh_url":"git@github.com:DynamoDS/Dynamo.git","clone_url":"https://github.com/DynamoDS/Dynamo.git","svn_url":"https://github.com/DynamoDS/Dynamo","homepage":"http://dynamobim.org","size":975956,"stargazers_count":231,"watchers_count":231,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":177,"mirror_url":null,"open_issues_count":628,"forks":177,"open_issues":628,"watchers":231,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/4530"},"issue":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4530"},"comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/4530/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/4530/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/646387d8894cbe2c514111d59c96fea1df13ec2a"}}}}