{"action":"created","comment":{"url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/comments/178424209","pull_request_review_id":108485288,"id":178424209,"diff_hunk":"@@ -1,61 +1,58 @@\n import {BehaviorSubject} from 'rxjs/BehaviorSubject';\n import {Subject} from 'rxjs/Subject';\n import {\n+  AfterViewChecked,\n   AfterViewInit,\n+  ChangeDetectorRef,\n   Component,\n-  EventEmitter,\n   Injectable,\n   Input,\n   NgZone,\n   OnDestroy,\n-  OnInit,\n-  Output,\n-  ViewChild\n+  OnInit, QueryList,\n+  ViewChild,\n+  ViewChildren\n } from '@angular/core';\n import {ENTER} from '@angular/cdk/keycodes';\n import {FormControl} from '@angular/forms';\n import {ActivatedRoute, Router} from '@angular/router';\n import {Observable} from 'rxjs/Observable';\n import {Subscription} from 'rxjs/Subscription';\n import {\n+  MatAutocompleteTrigger,\n   MatPaginator,\n   MatPaginatorIntl,\n-  MatSnackBar,\n-  PageEvent\n+  PageEvent,\n } from '@angular/material';\n \n import {CapabilitiesService} from '../../core/capabilities.service';\n import {URLSearchParamsUtils} from '../utils/url-search-params.utils';\n import {JobStatus} from '../model/JobStatus';\n import {QueryJobsRequest} from '../model/QueryJobsRequest';\n-import {environment} from '../../../environments/environment';\n-import {FieldDataType, queryDataTypes, queryExtensionsDataTypes} from '../common';\n-import {MatMenuTrigger} from '@angular/material';\n+import {FieldDataType} from '../common';\n import {JobListView} from '../job-stream';\n+import {FilterChipComponent} from \"./chips/filter-chip.component\";\n \n @Component({\n   selector: 'jm-header',\n   templateUrl: './header.component.html',\n   styleUrls: ['./header.component.css'],\n })\n-export class HeaderComponent implements OnInit, AfterViewInit, OnDestroy {\n+export class HeaderComponent implements OnInit, AfterViewInit, AfterViewChecked, OnDestroy {\n   @Input() jobs: BehaviorSubject<JobListView>;\n   @Input() pageSize: number;\n+  @ViewChildren(FilterChipComponent) chipElements: QueryList<FilterChipComponent>;\n+  @ViewChild(MatAutocompleteTrigger) autocompleteTrigger: MatAutocompleteTrigger;\n   @ViewChild(MatPaginator) paginator: MatPaginator;\n   public pageSubject: Subject<PageEvent> = new Subject<PageEvent>();\n+  private chipToExpand: string;","path":"ui/src/app/shared/header/header.component.ts","position":null,"original_position":58,"commit_id":"db477beb97b18452b79044dbb121083ec11b765f","original_commit_id":"fe89203dc5001a8ca11fc75fe4f13afd1ccc9ca6","user":{"login":"alahwa","id":6598882,"avatar_url":"https://avatars0.githubusercontent.com/u/6598882?v=4","gravatar_id":"","url":"https://api.github.com/users/alahwa","html_url":"https://github.com/alahwa","followers_url":"https://api.github.com/users/alahwa/followers","following_url":"https://api.github.com/users/alahwa/following{/other_user}","gists_url":"https://api.github.com/users/alahwa/gists{/gist_id}","starred_url":"https://api.github.com/users/alahwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alahwa/subscriptions","organizations_url":"https://api.github.com/users/alahwa/orgs","repos_url":"https://api.github.com/users/alahwa/repos","events_url":"https://api.github.com/users/alahwa/events{/privacy}","received_events_url":"https://api.github.com/users/alahwa/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-03-31T06:00:29Z","updated_at":"2018-03-31T06:08:11Z","html_url":"https://github.com/DataBiosphere/job-manager/pull/248#discussion_r178424209","pull_request_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/comments/178424209"},"html":{"href":"https://github.com/DataBiosphere/job-manager/pull/248#discussion_r178424209"},"pull_request":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248"}},"in_reply_to_id":178416325},"pull_request":{"url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248","id":178655370,"html_url":"https://github.com/DataBiosphere/job-manager/pull/248","diff_url":"https://github.com/DataBiosphere/job-manager/pull/248.diff","patch_url":"https://github.com/DataBiosphere/job-manager/pull/248.patch","issue_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/248","number":248,"state":"open","locked":false,"title":"Open and focus chips on add","user":{"login":"alahwa","id":6598882,"avatar_url":"https://avatars0.githubusercontent.com/u/6598882?v=4","gravatar_id":"","url":"https://api.github.com/users/alahwa","html_url":"https://github.com/alahwa","followers_url":"https://api.github.com/users/alahwa/followers","following_url":"https://api.github.com/users/alahwa/following{/other_user}","gists_url":"https://api.github.com/users/alahwa/gists{/gist_id}","starred_url":"https://api.github.com/users/alahwa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alahwa/subscriptions","organizations_url":"https://api.github.com/users/alahwa/orgs","repos_url":"https://api.github.com/users/alahwa/repos","events_url":"https://api.github.com/users/alahwa/events{/privacy}","received_events_url":"https://api.github.com/users/alahwa/received_events","type":"User","site_admin":false},"body":"When new chips are added, open their menus and (if free text) focus the text box by default. This change was much larger than expected for a feature of this size.\r\n\r\nContext: Binding to the DOM and trying to manually trigger menu open, close, and focus events was causing buggy behavior primarily due to MatMenus being unable to handle having multiple MatMenuTriggers (one per chip). Fixing this behavior required restructuring the Header, splitting out chips into components, each handling their own MatMenu and associated Trigger. Functionality was further subdivided by chip type.\r\n\r\nBecause MatChips are nested in FilterChip components, we nest those in another layer of MatChips to prevent losing all of the functionality of having MatChips in a MatChipList.","created_at":"2018-03-31T00:06:37Z","updated_at":"2018-03-31T06:08:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b2150e130ecb205fedd8a4ef7bb15d468aa50762","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248/commits","review_comments_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248/comments","review_comment_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/248/comments","statuses_url":"https://api.github.com/repos/DataBiosphere/job-manager/statuses/db477beb97b18452b79044dbb121083ec11b765f","head":{"label":"DataBiosphere:ah/query-builder","ref":"ah/query-builder","sha":"db477beb97b18452b79044dbb121083ec11b765f","user":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":101917710,"name":"job-manager","full_name":"DataBiosphere/job-manager","owner":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/job-manager","description":"Job Manager API and UI for interacting with asynchronous batch jobs and workflows.","fork":false,"url":"https://api.github.com/repos/DataBiosphere/job-manager","forks_url":"https://api.github.com/repos/DataBiosphere/job-manager/forks","keys_url":"https://api.github.com/repos/DataBiosphere/job-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/job-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/job-manager/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/job-manager/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/job-manager/events","assignees_url":"https://api.github.com/repos/DataBiosphere/job-manager/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/job-manager/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/job-manager/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/job-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/job-manager/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/job-manager/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/job-manager/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/job-manager/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/job-manager/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/job-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/job-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/job-manager/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/job-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/job-manager/merges","archive_url":"https://api.github.com/repos/DataBiosphere/job-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/job-manager/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/job-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/job-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/job-manager/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/job-manager/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/job-manager/deployments","created_at":"2017-08-30T18:51:22Z","updated_at":"2018-03-30T20:14:30Z","pushed_at":"2018-03-31T06:04:45Z","git_url":"git://github.com/DataBiosphere/job-manager.git","ssh_url":"git@github.com:DataBiosphere/job-manager.git","clone_url":"https://github.com/DataBiosphere/job-manager.git","svn_url":"https://github.com/DataBiosphere/job-manager","homepage":"","size":964,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"base":{"label":"DataBiosphere:master","ref":"master","sha":"b45c8ac17af26f4a29959105bc7ef15e751072f3","user":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"repo":{"id":101917710,"name":"job-manager","full_name":"DataBiosphere/job-manager","owner":{"login":"DataBiosphere","id":32805087,"avatar_url":"https://avatars0.githubusercontent.com/u/32805087?v=4","gravatar_id":"","url":"https://api.github.com/users/DataBiosphere","html_url":"https://github.com/DataBiosphere","followers_url":"https://api.github.com/users/DataBiosphere/followers","following_url":"https://api.github.com/users/DataBiosphere/following{/other_user}","gists_url":"https://api.github.com/users/DataBiosphere/gists{/gist_id}","starred_url":"https://api.github.com/users/DataBiosphere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DataBiosphere/subscriptions","organizations_url":"https://api.github.com/users/DataBiosphere/orgs","repos_url":"https://api.github.com/users/DataBiosphere/repos","events_url":"https://api.github.com/users/DataBiosphere/events{/privacy}","received_events_url":"https://api.github.com/users/DataBiosphere/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/DataBiosphere/job-manager","description":"Job Manager API and UI for interacting with asynchronous batch jobs and workflows.","fork":false,"url":"https://api.github.com/repos/DataBiosphere/job-manager","forks_url":"https://api.github.com/repos/DataBiosphere/job-manager/forks","keys_url":"https://api.github.com/repos/DataBiosphere/job-manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DataBiosphere/job-manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DataBiosphere/job-manager/teams","hooks_url":"https://api.github.com/repos/DataBiosphere/job-manager/hooks","issue_events_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/events{/number}","events_url":"https://api.github.com/repos/DataBiosphere/job-manager/events","assignees_url":"https://api.github.com/repos/DataBiosphere/job-manager/assignees{/user}","branches_url":"https://api.github.com/repos/DataBiosphere/job-manager/branches{/branch}","tags_url":"https://api.github.com/repos/DataBiosphere/job-manager/tags","blobs_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DataBiosphere/job-manager/statuses/{sha}","languages_url":"https://api.github.com/repos/DataBiosphere/job-manager/languages","stargazers_url":"https://api.github.com/repos/DataBiosphere/job-manager/stargazers","contributors_url":"https://api.github.com/repos/DataBiosphere/job-manager/contributors","subscribers_url":"https://api.github.com/repos/DataBiosphere/job-manager/subscribers","subscription_url":"https://api.github.com/repos/DataBiosphere/job-manager/subscription","commits_url":"https://api.github.com/repos/DataBiosphere/job-manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/DataBiosphere/job-manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/DataBiosphere/job-manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/DataBiosphere/job-manager/contents/{+path}","compare_url":"https://api.github.com/repos/DataBiosphere/job-manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DataBiosphere/job-manager/merges","archive_url":"https://api.github.com/repos/DataBiosphere/job-manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DataBiosphere/job-manager/downloads","issues_url":"https://api.github.com/repos/DataBiosphere/job-manager/issues{/number}","pulls_url":"https://api.github.com/repos/DataBiosphere/job-manager/pulls{/number}","milestones_url":"https://api.github.com/repos/DataBiosphere/job-manager/milestones{/number}","notifications_url":"https://api.github.com/repos/DataBiosphere/job-manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DataBiosphere/job-manager/labels{/name}","releases_url":"https://api.github.com/repos/DataBiosphere/job-manager/releases{/id}","deployments_url":"https://api.github.com/repos/DataBiosphere/job-manager/deployments","created_at":"2017-08-30T18:51:22Z","updated_at":"2018-03-30T20:14:30Z","pushed_at":"2018-03-31T06:04:45Z","git_url":"git://github.com/DataBiosphere/job-manager.git","ssh_url":"git@github.com:DataBiosphere/job-manager.git","clone_url":"https://github.com/DataBiosphere/job-manager.git","svn_url":"https://github.com/DataBiosphere/job-manager","homepage":"","size":964,"stargazers_count":4,"watchers_count":4,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":5,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause"},"forks":0,"open_issues":5,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248"},"html":{"href":"https://github.com/DataBiosphere/job-manager/pull/248"},"issue":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/issues/248"},"comments":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/issues/248/comments"},"review_comments":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248/comments"},"review_comment":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/pulls/248/commits"},"statuses":{"href":"https://api.github.com/repos/DataBiosphere/job-manager/statuses/db477beb97b18452b79044dbb121083ec11b765f"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"alahwa"}}