-
Notifications
You must be signed in to change notification settings - Fork 362
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
refactor: columnpicker remove hard coded value #9342
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9342 +/- ##
==========================================
- Coverage 45.14% 38.56% -6.59%
==========================================
Files 1230 906 -324
Lines 154523 114686 -39837
Branches 2405 2404 -1
==========================================
- Hits 69767 44234 -25533
+ Misses 84561 70257 -14304
Partials 195 195
Flags with carried forward coverage won't be shown. Click here to find out more.
|
✅ Deploy Preview for determined-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -284,7 +280,7 @@ const ColumnPickerMenu: React.FC<ColumnMenuProps> = ({ | |||
), | |||
forceRender: true, | |||
key: canonicalTab, | |||
label: locationLabelMap[canonicalTab], | |||
label: locationLabelMap[canonicalTab as keyof typeof locationLabelMap], | |||
}; | |||
})} | |||
/> |
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.
tbh i'm not really sure why we have a tabs.length === 1
down two lines. are we planning on using that condition later?
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.
the Searches view is a case where we only display columns with location EXPERIMENT
, so we don't need the Pivot
component and can just display one ColumnPickerTab
instead.
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.
do we ever do that anywhere?
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.
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.
LGTM
Ticket
Description
I saw a hardcoded value used in two different places. Here's the location where it's already being defined and used.
https://github.com/determined-ai/determined/blob/main/webui/react/src/pages/F_ExpList/F_ExperimentList.tsx#L1073-L1077
Test Plan
Make sure the column picker looks the same as before
![image](https://private-user-images.githubusercontent.com/5224116/329082083-765b9a86-7359-4586-ab13-7e54a8ca7e4d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk3OTk0NzUsIm5iZiI6MTczOTc5OTE3NSwicGF0aCI6Ii81MjI0MTE2LzMyOTA4MjA4My03NjViOWE4Ni03MzU5LTQ1ODYtYWIxMy03ZTU0YThjYTdlNGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTdUMTMzMjU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9Njg5NWIyYTFjMzEwNDMyNmQyNDVjZWQxYzI2NWUwODY2OGU3NDM3ZWFkOTE0Y2Q5NzY1NjRiMTg2NDg5ZjRhYiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.eczfiXU7xAFHrg-uMfna9v6ewhpa4odgoZZ4HZIc_qw)
Checklist
docs/release-notes/
.See Release Note for details.