File tree Expand file tree Collapse file tree 3 files changed +37
-7
lines changed
components/nav/issueViews Expand file tree Collapse file tree 3 files changed +37
-7
lines changed Original file line number Diff line number Diff line change @@ -201,6 +201,8 @@ export function IssueViewNavItems({
201201 ...v ,
202202 isAllProjects : isEqual ( v . projects , [ - 1 ] ) ,
203203 name : v . label ,
204+ lastVisited : null ,
205+ visibility : 'owner' ,
204206 } ) )
205207 ) ;
206208 } ,
@@ -242,6 +244,8 @@ export function IssueViewNavItems({
242244 ...v ,
243245 isAllProjects : isEqual ( v . projects , [ - 1 ] ) ,
244246 name : v . label ,
247+ lastVisited : null ,
248+ visibility : 'owner' ,
245249 } ) )
246250 ) ;
247251 }
Original file line number Diff line number Diff line change 1- import type { UseApiQueryOptions } from 'sentry/utils/queryClient' ;
1+ import type { ApiQueryKey , UseApiQueryOptions } from 'sentry/utils/queryClient' ;
22import { useApiQuery } from 'sentry/utils/queryClient' ;
3- import type { GroupSearchView } from 'sentry/views/issueList/types' ;
3+ import type {
4+ GroupSearchView ,
5+ GroupSearchViewVisibility ,
6+ } from 'sentry/views/issueList/types' ;
47
58type FetchGroupSearchViewsParameters = {
69 orgSlug : string ;
10+ cursor ?: string ;
11+ limit ?: number ;
12+ visibility ?: GroupSearchViewVisibility ;
713} ;
814
915export const makeFetchGroupSearchViewsKey = ( {
1016 orgSlug,
11- } : FetchGroupSearchViewsParameters ) =>
12- [ `/organizations/${ orgSlug } /group-search-views/` ] as const ;
17+ visibility,
18+ limit,
19+ cursor,
20+ } : FetchGroupSearchViewsParameters ) : ApiQueryKey =>
21+ [
22+ `/organizations/${ orgSlug } /group-search-views/` ,
23+ {
24+ query : {
25+ per_page : limit ,
26+ visibility,
27+ cursor,
28+ } ,
29+ } ,
30+ ] as const ;
1331
1432export const useFetchGroupSearchViews = (
15- { orgSlug } : FetchGroupSearchViewsParameters ,
33+ parameters : FetchGroupSearchViewsParameters ,
1634 options : Partial < UseApiQueryOptions < GroupSearchView [ ] > > = { }
1735) => {
18- return useApiQuery < GroupSearchView [ ] > ( makeFetchGroupSearchViewsKey ( { orgSlug } ) , {
36+ return useApiQuery < GroupSearchView [ ] > ( makeFetchGroupSearchViewsKey ( parameters ) , {
1937 staleTime : Infinity ,
2038 ...options ,
2139 } ) ;
Original file line number Diff line number Diff line change @@ -16,17 +16,25 @@ export type IssueUpdateData =
1616 | MarkReviewed
1717 | GroupStatusResolution ;
1818
19+ export enum GroupSearchViewVisibility {
20+ OWNER = 'owner' ,
21+ ORGANIZATION = 'organization' ,
22+ }
23+
1924export type GroupSearchView = {
2025 environments : string [ ] ;
2126 id : string ;
27+ lastVisited : string | null ;
2228 name : string ;
2329 projects : number [ ] ;
2430 query : string ;
2531 querySort : IssueSortOptions ;
2632 timeFilters : PageFilters [ 'datetime' ] ;
33+ visibility : GroupSearchViewVisibility ;
2734} ;
2835
29- export interface UpdateGroupSearchViewPayload extends Omit < GroupSearchView , 'id' > {
36+ export interface UpdateGroupSearchViewPayload
37+ extends Omit < GroupSearchView , 'id' | 'lastVisited' | 'visibility' > {
3038 environments : string [ ] ;
3139 projects : number [ ] ;
3240 timeFilters : PageFilters [ 'datetime' ] ;
You can’t perform that action at this time.
0 commit comments