-
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
Clean up webview factory #3277
Clean up webview factory #3277
Conversation
extension/src/webview/factory.ts
Outdated
const isValidDvcRoot = (dvcRoot?: string): dvcRoot is string => !!dvcRoot | ||
|
||
const needsDvcRoot = (viewKey: ViewKey): boolean => | ||
![ViewKey.CONNECT, ViewKey.SETUP].includes(viewKey) |
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 think this is ok because the factory already knows about the type of webviews it is creating.
75c4fed
to
5292c2d
Compare
await view.isReady() | ||
return view | ||
} | ||
|
||
export const restoreWebview = <T extends WebviewData>( |
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 relic from a previous feature.
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.
Looks good!
5292c2d
to
8b4e7e9
Compare
8b4e7e9
to
7ea72df
Compare
7ea72df
to
4104496
Compare
Code Climate has analyzed commit 4104496 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 96.0%. View more on Code Climate. |
2/2
main
<- #3235 <- thisFollow up from this comment. Simplifies/cleans up the webview factory.