Skip to content

Conversation

@JamesHollyer
Copy link
Contributor

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:
Screenshot 2023-06-20 at 2 40 19 PM
Some selected:
Screenshot 2023-06-20 at 2 40 27 PM
None selected:
Screenshot 2023-06-20 at 2 40 35 PM

@JamesHollyer JamesHollyer force-pushed the ProjectRunsEnableControl branch from ff8d11f to 307b424 Compare June 20, 2023 22:54
@JamesHollyer JamesHollyer force-pushed the ProjectRunsEnableControl branch from 307b424 to d823d3e Compare June 21, 2023 04:42

.col {
display: table-cell;
}
Copy link
Contributor Author

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',
Copy link
Contributor Author

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.

Copy link
Contributor

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.

@JamesHollyer JamesHollyer requested a review from rileyajones June 21, 2023 04:48
MEAN = 'MEAN',
RAW_CHANGE = 'RAW_CHANGE',
HPARAM = 'HPARAM',
CUSTOM = 'CUSTOM',
Copy link
Contributor

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,
Copy link
Contributor

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.

Suggested change
selected: (selectionMap && selectionMap.get(run.id)) ?? false,
selected: Boolean(selectionMap?.get(run.id)),

@JamesHollyer JamesHollyer merged commit 62b777c into tensorflow:master Jun 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants