Skip to content

Conversation

@rileyajones
Copy link
Contributor

@rileyajones rileyajones commented May 24, 2023

Motivation for features / changes

As part of the effort to add hparams into time series we would like to be able to determine the columns to be shown at the selector layer. To that end I have added a new selector which, given a card id, returns the appropriate columns to be shown.

Screenshots of UI changes (or N/A)

Single Selection (its the same)
image

Range Selection (it's also the same)
image

@rileyajones rileyajones requested a review from JamesHollyer May 24, 2023 18:20
@rileyajones rileyajones marked this pull request as ready for review May 24, 2023 19:09
});
});

describe('getSingleSelectionHeaders', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the 'returns all single selection headers' and 'returns all range selection headers' are not needed. It just returns the value and there is no logic to test. That being said. I am ok with these being here.

getSingleSelectionHeaders,
getRangeSelectionHeaders,
(state, singleSelectionHeaders, rangeSelectionHeaders) => {
return getMetricsCardRangeSelectionEnabled(state, cardId)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this cannot be input to the selector because it is a selector with a prop?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah exactly.

runToSeries
);
store.overrideSelector(getMetricsRangeSelectionEnabled, true);
store.overrideSelector(getMetricsCardRangeSelectionEnabled, true);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These test now actually use the getColumnHeadersForCard selector and override the selectors which that selector uses. I kind of like this but is not a pattern we use often. Can we at least add a comment making note of this?

@rileyajones rileyajones merged commit 656d22c into tensorflow:master May 24, 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