Skip to content

Commit

Permalink
Add ability to sort by starred status (#2169)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattseddon authored Aug 10, 2022
1 parent 49cf300 commit a4b4bbd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion extension/src/experiments/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,9 @@ export class Experiments extends BaseRepository<TableData> {

public async addSort() {
const columns = this.columns.getTerminalNodes()
const sortToAdd = await pickSortToAdd(columns)
const columnLikes = addStarredToColumns(columns)

const sortToAdd = await pickSortToAdd(columnLikes)
if (!sortToAdd) {
return
}
Expand Down
4 changes: 2 additions & 2 deletions extension/src/experiments/model/sortBy/quickPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { definedAndNonEmpty } from '../../../util/array'
import { quickPickManyValues, quickPickValue } from '../../../vscode/quickPick'
import { Title } from '../../../vscode/title'
import { Toast } from '../../../vscode/toast'
import { ColumnLike } from '../../columns/like'
import { pickFromColumnLikes } from '../../columns/quickPick'
import { Column } from '../../webview/contract'

export const pickSortToAdd = async (columns: Column[]) => {
export const pickSortToAdd = async (columns: ColumnLike[] | undefined) => {
const picked = await pickFromColumnLikes(columns, {
title: Title.SELECT_PARAM_OR_METRIC_SORT
})
Expand Down

0 comments on commit a4b4bbd

Please sign in to comment.