Skip to content

Conversation

@billyvg
Copy link
Member

@billyvg billyvg commented Feb 10, 2023

  • feat: Add maskAllText option
  • feat: With maskAllText, mask the attributes: placeholder, title, aria-label
  • feat: fix masking on textarea

@github-actions
Copy link
Contributor

github-actions bot commented Feb 10, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.07 KB (-0.01% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 62.2 KB (0%)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.7 KB (0%)
@sentry/browser - ES6 CDN Bundle (minified) 55.34 KB (0%)
@sentry/browser - Webpack (gzipped + minified) 20.43 KB (0%)
@sentry/browser - Webpack (minified) 66.78 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.46 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 47.85 KB (0%)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 26.99 KB (0%)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.25 KB (0%)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 42.36 KB (+0.24% 🔺)
@sentry/replay - Webpack (gzipped + minified) 36.78 KB (+0.26% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.04 KB (+0.19% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 53.6 KB (+0.22% 🔺)

it('maskAllText takes precedence over maskTextSelector when specifiying maskAllText:true', async () => {
const { replay } = await mockSdk({ replayOptions: { maskAllText: true, maskTextSelector: '[custom]' } });

expect(replay['_recordingOptions'].maskTextSelector).toBe(MASK_ALL_TEXT_SELECTOR);
Copy link
Member Author

@billyvg billyvg Feb 10, 2023

Choose a reason for hiding this comment

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

So this fixes another bug where maskTextSelector was wrong when maskAllText:true, this should have included the default mask selectors. (I guess this doesn't really matter since it's all masked anyway).

@billyvg billyvg requested review from Lms24 and mydea and removed request for Lms24 February 10, 2023 02:18
Copy link
Member

@mydea mydea left a comment

Choose a reason for hiding this comment

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

LGTM!

Base automatically changed from feat-replay-add-privacy-test to develop February 10, 2023 14:34
- feat: Add `maskAllText` option
- feat: With maskAllText, mask the attributes: placeholder, title, `aria-label`
- feat: fix masking on `textarea`
@billyvg billyvg force-pushed the feat-replay-update-rrweb-mask-all-text-and-placeholders branch from 428d191 to 0454d8f Compare February 10, 2023 14:43
@billyvg billyvg marked this pull request as ready for review February 10, 2023 15:40
@billyvg billyvg merged commit ee301c3 into develop Feb 10, 2023
@billyvg billyvg deleted the feat-replay-update-rrweb-mask-all-text-and-placeholders branch February 10, 2023 18:02
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.

3 participants