Skip to content

Conversation

@tuan-nguen
Copy link
Contributor

This is part of the work to remove the use of @vscode/webview-ui-toolkit. The new library @vscode-elements/elements does not have a direct replacement for VsCodeLink, this implements a new Link component for which the styles have been mostly copied from here. I have attached comparison screenshots of the old and new component.

Regular styles
Screenshot 2025-03-31 at 11 11 08

Hovered styles
Screenshot 2025-03-31 at 11 11 45

Focused styles
Screenshot 2025-03-31 at 11 11 27

Copilot AI review requested due to automatic review settings March 31, 2025 10:52
@tuan-nguen tuan-nguen requested review from a team as code owners March 31, 2025 10:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR removes the use of VSCodeLink and replaces it with a new Link component to support the migration away from @vscode/webview-ui-toolkit, implementing styles similar to the original component.

  • Removed VSCodeLink usage and import statements across multiple files.
  • Introduced a new Link component in extensions/ql-vscode/src/view/common/Link.tsx.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
extensions/ql-vscode/src/view/variant-analysis/VariantAnalysisStatusStats.tsx Replaced VSCodeLink with Link for viewing action logs.
extensions/ql-vscode/src/view/variant-analysis/RawResultCell.tsx Replaced VSCodeLink with Link for link rendering in raw result cells.
extensions/ql-vscode/src/view/variant-analysis/FailureReasonAlert.tsx Updated error alert to use the new Link component for log viewing.
extensions/ql-vscode/src/view/common/Link.tsx Introduced the new Link component with basic styled-components styling.
extensions/ql-vscode/src/view/common/FileCodeSnippet/FileCodeSnippet.tsx Replaced VSCodeLink with Link for linking to file code snippets.
extensions/ql-vscode/src/stories/common/Alert.stories.tsx Updated stories to use the new Link component in alerts.

Tip: Leave feedback on Copilot's review comments with the 👎 and 👍 buttons to help improve review quality. Learn more

Copy link
Contributor

@robertbrignull robertbrignull left a comment

Choose a reason for hiding this comment

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

Kinda wild that the vscode/elements doesn't have a generic link but thanks for adding one that mirrors the old VSCodeLink so we can maintain consistency. At least that way we can choose to change it later on if we want to.

The code and the CSS look fine to me, and thank you for the screenshots showing the different states ❤️

I've also tried it out locally and the links are functioning normally as far as I can tell

@tuan-nguen tuan-nguen merged commit 42fc778 into main Apr 1, 2025
18 of 19 checks passed
@tuan-nguen tuan-nguen deleted the tuan-nguen/remove-vscode-links branch April 1, 2025 08:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants