-
Notifications
You must be signed in to change notification settings - Fork 356
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
feat: add archived status column to Experiment list [DET-3540] #967
feat: add archived status column to Experiment list [DET-3540] #967
Conversation
webui/react/src/components/Table.tsx
Outdated
if (!record.archived) return null; | ||
return <CheckOutlined />; |
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.
suggestion: this can use the ternary operator:
return record.archived ? <CheckOutlined /> : null;
@@ -75,7 +76,7 @@ export const taskTypeRenderer: TaskRenderer = (_, record) => ( | |||
</Tooltip> | |||
); | |||
|
|||
/* Experiemnt Table Column Renderers */ | |||
/* Experiment Table Column Renderers */ |
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.
👍 english is hard :)
align: 'center', | ||
render: experimentArchivedRenderer, | ||
sorter: (a: ExperimentItem, b: ExperimentItem): number => | ||
(a.archived === b.archived)? 0 : a.archived? 1 : -1, |
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.
nit: nice, love the nested ternary. Don't have to this now but if we see another boolean based sorting use case, we can abstract into a dedicated booleanSorter
. How about this for a little better legibility?
(a.archived === b.archived) ? 0 : (a.archived ? 1 : -1),
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.
Nice work with this PR! 🎉 Some of suggestions and nits, but nothing blocking.
e1f8906
to
9dab7f9
Compare
e7f19e0
to
bb4d8cd
Compare
Description
Add column to Experiment list that uses a checkmark to indicate whether the Experiment is archived.
Test Plan
Tested manually.
Tested sorting - when using descending order,
archived=True
is at the top.Commentary (optional)
I found a checkmark in Ant Design that I think looks good, but let me know if we want to go with Yes/No text for now.