-
Notifications
You must be signed in to change notification settings - Fork 1.7k
HParams: Add selected checkbox column to Runs table #6442
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
HParams: Add selected checkbox column to Runs table #6442
Conversation
ff8d11f to
307b424
Compare
307b424 to
d823d3e
Compare
|
|
||
| .col { | ||
| display: table-cell; | ||
| } |
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.
This is just a cleanup I bumped into.
| MEAN = 'MEAN', | ||
| RAW_CHANGE = 'RAW_CHANGE', | ||
| HPARAM = 'HPARAM', | ||
| CUSTOM = 'CUSTOM', |
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 am considering removing COLOR and using CUSTOM for the color columns.
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 understand the rationale here, but I think I prefer leaving them. I think keeping them declared this way helps readability. Feel free to disagree though.
| MEAN = 'MEAN', | ||
| RAW_CHANGE = 'RAW_CHANGE', | ||
| HPARAM = 'HPARAM', | ||
| CUSTOM = 'CUSTOM', |
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 understand the rationale here, but I think I prefer leaving them. I think keeping them declared this way helps readability. Feel free to disagree though.
| const tableData: TableData = { | ||
| id: run.id, | ||
| color: colorMap[run.id], | ||
| selected: (selectionMap && selectionMap.get(run.id)) ?? false, |
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'm only like 80% this is correct, but I think this can be streamlined a bit.
| selected: (selectionMap && selectionMap.get(run.id)) ?? false, | |
| selected: Boolean(selectionMap?.get(run.id)), |
Motivation for features / changes
In #6438 we rewrote the Runs Data Table to use the new projection Data Table structure(Created in #6427 and #6422). This allows us to project custom controls such as the run selection check boxes. This PR implements those checkboxes.
Technical description of changes
Pretty straight forward use of projection. The weird part was that the projected checkbox in the header did not fire the "change" event while the header itself had a subscription to a "click" event for sorting. The solution was to subscribe to the "click" event and that seems to work just fine.
Screenshots of UI changes (or N/A)
All selected:



Some selected:
None selected: