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

Update extension tutorial to use Manifest V3 #2014

Merged
merged 6 commits into from
Jun 25, 2022

Conversation

eclipse439
Copy link
Contributor

@eclipse439 eclipse439 commented Jun 15, 2022

As requested by multiple users, this PR updates docs to change manifest version to v3, as well as replace any deprecated functions.

I've also added a PR to update the source code linked in the docs here: MicrosoftEdge/MicrosoftEdge-Extensions-Demos#34

Issues requesting update: #2012 #1878

Rendered pages for review:
https://review.docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/getting-started/part1-simple-extension?branch=pr-en-us-2014
https://review.docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/getting-started/part2-content-scripts?branch=pr-en-us-2014

@mikehoffms mikehoffms added the cat: extensions Extensions-related content. label Jun 16, 2022
@mikehoffms mikehoffms requested a review from sonakshimore June 16, 2022 01:28
@captainbrosset
Copy link
Contributor

Thank you so much for the PR @eclipse439! We'll give this a review soon.

Copy link
Contributor

@ashishnirvana1 ashishnirvana1 left a comment

Choose a reason for hiding this comment

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

Iam fine by these changes, but am not fully sure if these cover everything. Will be nice to get a pass from Utkarsh Patankar as well.

@captainbrosset
Copy link
Contributor

captainbrosset commented Jun 16, 2022

Iam fine by these changes, but am not fully sure if these cover everything. Will be nice to get a pass from Utkarsh Patankar as well.

Sounds great to me. @ashishnirvana1 are you able to at-mention them here? I don't know what their username is on GitHub.

@sonakshimore
Copy link
Contributor

Iam fine by these changes, but am not fully sure if these cover everything. Will be nice to get a pass from Utkarsh Patankar as well.

Sounds great to me. @ashishnirvana1 are you able to at-mention them here? I don't know what their username is on GitHub.

@captainbrosset I am unable to add Utkarsh here as a Reviewer. Will get this reviewed offline and update this PR.

Copy link
Contributor

@Reezaali Reezaali left a comment

Choose a reason for hiding this comment

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

Still in review by @ashishnirvana1 to confirm that the tutorial is complete. We also need to implement tabs for MV2 and MV3.

@mikehoffms - can you update the doc with the tabs please?

@opbld30
Copy link

opbld30 commented Jun 16, 2022

Docs Build status updates of commit fdc6c28:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/extensions-chromium/getting-started/part1-simple-extension.md ✅Succeeded View
microsoft-edge/extensions-chromium/getting-started/part2-content-scripts.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@mikehoffms
Copy link
Collaborator

mikehoffms commented Jun 16, 2022

@Reezaali
I implemented tabs to preserve Manifest V2 code listings. The Files Changed tab served well, the sequence we used:

  1. First, @eclipse439 had a chance to view the individual changed lines in the Files Changed tab.

  2. Then, after I added tabs, the Files Changed tab no longer shows individual changed lines, but rather, confirms my correct restoration of V2 code listings: it shows that this PR adds a tab demarcator above the V2 listings (no other changes to V2 listings), and adds whole complete new V3 listings (not depicted as individual line changes).

@MicrosoftDocs MicrosoftDocs deleted a comment from opbld33 Jun 16, 2022
@mikehoffms mikehoffms requested a review from Reezaali June 16, 2022 17:40
@Reezaali
Copy link
Contributor

For now, I will leave my review as blocking the merge until we hear back from @ashishnirvana1 to confirm that no additional changes are needed to the tutorial. Thanks!

@opbld31
Copy link

opbld31 commented Jun 16, 2022

Docs Build status updates of commit b7fe1e3:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/extensions-chromium/getting-started/part1-simple-extension.md ✅Succeeded View
microsoft-edge/extensions-chromium/getting-started/part2-content-scripts.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@mikehoffms mikehoffms self-requested a review June 16, 2022 23:18
@sonakshimore
Copy link
Contributor

sonakshimore commented Jun 24, 2022

Utkarsh has suggested the below changes to the documentation:

  1. Change suggested to Create an extension tutorial, part 1 documentation, Step number 3 - last sentence:

Old version: Finally, ensure you register the pop-up in manifest.json under browser_action, as shown in the following code snippet.
New version: Finally, ensure you register the pop-up in manifest.json under browser_action or action in Manifest V2 or Manifest V3, respectively, as shown in the following code snippet.

  1. Extension demos on Before you begin section of documentation:

Since it mentions that the source code has been updated from Manifest V2 to Manifest V3, we should actually update the source code first before we update this documentation.

Could you please review & approve GitHub PR #34 - Update Edge Extension Tutorials to use Manifest V3 by eclipse439 · MicrosoftEdge/MicrosoftEdge-Extensions-Demos?

@Reezaali
Copy link
Contributor

@mikehoffms - I merged PR34 above as mentioned by @sonakshimore. Thanks.

@opbld31
Copy link

opbld31 commented Jun 25, 2022

Docs Build status updates of commit ed86ec3:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/extensions-chromium/getting-started/part1-simple-extension.md ✅Succeeded View
microsoft-edge/extensions-chromium/getting-started/part2-content-scripts.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Jun 25, 2022

Docs Build status updates of commit dd549aa:

✅ Validation status: passed

File Status Preview URL Details
microsoft-edge/extensions-chromium/getting-started/part1-simple-extension.md ✅Succeeded View
microsoft-edge/extensions-chromium/getting-started/part2-content-scripts.md ✅Succeeded View

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@mikehoffms mikehoffms merged commit 30ee647 into MicrosoftDocs:main Jun 25, 2022

---

4. Make your `stars.jpeg` available from any browser tab

You're probably wondering why, when you pass the `images/stars.jpeg` must you use the `chrome.extension.getURL` chrome Extension API instead of just passing in the relative URL without the extra prefix like in the previous section. By the way, that extra prefix, returned by `getUrl` with the image attached looks something like the following.
Copy link
Collaborator

@mikehoffms mikehoffms Jun 25, 2022

Choose a reason for hiding this comment

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

This V2-specific word|sentence|paragraph needs techreview in future PR. chrome.extension.getURL is V2-specific. @ashishnirvana1 @eclipse439
rendered:
https://docs.microsoft.com/en-us/microsoft-edge/extensions-chromium/getting-started/part2-content-scripts?tabs=v2
find chrome.extension.getURL then click tabs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat: extensions Extensions-related content.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants