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

Fix: Merge blocked reasons data in dashboard #650

Merged
merged 6 commits into from
May 5, 2024
Merged

Conversation

mayan-000
Copy link
Collaborator

@mayan-000 mayan-000 commented Apr 29, 2024

Description

This PR adds code to merge blocked reasons and isBlocked key data across the occurrence in page URLs for similar cookies.
Alongside updates the condition for filtering cookies with issues.

Relevant Technical Choices

  • The function extractReportData parses the CLI output JSON file and merges cookies into a single object, where repeating cookies are reassigned to the key-value pair.
  • In the sitemap landing page showing the count of cookies and their categories, we need unified(non-repeating cookies) data from all the pages.
  • This was working until blockedReasons were required to be shown on the landing page, so due to reassigning the blockedReasons were not preserved across the repetition of cookies for sitemap data.
  • During that implementation few places were missed for modification in data processing logic.
  • To tackle this, while calculating cookies for landing page count previous data is preserved, alongside using the blockedReasons key for showing blocked cookies in the table.

Testing Instructions

  • Build CLI on develop and run sitemap https://rtcamp.com/sitemap.xml.
  • Choose 2 sites for analysis, once done open the dashboard.
  • You'll notice that the sitemap landing page has no blocked cookies, but as you go through each site individually, blocked cookies should be there.
  • Now switch to this branch and repeat the same steps.
  • You'll notice counts are correctly being shown on the sitemap landing page.

Additional Information:

Screenshot/Screencast


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).

Fixes #

@mayan-000 mayan-000 marked this pull request as ready for review May 2, 2024 04:39
@mayan-000 mayan-000 requested review from mohdsayed and ayushnirwal May 2, 2024 04:40
@mohdsayed mohdsayed added this to the v0.8 milestone May 5, 2024
@mohdsayed mohdsayed merged commit d1d38c4 into develop May 5, 2024
4 checks passed
@mohdsayed mohdsayed deleted the fix/blocked-reasons branch May 5, 2024 05:27
@mohdsayed mohdsayed mentioned this pull request May 7, 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.

2 participants