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

Feature: Export report in an HTML file #545

Merged
merged 28 commits into from
Apr 9, 2024
Merged

Conversation

ayushnirwal
Copy link
Contributor

@ayushnirwal ayushnirwal commented Mar 6, 2024

Description

This PR adds the capability to export an HTML file to the extension. The HTML file will contain data about 1st and 3rd party cookies blocked cookies and frames.

Relevant Technical Choices

  • Added a new view in packages/extension/src/view named report.
  • The report view is a simple react SPA which reads data from window.PSAT_DATA
  • The report view is built alongside all other views and marked as a web accessible resource for the extension.
  • While exporting this html file is fetched and window.PSAT_DATA is injected then the html file is downloaded.

Testing Instructions

  • Click the 'Download Button' in the cookie dashboard.
  • A file named report.html file will be downloaded.
  • The file can be opened in any browser the UI should be similar to the cookie dashboard.

Additional Information:

Todo

  • (Bug) Extra item, Frame no and associated frames visible in report.
  • Add Library detection data in the report.
  • Disable download button till library detection data is ready.

Screenshot/Screencast

Screen.Recording.2024-03-06.at.2.15.42.PM.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).

Partially Addresses #228

@ayushnirwal ayushnirwal changed the base branch from main to develop March 6, 2024 09:06
@ayushnirwal ayushnirwal self-assigned this Mar 6, 2024
@ayushnirwal ayushnirwal requested review from mohdsayed and mayan-000 and removed request for mohdsayed March 6, 2024 09:11
@ayushnirwal ayushnirwal linked an issue Mar 6, 2024 that may be closed by this pull request
2 tasks
@mohdsayed mohdsayed added this to the v0.7.0 milestone Mar 12, 2024
packages/extension/webpack.config.cjs Outdated Show resolved Hide resolved
packages/extension/src/view/report/app.tsx Outdated Show resolved Hide resolved
packages/extension/src/utils/downloadReport.ts Outdated Show resolved Hide resolved
@ayushnirwal ayushnirwal requested a review from mohdsayed April 3, 2024 10:07
ayushnirwal and others added 5 commits April 8, 2024 12:16
The issue originally started in PR#562 when we were trying to fix the case when the user visits a 404 page and the library detection section goes into infinite loop
@ayushnirwal ayushnirwal requested a review from mohdsayed April 9, 2024 11:15
@mohdsayed mohdsayed merged commit f0a113e into develop Apr 9, 2024
4 checks passed
@mohdsayed mohdsayed deleted the feat/export-html-report branch April 9, 2024 11:53
@mohdsayed mohdsayed mentioned this pull request Apr 11, 2024
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.

Add option to print or export the report
2 participants