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

Plausible: Redact IDs in goal urls and removed patient id from goal trigger props #6076

Merged
merged 5 commits into from
Aug 16, 2023

Conversation

rithviknishad
Copy link
Member

@rithviknishad rithviknishad commented Aug 14, 2023

WHAT

🤖 Generated by Copilot at d6eb840

Refactored the code for sending pageview and custom events to Plausible with redacted URLs. Removed patientId from various components and actions that did not need it, simplifying the code and reducing API calls. Affected files include Plausible.tsx, ConsultationDetails.tsx, Feed.tsx, PatientHome.tsx, and HL7PatientVitalsMonitor.tsx.

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖 Generated by Copilot at d6eb840

  • Refactor the logic of sending pageview events to Plausible and redacting sensitive data from the URL (link, link, link)
  • Rename triggerPageView to getRedactedUrl and change it to return a string instead of sending an event (link)
  • Modify useLocationChange and useEffect hooks to call plausible instead of triggerPageView (link)
  • Add plausible function to wrap the global plausible variable and add the redacted URL and other data to the event (link)
  • Remove the redundant patientId property from various action payloads and component props (link, link, link, link, link, link, link, link, link)
    • Remove patientId from createConsultation and updateConsultation actions in ConsultationDetails.tsx (link, link)
    • Remove patientId from Feed component props and getConsultationFeed, createDailyRound, and createInvestigation actions in Feed.tsx (link, link, link, link, link)
    • Remove patientId from triggerGoal and plausible function calls in PatientHome.tsx and HL7PatientVitalsMonitor.tsx (link, link)

@rithviknishad rithviknishad requested a review from a team August 14, 2023 09:16
@rithviknishad rithviknishad requested a review from a team as a code owner August 14, 2023 09:16
@vercel
Copy link

vercel bot commented Aug 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 14, 2023 1:56pm

@netlify
Copy link

netlify bot commented Aug 14, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit fa57a23
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/64da32515fbae9000838255e
😎 Deploy Preview https://deploy-preview-6076--care-egov-staging.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@rithviknishad rithviknishad changed the title Plausible/redact goal url Plausible: Redact IDs in goal urls and removed patient id from goal trigger props Aug 14, 2023
@github-actions github-actions bot added the cypress failed pull request with cypress test failure label Aug 14, 2023
@rithviknishad rithviknishad marked this pull request as draft August 14, 2023 10:58
@rithviknishad rithviknishad marked this pull request as ready for review August 14, 2023 11:39
Copy link
Member

@khavinshankar khavinshankar left a comment

Choose a reason for hiding this comment

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

LGTM

@khavinshankar khavinshankar added good to merge and removed needs review cypress failed pull request with cypress test failure labels Aug 14, 2023
@khavinshankar khavinshankar merged commit 18b1c3a into develop Aug 16, 2023
11 checks passed
@khavinshankar khavinshankar deleted the plausible/redact-goal-url-id branch August 16, 2023 08:02
@github-actions
Copy link

@rithviknishad We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plausible: IDs in URL are not redacted in triggerGoal
4 participants