Skip to content

Commit

Permalink
feat(search): add persons to cmd-k search (#18903)
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Nov 29, 2023
1 parent 53beba6 commit 2a2cb37
Show file tree
Hide file tree
Showing 20 changed files with 588 additions and 213 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified frontend/__snapshots__/components-command-bar--search.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions frontend/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ import {
RoleMemberType,
RolesListParams,
RoleType,
SearchListParams,
SearchResponse,
SessionRecordingPlaylistType,
SessionRecordingSnapshotResponse,
SessionRecordingsResponse,
Expand Down Expand Up @@ -461,6 +463,11 @@ class ApiRequest {
return this.persons().addPathComponent('activity')
}

// # Search
public search(teamId?: TeamType['id']): ApiRequest {
return this.projectsDetail(teamId).addPathComponent('search')
}

// # Annotations
public annotations(teamId?: TeamType['id']): ApiRequest {
return this.projectsDetail(teamId).addPathComponent('annotations')
Expand Down Expand Up @@ -1226,6 +1233,12 @@ const api = {
},
},

search: {
async list(params: SearchListParams): Promise<SearchResponse> {
return await new ApiRequest().search().withQueryString(toParams(params, true)).get()
},
},

sharing: {
async get({
dashboardId,
Expand Down
Loading

0 comments on commit 2a2cb37

Please sign in to comment.