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

Feat: Add custom redact modifier for SwiftUI #4362

Merged
merged 70 commits into from
Sep 25, 2024
Merged

Conversation

brustolin
Copy link
Contributor

📜 Description

Added a SwiftUI modifier that allows the dev to choose with part of the View they want redacted during replay.

💡 Motivation and Context

closes #4333

💚 How did you test it?

Sample

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

Copy link

github-actions bot commented Sep 23, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 61eeb03

Copy link

codecov bot commented Sep 23, 2024

Codecov Report

Attention: Patch coverage is 42.85714% with 8 lines in your changes missing coverage. Please review.

Project coverage is 91.451%. Comparing base (3138592) to head (61eeb03).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
Sources/SentrySwiftUI/SentryReplayView.swift 20.000% 8 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #4362       +/-   ##
=============================================
- Coverage   91.535%   91.451%   -0.085%     
=============================================
  Files          628       631        +3     
  Lines        50706     50757       +51     
  Branches     18396     18393        -3     
=============================================
+ Hits         46414     46418        +4     
- Misses        4199      4246       +47     
  Partials        93        93               
Files with missing lines Coverage Δ
Sources/SentrySwiftUI/SentryTracedView.swift 0.000% <ø> (ø)
...entryTests/SwiftUI/SentryRedactModifierTests.swift 100.000% <100.000%> (ø)
Sources/SentrySwiftUI/SentryReplayView.swift 20.000% <20.000%> (ø)

... and 6 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3138592...61eeb03. Read the comment docs.

Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

A few comments, nothing blocking.

Samples/iOS-SwiftUI/iOS-SwiftUI/ContentView.swift Outdated Show resolved Hide resolved
Sources/SentrySwiftUI/SentryReplayView.swift Show resolved Hide resolved
Sources/SentrySwiftUI/SentryReplayView.swift Outdated Show resolved Hide resolved
Copy link
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

Tests/SentryTests/SwiftUI/SentryRedactModifierTests.swift Outdated Show resolved Hide resolved
@brustolin brustolin merged commit e2a3ac7 into main Sep 25, 2024
62 of 65 checks passed
@brustolin brustolin deleted the feat/swiftui-redact branch September 25, 2024 11:03
@brustolin brustolin restored the feat/swiftui-redact branch September 26, 2024 12:06
@brustolin brustolin deleted the feat/swiftui-redact branch September 26, 2024 12:06
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.

Session Reply SwiftUI Views Redaction
3 participants