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

Simplify logic for webview resource uris #123740

Merged
merged 5 commits into from May 20, 2021
Merged

Conversation

mjbvz
Copy link
Contributor

@mjbvz mjbvz commented May 13, 2021

This change attempts to simplify the logic around webview resource uris by doing the following:

  • Hard code the resource origin. We always will be hitting a service worker for these paths so they don't need to be dynamic (although in the future we may want to pull them from product.json)

    This lets us remove these properties from the environment service

  • Move remote handling from the resource loader in to asWebviewUri.

  • Remove the handling of http and https paths from the resource loader.

    I don't think these cases can be hit any longer (although I need to confirm this with more testing for the web case). Instead I added a check to asWebviewUri so that we return the original uri if a http(s) uri is passed in

This PR fixes #

@mjbvz mjbvz self-assigned this May 13, 2021
@mjbvz mjbvz added this to the May 2021 milestone May 13, 2021
@mjbvz mjbvz force-pushed the dev/mjbvz/rework-webview-resources branch 5 times, most recently from cee9dd1 to 3bbfece Compare May 20, 2021 00:13
mjbvz added 5 commits May 19, 2021 17:15
This change attempts to simplify the logic around webview resource uris by doing the following:

- Hard code the resource origin. We always will be hitting a service worker for these paths so they don't need to be dynamic (although in the future we may want to pull them from `product.json`)

    This lets us remove these properties from the environment service

- Move remote handling from the resource loader in `asWebviewUri`.

- Remove the handling of http and https paths from the resource loader.

    I don't think these cases can be hit any longer (although I need to confirm this with more testing for the web case). Instead I added a check to `asWebviewUri` so that we return the original uri if a http(s) uri is passed in
We still need to convert between a remote uri and one that our remote file system can read
@mjbvz mjbvz force-pushed the dev/mjbvz/rework-webview-resources branch from 3bbfece to 040a2d3 Compare May 20, 2021 00:15
@mjbvz mjbvz marked this pull request as ready for review May 20, 2021 00:25
@mjbvz mjbvz merged commit 1ddc623 into main May 20, 2021
@mjbvz mjbvz deleted the dev/mjbvz/rework-webview-resources branch May 20, 2021 00:26
@github-actions github-actions bot locked and limited conversation to collaborators Jul 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant