-
Notifications
You must be signed in to change notification settings - Fork 29
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
Replace switch statements that feed the webviews stores #5194
Conversation
7a6c19c
to
b34cd92
Compare
} | ||
dispatch(update(!!data.data)) | ||
|
||
for (const key of Object.keys(data.data)) { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
webview/src/setup/components/App.tsx
Outdated
|
||
default: | ||
continue | ||
for (const key of Object.keys(data.data)) { |
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.
Identical blocks of code found in 2 locations. Consider refactoring.
70006c1
to
c16cf0b
Compare
@@ -1,19 +1,19 @@ | |||
import React, { useCallback } from 'react' | |||
import { useDispatch } from 'react-redux' | |||
import { TableData } from 'dvc/src/experiments/webview/contract' |
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.
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 used to do this, but it would clash with some linting we have. There might be a config that was needed.
import type { PlotsActions } from '../plots/components/App' | ||
import type { PlotsDispatch } from '../plots/store' | ||
import type { SetupActions } from '../setup/components/App' | ||
import type { SetupDispatch } from '../setup/store' |
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] Using type
here to try and avoid including unnecessary code in each webview's bundle.
c0c97f2
to
c7dbea1
Compare
Code Climate has analyzed commit c7dbea1 and detected 0 issues on this pull request. The test coverage on the diff in this pull request is 96.2% (85% is the threshold). This pull request will bring the total coverage in the repository to 95.2%. View more on Code Climate. |
Closes #5182