Skip to content

Conversation

@Skn0tt
Copy link
Member

@Skn0tt Skn0tt commented Apr 17, 2025

Resolves microsoft/playwright#35544

Screen.Recording.2025-04-17.at.13.24.26.mov

@Skn0tt Skn0tt requested review from Copilot and dgozman April 17, 2025 11:26
@Skn0tt Skn0tt self-assigned this Apr 17, 2025
Copy link

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.

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

Files not reviewed (1)
  • media/common.css: Language not supported

Copy link
Contributor

@dgozman dgozman left a comment

Choose a reason for hiding this comment

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

Looks kinda ugly. Can we show something like Unable to load [playwright.config.ts](link to the error location) instead?

Copy link
Contributor

@mxschmitt mxschmitt left a comment

Choose a reason for hiding this comment

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

Instead of creating a new UI for showing config loading errors I'd instead try to redirect to the problem tab, this is what VSCode uses as their native experience. Maybe we can even focus to the actual Problem which we added or focus to the location of where the issue occurred and then VSCode will show it as red. I think marking it as red in the WebView is a good idea but I'd resist from showing the error there.

@Skn0tt
Copy link
Member Author

Skn0tt commented Apr 22, 2025

I couldn't find a way of programmatically opening the Problems tab on a specific problem, so implemented the "Unable to load" UI:

Screenshot 2025-04-22 at 09 01 00

continue;

const errorParagraph = document.createElement('p');
errorParagraph.textContent = 'Unable to load ';
Copy link
Contributor

Choose a reason for hiding this comment

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

Since the error location might be in a different file, what about the following layout:

Config loading errors:
- <foo.ts:17>
- <bar.ts:42>

Copy link
Member Author

Choose a reason for hiding this comment

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

like this?

Screenshot 2025-04-22 at 14 03 16

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, something along these lines.

@Skn0tt
Copy link
Member Author

Skn0tt commented Apr 23, 2025

had to fix a test 😩

@Skn0tt Skn0tt merged commit 5c98353 into microsoft:main Apr 23, 2025
4 of 6 checks passed
Skn0tt added a commit to Skn0tt/playwright-vscode that referenced this pull request Apr 28, 2025
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.

[Bug]: Can't adjust Playwright Configs when the config selected by default fails to load

3 participants