Skip to content

Conversation

@mattseddon
Copy link
Contributor

@mattseddon mattseddon commented Mar 30, 2023

1/3 #3585 <- this <- #3595 <- #3596

Look a "new" feature.

This PR moves the experiment indicators (count) from experiment rows up to commit records. Previously we only did this for checkpoints. That no longer makes sense.

I also fixed a bug with the top-level plotted indicator. Hidden rows were being incorrectly removed from the count.

Demo

Screen.Recording.2023-03-31.at.10.06.58.am.mov

@mattseddon mattseddon added the product PR that affects product label Mar 30, 2023
@mattseddon mattseddon self-assigned this Mar 30, 2023
@qlty-cloud-legacy
Copy link

Code Climate has analyzed commit e5f2fe6 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (85% is the threshold).

This pull request will bring the total coverage in the repository to 94.9% (-0.1% change).

View more on Code Climate.

@mattseddon mattseddon changed the base branch from main to remove-checkpoints-from-plot-color March 30, 2023 21:03
@mattseddon mattseddon changed the base branch from remove-checkpoints-from-plot-color to main March 30, 2023 21:06
@mattseddon mattseddon changed the base branch from main to remove-checkpoints-from-plot-color March 30, 2023 21:07
@mattseddon mattseddon force-pushed the remove-checkpoints-from-plot-color branch from 8209f05 to 3bb053a Compare March 30, 2023 22:34
Base automatically changed from remove-checkpoints-from-plot-color to remove-checkpoints-from-webview March 30, 2023 22:34
@mattseddon mattseddon force-pushed the add-experiment-middle-states branch 2 times, most recently from 405ec0e to cad9a8f Compare March 30, 2023 23:09
@mattseddon mattseddon changed the title Add experiment state counts to commit records in table Add experiment state indicators to commit records in table Mar 30, 2023
hasValidDvcYaml: boolean
isShowingMoreCommits: boolean
rows: Commit[]
selectedForPlotsCount: number
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] Easier/more consistent to pass this from the extension.

})
})

describe('Sub-rows middle states indicators', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] These were deleted previously. I have adapted the old tests to work on the commit record.

row: Row<Experiment>
): number => selectedForPlotsCount + (row.original?.selected ? 1 : 0)

export const getSelectedForPlotsCount = (
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] I cannot explain why I did this... maybe responsiveness... 😕

'1ba7bcd'
])
}
WithMiddleStates.play = async ({ canvasElement }) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] Again this story was deleted but now I've brought it back

}
],
selectedForPlotsCount: 0,
sorts: []
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[Q] Why is this file even here???? Shouldn't it be with the fixtures 😕

Copy link
Contributor

Choose a reason for hiding this comment

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

At a guess, it was put here since this file is only used by the webview. The extension tests don't seem to use it. I'm all for moving it though!

@mattseddon mattseddon force-pushed the add-experiment-middle-states branch from cad9a8f to abe3cb3 Compare March 30, 2023 23:25
)
})

it('should show not change the plotted indicator when plotted experiments are hidden', () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] This is a new test that would have caught the bug.

className={cx(styles.rowActions, hidden && styles.hidden)}
data-testid={testId}
>
<div className={cx(styles.rowActions)} data-testid={testId}>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] I tried to clean up the classes and props but this needs a good clean out.

Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the cx() here since there is only one class.

}) => {
const content = (
<button
className={cx(styles.indicatorIcon, count && styles.indicatorWithCount)}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

indicatorWithCount also no longer existed

Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, you can remove cx()

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 dumb

justify-content: center;
width: 1.3rem;
height: 100%;
height: 2rem;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

[F] Indicator was in the middle of the parent icon

}
.experimentGroup.expandedGroup & {
display: none;
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

just 😕

className={cx(styles.rowActions, hidden && styles.hidden)}
data-testid={testId}
>
<div className={cx(styles.rowActions)} data-testid={testId}>
Copy link
Contributor

Choose a reason for hiding this comment

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

You can remove the cx() here since there is only one class.

}) => {
const content = (
<button
className={cx(styles.indicatorIcon, count && styles.indicatorWithCount)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here, you can remove cx()

Copy link
Contributor

@julieg18 julieg18 left a comment

Choose a reason for hiding this comment

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

Great work!

@mattseddon mattseddon force-pushed the add-experiment-middle-states branch from abe3cb3 to a9da396 Compare April 1, 2023 05:47
@mattseddon mattseddon merged commit db7a1c9 into remove-checkpoints-from-webview Apr 1, 2023
@mattseddon mattseddon deleted the add-experiment-middle-states branch April 1, 2023 07:13
mattseddon added a commit that referenced this pull request Apr 3, 2023
* Remove experiment checkpoints from table

* Remove experiment checkpoints from tree (#3587)

* Remove experiment checkpoints from filters (#3588)

* Remove experiment checkpoints from select experiments to plot (#3589)

* Remove experiment checkpoints from plot color collection (#3590)

* Add experiment state counts to commit record (#3591)

* Remove references to experiment checkpoints from walkthrough (#3595)

* Remove experiment checkpoints from table context menu (#3596)

* Remove checkpoints from custom plots (#3610)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product PR that affects product

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants