Skip to content

Embed Web Stories in PSAT#869

Merged
mohdsayed merged 20 commits into
developfrom
try/web-stories
Nov 24, 2024
Merged

Embed Web Stories in PSAT#869
mohdsayed merged 20 commits into
developfrom
try/web-stories

Conversation

@mohdsayed

@mohdsayed mohdsayed commented Nov 15, 2024

Copy link
Copy Markdown
Collaborator

Description

This PR aims to add an explorable explanations section where user can toggle and see explanations for topics like cookies, protected audience etc in Web Stories format.

Relevant Technical Choices

  • Since manifest V3, chrome doesn't allow injection of scripts that are remotely hosted. To achieve this, all the required scripts by the stories have been bundled with the extension and the URLs have been replaced when the story markup is rendered.

Testing Instructions

  • Clone this branch.
  • In the terminal run npm i && npm run build:ext
  • Now go to example.com and open the DevTools and open Privacy Sandbox tab.
  • You should see a section in sidebar titled as Explorable Explanation with Web-Stories Icon.
  • Click on the section. A set of stories with their hero image should be rendered on the main content.
  • Clicking on the hero image will result in the story opening in a light box.

Additional Information:

Screenshot/Screencast

Screen.Recording.2024-11-18.at.14.24.51.mov

Checklist

  • I have thoroughly tested this code to the best of my abilities.
  • I have reviewed the code myself before requesting a review.
  • This code is covered by unit tests to verify that it works as intended.
  • The QA of this PR is done by a member of the QA team (to be checked by QA).

@amovar18 amovar18 marked this pull request as ready for review November 18, 2024 12:32
@amovar18 amovar18 requested a review from mayan-000 November 18, 2024 12:32
@amovar18 amovar18 added this to the v0.12 milestone Nov 18, 2024
@mohdsayed

mohdsayed commented Nov 22, 2024

Copy link
Copy Markdown
Collaborator Author

@amovar18 Few improvements.

  • Avoid the use of DOMParser for replacing AMP script src.
  • Move all amp scripts to amp folder.
  • Remove code for mobile from amp-player-main.js
  • Remove header when web-stories goes full screen, so that scroll is not required.
  • Next and previous buttons do not appear when the DevTool is floating vertically.

@mohdsayed mohdsayed merged commit cdb33bb into develop Nov 24, 2024
@mohdsayed mohdsayed deleted the try/web-stories branch November 24, 2024 11:31
@mohdsayed mohdsayed modified the milestones: v0.12, v0.13.0 Dec 12, 2024
mohdsayed added a commit that referenced this pull request Dec 12, 2024
@mohdsayed mohdsayed mentioned this pull request Mar 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants