Skip to content

feat: With maskAllText, mask the attributes: placeholder, title, aria-label - #40

Merged
billyvg merged 5 commits into
sentry-v1from
feat-mask-placeholder-title-attributes
Feb 8, 2023
Merged

feat: With maskAllText, mask the attributes: placeholder, title, aria-label#40
billyvg merged 5 commits into
sentry-v1from
feat-mask-placeholder-title-attributes

Conversation

@billyvg

@billyvgbillyvg commented Feb 2, 2023

Copy link
Copy Markdown
Member

If maskAllText is enabled, let's mask some specific attributes: placeholder, title, and aria-label. I've opted to just hardcode these instead of adding them as options for now since they are only tied to maskAllText.

Depends on #35

@billyvg
billyvg changed the base branch from sentry-v1 to feat-native-mask-all-text-optionFebruary 2, 2023 22:24
@billyvg
billyvgforce-pushed the feat-native-mask-all-text-option branch 2 times, most recently from 60d7d40 to 326ab31CompareFebruary 3, 2023 19:12
@billyvg
billyvgforce-pushed the feat-mask-placeholder-title-attributes branch from e69e2aa to eec6a2fCompareFebruary 3, 2023 19:36
@billyvgbillyvg changed the title feat mask placeholder title attributesfeat: With maskAllText, mask the attributes: placeholder, title, aria-labelFeb 3, 2023
@billyvg
billyvg requested review from Lms24 and mydeaFebruary 3, 2023 19:40

@Lms24Lms24 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

Comment = 5
}
export declare type documentNode = {
export type documentNode = {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No action required, just curious: Why remove the declare here?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

I think this was auto generated? I'll undo and see what happens

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

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

Yeah not sure what happened before, but export type is the correct statement (it also watches others in the file for type).

@billyvgbillyvg mentioned this pull request Feb 7, 2023
Base automatically changed from feat-native-mask-all-text-option to sentry-v1February 8, 2023 18:32
Similar to `maskAllInputs`, this option will mask all text nodes (except those defined by `unmaskSelector`)
Mask the title and placeholder attributes when `maskAllText` is enabled.
If textarea has a child string content, it will get duplicated as a
`value` attribute. Masking by text vs input can cause these two values
to diverge (i.e. only one is masked). On playback, we remove duplicate
textContent for textareas, which means we could show double textarea
values: one masked, one unmasked.
@billyvg
billyvgforce-pushed the feat-mask-placeholder-title-attributes branch from f7c1e66 to 736070aCompareFebruary 8, 2023 18:37
@billyvg
billyvg merged commit 9f70e0e into sentry-v1Feb 8, 2023
@billyvg
billyvg deleted the feat-mask-placeholder-title-attributes branch February 8, 2023 20:18
Sign up for freeto 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

@billyvg@Lms24