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

✨ [RUMF-1396] migrate extension to manifest v3 #1828

Merged
merged 5 commits into from
Nov 22, 2022

Conversation

BenoitZugmeyer
Copy link
Member

@BenoitZugmeyer BenoitZugmeyer commented Nov 17, 2022

Motivation

Get ready for manifest v2 phasing out. See https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/

Fixes #1691

Changes

  • Update extension-specific dependencies to better support MV3
  • Remove some dead code
  • Migrate code to MV3 (mainly migrate the manifest file and use declarative net request instead of webRequest blocking)
  • Introduce an Alert in the UI showing up when the panel lose the connection with the background service worker

Testing

  • Local
  • Staging
  • Unit
  • End to end

I have gone over the contributing documentation.

This package has been updated with various fixes to support Manifest V3
Removed some dead code that won't work anymore with Manifest V3
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/migrate-extension-to-manifest-v3 branch from 90aa48f to 5914555 Compare November 18, 2022 10:28
@BenoitZugmeyer BenoitZugmeyer marked this pull request as ready for review November 18, 2022 13:21
@BenoitZugmeyer BenoitZugmeyer requested a review from a team as a code owner November 18, 2022 13:21
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/migrate-extension-to-manifest-v3 branch from 5914555 to 308b331 Compare November 18, 2022 15:21
@codecov-commenter
Copy link

codecov-commenter commented Nov 18, 2022

Codecov Report

Merging #1828 (61f84fa) into main (10afa7f) will decrease coverage by 0.07%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1828      +/-   ##
==========================================
- Coverage   93.10%   93.03%   -0.08%     
==========================================
  Files         131      131              
  Lines        5065     5065              
  Branches     1134     1134              
==========================================
- Hits         4716     4712       -4     
- Misses        349      353       +4     
Impacted Files Coverage Δ
...rum-core/src/domain/contexts/foregroundContexts.ts 90.76% <0.00%> (-6.16%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

With Manifest V3, connection between the devtools panel and the
background service worker can be lost when the service worker is
refreshed. I experienced it very often while working on the extension
(every time I changed the background script). To help UX/DX, this commit
adds an alert to allow refreshing easily the devtools panel.
@BenoitZugmeyer BenoitZugmeyer force-pushed the benoit/migrate-extension-to-manifest-v3 branch from 308b331 to 61f84fa Compare November 18, 2022 15:34
@@ -1,3 +1,16 @@
export const DEV_LOGS_URL = 'http://localhost:8080/datadog-logs.js'
export const DEV_RUM_URL = 'http://localhost:8080/datadog-rum.js'
export const DEV_RUM_SLIM_URL = 'http://localhost:8080/datadog-rum-slim.js'

export const INTAKE_DOMAINS = [
Copy link
Contributor

Choose a reason for hiding this comment

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

nice!

})

async function refreshDevServerStatus() {
const timeoutId = setTimeout(() => setStore({ devServerStatus: 'checking' }), 500)
Copy link
Contributor

Choose a reason for hiding this comment

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

did you not want to phase out store?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes I want but not in this PR :) I only moved this function in another file.

<Suspense fallback={<></>}>
<Panel />
</Suspense>
<Suspense fallback={<></>}>{isDisconnected ? <DisconnectAlert /> : <Panel />}</Suspense>
Copy link
Contributor

Choose a reason for hiding this comment

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

👏 praise: nice!

@BenoitZugmeyer BenoitZugmeyer merged commit 329ff34 into main Nov 22, 2022
@BenoitZugmeyer BenoitZugmeyer deleted the benoit/migrate-extension-to-manifest-v3 branch November 22, 2022 17:30
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.

Manifest Version 2 is deprecated!! Error in loading extension
4 participants