-
Notifications
You must be signed in to change notification settings - Fork 28
Add experiment state indicators to commit records in table #3591
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
Add experiment state indicators to commit records in table #3591
Conversation
|
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. |
8209f05 to
3bb053a
Compare
405ec0e to
cad9a8f
Compare
| hasValidDvcYaml: boolean | ||
| isShowingMoreCommits: boolean | ||
| rows: Commit[] | ||
| selectedForPlotsCount: number |
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.
[F] Easier/more consistent to pass this from the extension.
| }) | ||
| }) | ||
|
|
||
| describe('Sub-rows middle states indicators', () => { |
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.
[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 = ( |
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.
[F] I cannot explain why I did this... maybe responsiveness... 😕
| '1ba7bcd' | ||
| ]) | ||
| } | ||
| WithMiddleStates.play = async ({ canvasElement }) => { |
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.
[F] Again this story was deleted but now I've brought it back
| } | ||
| ], | ||
| selectedForPlotsCount: 0, | ||
| sorts: [] |
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.
[Q] Why is this file even here???? Shouldn't it be with the fixtures 😕
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.
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!
cad9a8f to
abe3cb3
Compare
| ) | ||
| }) | ||
|
|
||
| it('should show not change the plotted indicator when plotted experiments are hidden', () => { |
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.
[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}> |
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.
[F] I tried to clean up the classes and props but this needs a good clean out.
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.
You can remove the cx() here since there is only one class.
| }) => { | ||
| const content = ( | ||
| <button | ||
| className={cx(styles.indicatorIcon, count && styles.indicatorWithCount)} |
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.
indicatorWithCount also no longer existed
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.
Same here, you can remove cx()
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 dumb
| justify-content: center; | ||
| width: 1.3rem; | ||
| height: 100%; | ||
| height: 2rem; |
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.
[F] Indicator was in the middle of the parent icon
| } | ||
| .experimentGroup.expandedGroup & { | ||
| display: none; | ||
| } |
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.
just 😕
| className={cx(styles.rowActions, hidden && styles.hidden)} | ||
| data-testid={testId} | ||
| > | ||
| <div className={cx(styles.rowActions)} data-testid={testId}> |
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.
You can remove the cx() here since there is only one class.
| }) => { | ||
| const content = ( | ||
| <button | ||
| className={cx(styles.indicatorIcon, count && styles.indicatorWithCount)} |
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.
Same here, you can remove cx()
julieg18
left a comment
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.
Great work!
abe3cb3 to
a9da396
Compare
* 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)
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