Skip to content

Conversation

@mattseddon
Copy link
Contributor

@mattseddon mattseddon commented Feb 14, 2023

2/2 main <- #3235 <- this

Follow up from this comment. Simplifies/cleans up the webview factory.

@mattseddon mattseddon self-assigned this Feb 14, 2023
@mattseddon mattseddon changed the base branch from main to add-connect-to-studio February 14, 2023 05:17
const isValidDvcRoot = (dvcRoot?: string): dvcRoot is string => !!dvcRoot

const needsDvcRoot = (viewKey: ViewKey): boolean =>
![ViewKey.CONNECT, ViewKey.SETUP].includes(viewKey)
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 think this is ok because the factory already knows about the type of webviews it is creating.

return view
}

export const restoreWebview = <T extends WebviewData>(
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 relic from a previous feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🪦

@mattseddon mattseddon marked this pull request as ready for review February 14, 2023 05:39
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.

Looks good!

Base automatically changed from add-connect-to-studio to main February 16, 2023 21:47
@mattseddon mattseddon enabled auto-merge (squash) February 16, 2023 22:16
@qlty-cloud-legacy
Copy link

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.

@mattseddon mattseddon merged commit 1636be9 into main Feb 16, 2023
@mattseddon mattseddon deleted the update-factory branch February 16, 2023 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants