This repository was archived by the owner on Sep 30, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
upgrade browser extension to manifest v3 #63948
Open
sqs
wants to merge
10
commits into
main
Choose a base branch
from
sqs/bext-manifest-v3
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
eseliger
approved these changes
Jul 19, 2024
Member
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CSP is no longer required?
Member
Author
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope.
Member
Author
|
need to fix some color theming and telemetry issues |
934f5cc to
a6bfca0
Compare
Member
Author
|
Fixed the telemetry issue. Will punt on the theming issue for now in this PR. |
a6bfca0 to
5e58119
Compare
Chrome's and the Chrome Web Store's push for [Manifest V3](https://developer.chrome.com/docs/extensions/develop/migrate) means that our browser extension will start to be unusable in a few months unless we upgrade to Manifest V3. - Removes "Enable Sourcegraph on this domain" context menu item that didn't seem to work. We were adding this ourselves (using `webext-domain-permission-toggle`), and it didn't seem to work. Our options popup shows a permission request, which is sufficient. - Otherwise preserves all existing functionality as best I could tell. Test plan: 1. Confirm that the browser extension continues to inject the Sourcegraph icon on https://github.com/hashicorp/errwrap. 1. Load up https://gitlab.com/sqs/web in my local dev Sourcegraph instance and confirm that the browser extension injects the Sourcegraph icon on https://gitlab.com/sqs/web code files.
- Need to just call recordEvent instead of pass the entire TelemetryRecorder object across the Comlink interface. - Comlink's `Remote<...>` generic type struggles with the generics on the `TelemetryRecorder.recordEvent`, so just use strings.
5e58119 to
30ce830
Compare
Uses the latest CSS classes that GitHub.com uses, which fixes the theming.
30ce830 to
e7a9c17
Compare
2659fde to
21fec02
Compare
Member
Author
|
It turns out this is a bit more involved since we can't use a Web Worker OR call importScripts async. I'll still keep moving it forward. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Chrome's and the Chrome Web Store's push for Manifest V3 means that our browser extension will start to be unusable in a few months unless we upgrade to Manifest V3.
webext-domain-permission-toggle), and it didn't seem to work. Our options popup shows a permission request, which is sufficient.Test plan