{"action":"closed","number":6290,"pull_request":{"url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290","id":63709177,"html_url":"https://github.com/DynamoDS/Dynamo/pull/6290","diff_url":"https://github.com/DynamoDS/Dynamo/pull/6290.diff","patch_url":"https://github.com/DynamoDS/Dynamo/pull/6290.patch","issue_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/6290","number":6290,"state":"closed","locked":false,"title":"MAGN-9745 Align Selection tools missing from context menu in 1.0","user":{"login":"marimano","id":7658189,"avatar_url":"https://avatars.githubusercontent.com/u/7658189?v=3","gravatar_id":"","url":"https://api.github.com/users/marimano","html_url":"https://github.com/marimano","followers_url":"https://api.github.com/users/marimano/followers","following_url":"https://api.github.com/users/marimano/following{/other_user}","gists_url":"https://api.github.com/users/marimano/gists{/gist_id}","starred_url":"https://api.github.com/users/marimano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marimano/subscriptions","organizations_url":"https://api.github.com/users/marimano/orgs","repos_url":"https://api.github.com/users/marimano/repos","events_url":"https://api.github.com/users/marimano/events{/privacy}","received_events_url":"https://api.github.com/users/marimano/received_events","type":"User","site_admin":false},"body":"### Purpose\r\n\r\nWhen MenuItem is put not in Menu container, it is not able to open its submenu on mouse hover automatically.\r\nSeveral solutions were tried:\r\n- setting trigger for MenuItem as next\r\n```\r\n<Trigger Property=\"IsMouseOver\" Value=\"True\">\r\n   <Setter Property=\"IsSubmenuOpen\" Value=\"True\"/>\r\n</Trigger>\r\n<Trigger Property=\"IsMouseOver\" Value=\"False\">\r\n  <Setter Property=\"IsSubmenuOpen\" Value=\"False\"/>\r\n</Trigger>\r\n```\r\nworks fine unless an item in submenu is clicked: `IsMouseOver` stops triggering\r\n- subscribing on `MouseEnter` event interferes with highlighting mechanism: highlight disappers from item with a delay, so at a time you can see several highlighted items:\r\n![image](https://cloud.githubusercontent.com/assets/7658189/13950782/9496816e-f035-11e5-87d9-b85811b5d4fa.png)\r\nand when a subitem is clicked the item stays highlighted on context menu re-opening. `IsHighlighted` property has protected setter, so we cannot set desired value in our `MouseLeave` handler\r\n\r\nSo, MenuItem is overriden to open its submenu on `MouseEnter` and hide it on `MouseLeave` with immediate removing highlight:\r\n![image](https://cloud.githubusercontent.com/assets/7658189/13950869/1f37fc6c-f036-11e5-9395-1fa5ee60869a.png)\r\n\r\n### Declarations\r\n\r\n- [x] The code base is in a better state after this PR\r\n- [x] Is documented according to the [standards](https://github.com/DynamoDS/Dynamo/wiki/Coding-Standards)\r\n- [x] The level of testing this PR includes is appropriate\r\n- [ ] User facing strings, if any, are extracted into `*.resx` files\r\n- [x] All tests pass using the self-service CI:\r\n![image](https://cloud.githubusercontent.com/assets/7658189/13950884/419ebffc-f036-11e5-88ef-63f710f2e834.png)\r\n- [x] Snapshot of UI changes, if any.\r\n\r\n### Reviewers\r\n\r\n@aosyatnik ","created_at":"2016-03-22T12:05:06Z","updated_at":"2016-03-23T08:29:17Z","closed_at":"2016-03-23T08:29:17Z","merged_at":"2016-03-23T08:29:17Z","merge_commit_sha":"4f29f4442145eac047e9bef54475f4a32cfe5b39","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290/commits","review_comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290/comments","review_comment_url":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DynamoDS/Dynamo/issues/6290/comments","statuses_url":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/06fc0c9c05393cf870e82f07a6d6b924b23c0d8d","head":{"label":"marimano:context-menu-item","ref":"context-menu-item","sha":"06fc0c9c05393cf870e82f07a6d6b924b23c0d8d","user":{"login":"marimano","id":7658189,"avatar_url":"https://avatars.githubusercontent.com/u/7658189?v=3","gravatar_id":"","url":"https://api.github.com/users/marimano","html_url":"https://github.com/marimano","followers_url":"https://api.github.com/users/marimano/followers","following_url":"https://api.github.com/users/marimano/following{/other_user}","gists_url":"https://api.github.com/users/marimano/gists{/gist_id}","starred_url":"https://api.github.com/users/marimano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marimano/subscriptions","organizations_url":"https://api.github.com/users/marimano/orgs","repos_url":"https://api.github.com/users/marimano/repos","events_url":"https://api.github.com/users/marimano/events{/privacy}","received_events_url":"https://api.github.com/users/marimano/received_events","type":"User","site_admin":false},"repo":{"id":22464277,"name":"Dynamo","full_name":"marimano/Dynamo","owner":{"login":"marimano","id":7658189,"avatar_url":"https://avatars.githubusercontent.com/u/7658189?v=3","gravatar_id":"","url":"https://api.github.com/users/marimano","html_url":"https://github.com/marimano","followers_url":"https://api.github.com/users/marimano/followers","following_url":"https://api.github.com/users/marimano/following{/other_user}","gists_url":"https://api.github.com/users/marimano/gists{/gist_id}","starred_url":"https://api.github.com/users/marimano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marimano/subscriptions","organizations_url":"https://api.github.com/users/marimano/orgs","repos_url":"https://api.github.com/users/marimano/repos","events_url":"https://api.github.com/users/marimano/events{/privacy}","received_events_url":"https://api.github.com/users/marimano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marimano/Dynamo","description":"Visual Programming For Revit","fork":true,"url":"https://api.github.com/repos/marimano/Dynamo","forks_url":"https://api.github.com/repos/marimano/Dynamo/forks","keys_url":"https://api.github.com/repos/marimano/Dynamo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marimano/Dynamo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marimano/Dynamo/teams","hooks_url":"https://api.github.com/repos/marimano/Dynamo/hooks","issue_events_url":"https://api.github.com/repos/marimano/Dynamo/issues/events{/number}","events_url":"https://api.github.com/repos/marimano/Dynamo/events","assignees_url":"https://api.github.com/repos/marimano/Dynamo/assignees{/user}","branches_url":"https://api.github.com/repos/marimano/Dynamo/branches{/branch}","tags_url":"https://api.github.com/repos/marimano/Dynamo/tags","blobs_url":"https://api.github.com/repos/marimano/Dynamo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marimano/Dynamo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marimano/Dynamo/git/refs{/sha}","trees_url":"https://api.github.com/repos/marimano/Dynamo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marimano/Dynamo/statuses/{sha}","languages_url":"https://api.github.com/repos/marimano/Dynamo/languages","stargazers_url":"https://api.github.com/repos/marimano/Dynamo/stargazers","contributors_url":"https://api.github.com/repos/marimano/Dynamo/contributors","subscribers_url":"https://api.github.com/repos/marimano/Dynamo/subscribers","subscription_url":"https://api.github.com/repos/marimano/Dynamo/subscription","commits_url":"https://api.github.com/repos/marimano/Dynamo/commits{/sha}","git_commits_url":"https://api.github.com/repos/marimano/Dynamo/git/commits{/sha}","comments_url":"https://api.github.com/repos/marimano/Dynamo/comments{/number}","issue_comment_url":"https://api.github.com/repos/marimano/Dynamo/issues/comments{/number}","contents_url":"https://api.github.com/repos/marimano/Dynamo/contents/{+path}","compare_url":"https://api.github.com/repos/marimano/Dynamo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marimano/Dynamo/merges","archive_url":"https://api.github.com/repos/marimano/Dynamo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marimano/Dynamo/downloads","issues_url":"https://api.github.com/repos/marimano/Dynamo/issues{/number}","pulls_url":"https://api.github.com/repos/marimano/Dynamo/pulls{/number}","milestones_url":"https://api.github.com/repos/marimano/Dynamo/milestones{/number}","notifications_url":"https://api.github.com/repos/marimano/Dynamo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marimano/Dynamo/labels{/name}","releases_url":"https://api.github.com/repos/marimano/Dynamo/releases{/id}","deployments_url":"https://api.github.com/repos/marimano/Dynamo/deployments","created_at":"2014-07-31T09:45:07Z","updated_at":"2014-07-31T02:37:47Z","pushed_at":"2016-03-22T11:08:59Z","git_url":"git://github.com/marimano/Dynamo.git","ssh_url":"git@github.com:marimano/Dynamo.git","clone_url":"https://github.com/marimano/Dynamo.git","svn_url":"https://github.com/marimano/Dynamo","homepage":"http://dynamobim.org","size":847830,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"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":"abddd46e1d0c384f77d9397d83d35297368ce8a7","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}","deployments_url":"https://api.github.com/repos/DynamoDS/Dynamo/deployments","created_at":"2012-02-09T07:35:33Z","updated_at":"2016-03-22T21:26:21Z","pushed_at":"2016-03-23T08:29:17Z","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":1101003,"stargazers_count":318,"watchers_count":318,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":231,"mirror_url":null,"open_issues_count":886,"forks":231,"open_issues":886,"watchers":318,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290"},"html":{"href":"https://github.com/DynamoDS/Dynamo/pull/6290"},"issue":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/6290"},"comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/issues/6290/comments"},"review_comments":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290/comments"},"review_comment":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/pulls/6290/commits"},"statuses":{"href":"https://api.github.com/repos/DynamoDS/Dynamo/statuses/06fc0c9c05393cf870e82f07a6d6b924b23c0d8d"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"marimano","id":7658189,"avatar_url":"https://avatars.githubusercontent.com/u/7658189?v=3","gravatar_id":"","url":"https://api.github.com/users/marimano","html_url":"https://github.com/marimano","followers_url":"https://api.github.com/users/marimano/followers","following_url":"https://api.github.com/users/marimano/following{/other_user}","gists_url":"https://api.github.com/users/marimano/gists{/gist_id}","starred_url":"https://api.github.com/users/marimano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marimano/subscriptions","organizations_url":"https://api.github.com/users/marimano/orgs","repos_url":"https://api.github.com/users/marimano/repos","events_url":"https://api.github.com/users/marimano/events{/privacy}","received_events_url":"https://api.github.com/users/marimano/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":2,"additions":53,"deletions":7,"changed_files":4}}