Skip to content
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

Web variable viewer #10154

Merged
merged 6 commits into from
May 27, 2022
Merged

Web variable viewer #10154

merged 6 commits into from
May 27, 2022

Conversation

sadasant
Copy link
Contributor

It's working!

Feedback always appreciated 🙏

Fixes #9664

@sadasant sadasant requested a review from a team as a code owner May 26, 2022 23:47
@sadasant sadasant self-assigned this May 26, 2022
// Allow js and js.map files to be loaded by webpack in the webview.
testFiles
.filter((f) => f.fsPath.toLowerCase().endsWith('.js') || f.fsPath.toLowerCase().endsWith('.js.map'))
.forEach((f) => this.webviewHost?.webview!.asWebviewUri(f));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

testFiles fails to be read in the browser. vscfs.readDirectory throws saying that this.options.rootPath (the webview-side/viewers directory) isn't a directory.

It could be something with the path, but this doesn't seem needed.
(I've asked @rchiodo , but please let me know if I misinterpreted anything)

const proxy = workspaceService.getConfiguration('http').get('proxy', '');
if (proxy) {
this.requestOptions = { headers: { proxy: workspaceService.getConfiguration('http').get('proxy', '') } };
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

By default, the code here used to mean that requestOptions was { headers: { proxy: '' } } which makes request fail in the browser.

@codecov-commenter
Copy link

Codecov Report

Merging #10154 (1ab0e53) into main (505dc65) will decrease coverage by 0%.
The diff coverage is 50%.

@@          Coverage Diff          @@
##           main   #10154   +/-   ##
=====================================
- Coverage    60%      60%   -1%     
=====================================
  Files       203      203           
  Lines      9236     9241    +5     
  Branches   1490     1492    +2     
=====================================
- Hits       5632     5628    -4     
- Misses     3129     3136    +7     
- Partials    475      477    +2     
Impacted Files Coverage Δ
src/platform/common/application/types.ts 100% <ø> (ø)
src/platform/common/net/httpClient.ts 55% <50%> (-5%) ⬇️
...form/common/process/pythonExecutionFactory.node.ts 70% <0%> (-5%) ⬇️
src/platform/common/utils/multiStepInput.ts 74% <0%> (-1%) ⬇️
...ommon/process/environmentActivationService.node.ts 44% <0%> (-1%) ⬇️
src/platform/common/utils/localize.ts 98% <0%> (+<1%) ⬆️

@sadasant sadasant merged commit 6a455a7 into microsoft:main May 27, 2022
@sadasant sadasant deleted the web-variableView branch May 27, 2022 17:19
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.

Get variable viewer working in web extension
4 participants