{"action":"created","comment":{"url":"https://api.github.com/repos/mono/monodevelop/pulls/comments/187352159","pull_request_review_id":119114684,"id":187352159,"diff_hunk":"@@ -322,55 +347,82 @@ public DockNotebookTab InsertTab (int index)\n \t\t\treturn tab;\n \t\t}\n \n-\t\tvoid UpdateIndexes (int startIndex)\n+\t\tvoid UpdateIndexes (List<DockNotebookTab> tabs, int startIndex)\n \t\t{\n-\t\t\tfor (int n=startIndex; n < pages.Count; n++)\n-\t\t\t\t((DockNotebookTab)pages [n]).Index = n;\n+\t\t\tfor (int n = startIndex; n < tabs.Count; n++)\n+\t\t\t\ttabs [n].Index = n;\n \t\t}\n \n \t\tpublic DockNotebookTab GetTab (int n)\n \t\t{\n-\t\t\tif (n < 0 || n >= pages.Count)\n+\t\t\treturn GetBaseTab (pages, n);\n+\t\t}\n+\n+\t\tpublic DockNotebookTab GetPreviewTab (int n)\n+\t\t{\n+\t\t\treturn GetBaseTab (previewPages, n);\n+\t\t}\n+\n+\t\tDockNotebookTab GetBaseTab (List<DockNotebookTab> col, int n)\n+\t\t{\n+\t\t\tif (n < 0 || n >= col.Count)\n \t\t\t\treturn null;\n \t\t\telse\n-\t\t\t\treturn pages [n];\n+\t\t\t\treturn col [n];\n \t\t}\n \n-\t\tpublic void RemoveTab (int page, bool animate)\n+\t\tpublic void RemoveTab (DockNotebookTab tab, bool animate)\n \t\t{\n-\t\t\tvar tab = pages [page];\n+\t\t\tvar list = GetCollection (tab.IsPreview);\n+\n \t\t\tif (animate)\n \t\t\t\ttabStrip.StartCloseAnimation ((DockNotebookTab)tab);\n \t\t\tpagesHistory.Remove (tab);\n-\t\t\tif (pages.Count == 1)\n-\t\t\t\tCurrentTab = null;\n-\t\t\telse if (page == CurrentTabIndex)\n-\t\t\t\tSelectLastActiveTab (page);\n-\t\t\tpages.RemoveAt (page);\n-\t\t\tUpdateIndexes (page);\n+\n+\t\t\tlist.Remove (tab);\n+\n+\t\t\tSelectLastActiveTab (tab);\n+\n+\t\t\tUpdateIndexes (list, tab.Index);\n+\n \t\t\ttabStrip.Update ();\n-\t\t\ttabStrip.DropDownButton.Sensitive = pages.Count > 0;\n+\t\t\ttabStrip.DropDownButton.Sensitive = list.Count > 0;\n \n \t\t\tPageRemoved?.Invoke (this, new TabEventArgs { Tab = tab });\n \n \t\t\tNotebookChanged?.Invoke (this, EventArgs.Empty);\n \t\t}\n \n+\t\tinternal void ChangeTabToPreview (DockNotebookTab tab)\n+\t\t{\n+\t\t\tpages.Remove (tab);\n+\t\t\tif (!previewPages.Exists (s => s == tab)) {","path":"main/src/core/MonoDevelop.Ide/MonoDevelop.Components.DockNotebook/DockNotebook.cs","position":202,"original_position":202,"commit_id":"3562bc34cd462a68d33beab8ca1c058b309498c2","original_commit_id":"3562bc34cd462a68d33beab8ca1c058b309498c2","user":{"login":"slluis","id":260349,"avatar_url":"https://avatars2.githubusercontent.com/u/260349?v=4","gravatar_id":"","url":"https://api.github.com/users/slluis","html_url":"https://github.com/slluis","followers_url":"https://api.github.com/users/slluis/followers","following_url":"https://api.github.com/users/slluis/following{/other_user}","gists_url":"https://api.github.com/users/slluis/gists{/gist_id}","starred_url":"https://api.github.com/users/slluis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/slluis/subscriptions","organizations_url":"https://api.github.com/users/slluis/orgs","repos_url":"https://api.github.com/users/slluis/repos","events_url":"https://api.github.com/users/slluis/events{/privacy}","received_events_url":"https://api.github.com/users/slluis/received_events","type":"User","site_admin":false},"body":"Also, do nothing if the page is already a preview page.","created_at":"2018-05-10T14:45:26Z","updated_at":"2018-05-10T14:45:26Z","html_url":"https://github.com/mono/monodevelop/pull/3860#discussion_r187352159","pull_request_url":"https://api.github.com/repos/mono/monodevelop/pulls/3860","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/comments/187352159"},"html":{"href":"https://github.com/mono/monodevelop/pull/3860#discussion_r187352159"},"pull_request":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/3860"}},"in_reply_to_id":187345374},"pull_request":{"url":"https://api.github.com/repos/mono/monodevelop/pulls/3860","id":169334548,"html_url":"https://github.com/mono/monodevelop/pull/3860","diff_url":"https://github.com/mono/monodevelop/pull/3860.diff","patch_url":"https://github.com/mono/monodevelop/pull/3860.patch","issue_url":"https://api.github.com/repos/mono/monodevelop/issues/3860","number":3860,"state":"open","locked":false,"title":"Preview tabs","user":{"login":"netonjm","id":1587480,"avatar_url":"https://avatars0.githubusercontent.com/u/1587480?v=4","gravatar_id":"","url":"https://api.github.com/users/netonjm","html_url":"https://github.com/netonjm","followers_url":"https://api.github.com/users/netonjm/followers","following_url":"https://api.github.com/users/netonjm/following{/other_user}","gists_url":"https://api.github.com/users/netonjm/gists{/gist_id}","starred_url":"https://api.github.com/users/netonjm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/netonjm/subscriptions","organizations_url":"https://api.github.com/users/netonjm/orgs","repos_url":"https://api.github.com/users/netonjm/repos","events_url":"https://api.github.com/users/netonjm/events{/privacy}","received_events_url":"https://api.github.com/users/netonjm/received_events","type":"User","site_admin":false},"body":"Adds feature in our TabStrip to include a new container with a new type of Tabs, the Preview Tabs.\r\nThey are aligned to the right of the screen. In the moment there are one in our content a decorative purple line appears at the bottom of them.\r\n\r\n![image](https://user-images.githubusercontent.com/1587480/37478322-31382350-287a-11e8-941a-4fd04abdcfc9.png)\r\n\r\nThis PR wants merge the current feature **disabled in master**. These tabs can only be enabled  overriding IsPreview property in a ViewContent class and with this simple Patch:\r\nhttps://gist.github.com/netonjm/2d0bc8ac73ff88097dac060ec7c5388f\r\n\r\nThe objective is check we don't have any regression with the normal behaviour of the tabs, because there are some important things changed related to indexing (now we have two containers).\r\n\r\nTesting the feature:\r\n\r\n* Try use shorcuts number to change the tabs\r\n* Try navigate the history next/previous \r\n* Try test accessibility keys\r\n* Try drop tabs into new windows, split documents etc...\r\n* Try resize window and discover odd behaviours in sizes\r\n* ....\r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2018-02-15T10:36:04Z","updated_at":"2018-05-10T14:45:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"151c934b14a5912bc362c10a4c0526ce134b4340","assignee":null,"assignees":[],"requested_reviewers":[{"login":"sevoku","id":951587,"avatar_url":"https://avatars2.githubusercontent.com/u/951587?v=4","gravatar_id":"","url":"https://api.github.com/users/sevoku","html_url":"https://github.com/sevoku","followers_url":"https://api.github.com/users/sevoku/followers","following_url":"https://api.github.com/users/sevoku/following{/other_user}","gists_url":"https://api.github.com/users/sevoku/gists{/gist_id}","starred_url":"https://api.github.com/users/sevoku/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sevoku/subscriptions","organizations_url":"https://api.github.com/users/sevoku/orgs","repos_url":"https://api.github.com/users/sevoku/repos","events_url":"https://api.github.com/users/sevoku/events{/privacy}","received_events_url":"https://api.github.com/users/sevoku/received_events","type":"User","site_admin":false},{"login":"iainx","id":1253364,"avatar_url":"https://avatars2.githubusercontent.com/u/1253364?v=4","gravatar_id":"","url":"https://api.github.com/users/iainx","html_url":"https://github.com/iainx","followers_url":"https://api.github.com/users/iainx/followers","following_url":"https://api.github.com/users/iainx/following{/other_user}","gists_url":"https://api.github.com/users/iainx/gists{/gist_id}","starred_url":"https://api.github.com/users/iainx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iainx/subscriptions","organizations_url":"https://api.github.com/users/iainx/orgs","repos_url":"https://api.github.com/users/iainx/repos","events_url":"https://api.github.com/users/iainx/events{/privacy}","received_events_url":"https://api.github.com/users/iainx/received_events","type":"User","site_admin":false},{"login":"rodrmoya","id":1873039,"avatar_url":"https://avatars2.githubusercontent.com/u/1873039?v=4","gravatar_id":"","url":"https://api.github.com/users/rodrmoya","html_url":"https://github.com/rodrmoya","followers_url":"https://api.github.com/users/rodrmoya/followers","following_url":"https://api.github.com/users/rodrmoya/following{/other_user}","gists_url":"https://api.github.com/users/rodrmoya/gists{/gist_id}","starred_url":"https://api.github.com/users/rodrmoya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rodrmoya/subscriptions","organizations_url":"https://api.github.com/users/rodrmoya/orgs","repos_url":"https://api.github.com/users/rodrmoya/repos","events_url":"https://api.github.com/users/rodrmoya/events{/privacy}","received_events_url":"https://api.github.com/users/rodrmoya/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/mono/monodevelop/pulls/3860/commits","review_comments_url":"https://api.github.com/repos/mono/monodevelop/pulls/3860/comments","review_comment_url":"https://api.github.com/repos/mono/monodevelop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mono/monodevelop/issues/3860/comments","statuses_url":"https://api.github.com/repos/mono/monodevelop/statuses/3562bc34cd462a68d33beab8ca1c058b309498c2","head":{"label":"mono:preview-tabs","ref":"preview-tabs","sha":"3562bc34cd462a68d33beab8ca1c058b309498c2","user":{"login":"mono","id":53395,"avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791299,"name":"monodevelop","full_name":"mono/monodevelop","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/monodevelop","description":"MonoDevelop is a cross platform .NET IDE","fork":false,"url":"https://api.github.com/repos/mono/monodevelop","forks_url":"https://api.github.com/repos/mono/monodevelop/forks","keys_url":"https://api.github.com/repos/mono/monodevelop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/monodevelop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/monodevelop/teams","hooks_url":"https://api.github.com/repos/mono/monodevelop/hooks","issue_events_url":"https://api.github.com/repos/mono/monodevelop/issues/events{/number}","events_url":"https://api.github.com/repos/mono/monodevelop/events","assignees_url":"https://api.github.com/repos/mono/monodevelop/assignees{/user}","branches_url":"https://api.github.com/repos/mono/monodevelop/branches{/branch}","tags_url":"https://api.github.com/repos/mono/monodevelop/tags","blobs_url":"https://api.github.com/repos/mono/monodevelop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/monodevelop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/monodevelop/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/monodevelop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/monodevelop/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/monodevelop/languages","stargazers_url":"https://api.github.com/repos/mono/monodevelop/stargazers","contributors_url":"https://api.github.com/repos/mono/monodevelop/contributors","subscribers_url":"https://api.github.com/repos/mono/monodevelop/subscribers","subscription_url":"https://api.github.com/repos/mono/monodevelop/subscription","commits_url":"https://api.github.com/repos/mono/monodevelop/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/monodevelop/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/monodevelop/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/monodevelop/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/monodevelop/contents/{+path}","compare_url":"https://api.github.com/repos/mono/monodevelop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/monodevelop/merges","archive_url":"https://api.github.com/repos/mono/monodevelop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/monodevelop/downloads","issues_url":"https://api.github.com/repos/mono/monodevelop/issues{/number}","pulls_url":"https://api.github.com/repos/mono/monodevelop/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/monodevelop/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/monodevelop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/monodevelop/labels{/name}","releases_url":"https://api.github.com/repos/mono/monodevelop/releases{/id}","deployments_url":"https://api.github.com/repos/mono/monodevelop/deployments","created_at":"2010-07-22T16:09:08Z","updated_at":"2018-05-10T14:12:54Z","pushed_at":"2018-05-10T14:12:42Z","git_url":"git://github.com/mono/monodevelop.git","ssh_url":"git@github.com:mono/monodevelop.git","clone_url":"https://github.com/mono/monodevelop.git","svn_url":"https://github.com/mono/monodevelop","homepage":"http://www.monodevelop.com","size":327735,"stargazers_count":2064,"watchers_count":2064,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":810,"mirror_url":null,"archived":false,"open_issues_count":344,"license":null,"forks":810,"open_issues":344,"watchers":2064,"default_branch":"master"}},"base":{"label":"mono:master","ref":"master","sha":"2ddc631cf0c8e5134a02df7c99f991419aeb84fb","user":{"login":"mono","id":53395,"avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"repo":{"id":791299,"name":"monodevelop","full_name":"mono/monodevelop","owner":{"login":"mono","id":53395,"avatar_url":"https://avatars3.githubusercontent.com/u/53395?v=4","gravatar_id":"","url":"https://api.github.com/users/mono","html_url":"https://github.com/mono","followers_url":"https://api.github.com/users/mono/followers","following_url":"https://api.github.com/users/mono/following{/other_user}","gists_url":"https://api.github.com/users/mono/gists{/gist_id}","starred_url":"https://api.github.com/users/mono/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mono/subscriptions","organizations_url":"https://api.github.com/users/mono/orgs","repos_url":"https://api.github.com/users/mono/repos","events_url":"https://api.github.com/users/mono/events{/privacy}","received_events_url":"https://api.github.com/users/mono/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mono/monodevelop","description":"MonoDevelop is a cross platform .NET IDE","fork":false,"url":"https://api.github.com/repos/mono/monodevelop","forks_url":"https://api.github.com/repos/mono/monodevelop/forks","keys_url":"https://api.github.com/repos/mono/monodevelop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mono/monodevelop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mono/monodevelop/teams","hooks_url":"https://api.github.com/repos/mono/monodevelop/hooks","issue_events_url":"https://api.github.com/repos/mono/monodevelop/issues/events{/number}","events_url":"https://api.github.com/repos/mono/monodevelop/events","assignees_url":"https://api.github.com/repos/mono/monodevelop/assignees{/user}","branches_url":"https://api.github.com/repos/mono/monodevelop/branches{/branch}","tags_url":"https://api.github.com/repos/mono/monodevelop/tags","blobs_url":"https://api.github.com/repos/mono/monodevelop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mono/monodevelop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mono/monodevelop/git/refs{/sha}","trees_url":"https://api.github.com/repos/mono/monodevelop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mono/monodevelop/statuses/{sha}","languages_url":"https://api.github.com/repos/mono/monodevelop/languages","stargazers_url":"https://api.github.com/repos/mono/monodevelop/stargazers","contributors_url":"https://api.github.com/repos/mono/monodevelop/contributors","subscribers_url":"https://api.github.com/repos/mono/monodevelop/subscribers","subscription_url":"https://api.github.com/repos/mono/monodevelop/subscription","commits_url":"https://api.github.com/repos/mono/monodevelop/commits{/sha}","git_commits_url":"https://api.github.com/repos/mono/monodevelop/git/commits{/sha}","comments_url":"https://api.github.com/repos/mono/monodevelop/comments{/number}","issue_comment_url":"https://api.github.com/repos/mono/monodevelop/issues/comments{/number}","contents_url":"https://api.github.com/repos/mono/monodevelop/contents/{+path}","compare_url":"https://api.github.com/repos/mono/monodevelop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mono/monodevelop/merges","archive_url":"https://api.github.com/repos/mono/monodevelop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mono/monodevelop/downloads","issues_url":"https://api.github.com/repos/mono/monodevelop/issues{/number}","pulls_url":"https://api.github.com/repos/mono/monodevelop/pulls{/number}","milestones_url":"https://api.github.com/repos/mono/monodevelop/milestones{/number}","notifications_url":"https://api.github.com/repos/mono/monodevelop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mono/monodevelop/labels{/name}","releases_url":"https://api.github.com/repos/mono/monodevelop/releases{/id}","deployments_url":"https://api.github.com/repos/mono/monodevelop/deployments","created_at":"2010-07-22T16:09:08Z","updated_at":"2018-05-10T14:12:54Z","pushed_at":"2018-05-10T14:12:42Z","git_url":"git://github.com/mono/monodevelop.git","ssh_url":"git@github.com:mono/monodevelop.git","clone_url":"https://github.com/mono/monodevelop.git","svn_url":"https://github.com/mono/monodevelop","homepage":"http://www.monodevelop.com","size":327735,"stargazers_count":2064,"watchers_count":2064,"language":"C#","has_issues":true,"has_projects":true,"has_downloads":false,"has_wiki":true,"has_pages":false,"forks_count":810,"mirror_url":null,"archived":false,"open_issues_count":344,"license":null,"forks":810,"open_issues":344,"watchers":2064,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/3860"},"html":{"href":"https://github.com/mono/monodevelop/pull/3860"},"issue":{"href":"https://api.github.com/repos/mono/monodevelop/issues/3860"},"comments":{"href":"https://api.github.com/repos/mono/monodevelop/issues/3860/comments"},"review_comments":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/3860/comments"},"review_comment":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mono/monodevelop/pulls/3860/commits"},"statuses":{"href":"https://api.github.com/repos/mono/monodevelop/statuses/3562bc34cd462a68d33beab8ca1c058b309498c2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"slluis"}}