-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add option to filter experiments to starred #2164
Conversation
ffa838c
to
ddca177
Compare
@@ -0,0 +1,22 @@ | |||
import { Column } from '../webview/contract' | |||
|
|||
export type ColumnLike = { label: string; path: string; types?: string[] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] This definition is used in the quick pick. It means that we don't have to create a full mocked Column
for "starred".
@@ -128,7 +128,7 @@ export class ExperimentsModel extends ModelWithPersistence { | |||
|
|||
public toggleStatus(id: string) { | |||
if ( | |||
this.flattenExperiments().find(({ id: queuedId }) => queuedId === id) | |||
this.getFlattenedExperiments().find(({ id: queuedId }) => queuedId === id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[F] The main change in this file was to encapsulate access to experiments and checkpoints so that details (selected and starred) are always added.
Code Climate has analyzed commit 88351a6 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 97.3% (85% is the threshold). This pull request will bring the total coverage in the repository to 96.8% (0.0% change). View more on Code Climate. |
Related to #1720 |
export const addStarredToColumns = ( | ||
columns: Column[] | undefined | ||
): ColumnLike[] | undefined => { | ||
if (!columns?.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't we have a lint rule where it said we have to compare length to 0?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the optional chain will be messing with it. You would need to write
columns?.length === undefined || columns.length === 0
88351a6
to
3c6fbc7
Compare
1/4
main
<- this <- #2169 <- #2170 <-#2171This PR gives users the ability to filter experiments by their starred status.
Demo
Screen.Recording.2022-08-09.at.4.38.08.pm.mov