Skip to content

Commit

Permalink
feat: add hotjar suppression to PII (#385)
Browse files Browse the repository at this point in the history
  • Loading branch information
zainab-amir authored Sep 22, 2020
1 parent 563cd4b commit 2f9f573
Show file tree
Hide file tree
Showing 8 changed files with 145 additions and 104 deletions.
8 changes: 5 additions & 3 deletions src/profile/ProfilePage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,11 @@ class ProfilePage extends React.Component {

return (
<React.Fragment>
<h1 className="h2 mb-0 font-weight-bold">{this.props.match.params.username}</h1>
<DateJoined date={dateJoined} />
<hr className="d-none d-md-block" />
<span data-hj-suppress>
<h1 className="h2 mb-0 font-weight-bold">{this.props.match.params.username}</h1>
<DateJoined date={dateJoined} />
<hr className="d-none d-md-block" />
</span>
</React.Fragment>
);
}
Expand Down
215 changes: 125 additions & 90 deletions src/profile/__snapshots__/ProfilePage.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -86,24 +86,28 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
<div
className="d-md-none"
>
<h1
className="h2 mb-0 font-weight-bold"
<span
data-hj-suppress={true}
>
verified
</h1>
<p
className="mb-0"
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
verified
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
Expand All @@ -119,24 +123,28 @@ exports[`<ProfilePage /> Renders correctly in various states viewing other profi
<div
className="d-none d-md-block mb-4"
>
<h1
className="h2 mb-0 font-weight-bold"
>
verified
</h1>
<p
className="mb-0"
<span
data-hj-suppress={true}
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
verified
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
Expand Down Expand Up @@ -277,6 +285,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
<img
alt="profile avatar"
className="w-100 h-100 d-block rounded-circle overflow-hidden"
data-hj-suppress={true}
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
style={
Object {
Expand Down Expand Up @@ -307,24 +316,28 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
<div
className="d-md-none"
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
<span
data-hj-suppress={true}
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
Expand Down Expand Up @@ -359,24 +372,28 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
<div
className="d-none d-md-block mb-4"
>
<h1
className="h2 mb-0 font-weight-bold"
<span
data-hj-suppress={true}
>
staff
</h1>
<p
className="mb-0"
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
Expand Down Expand Up @@ -485,6 +502,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
<p
className="h5"
data-hj-suppress={true}
>
Lemon Seltzer
</p>
Expand Down Expand Up @@ -580,6 +598,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
<p
className="h5"
data-hj-suppress={true}
>
Montenegro
</p>
Expand Down Expand Up @@ -670,6 +689,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
<p
className="h5"
data-hj-suppress={true}
>
Yoruba
</p>
Expand Down Expand Up @@ -760,6 +780,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
<p
className="h5"
data-hj-suppress={true}
>
Elementary/primary school
</p>
Expand Down Expand Up @@ -1029,6 +1050,7 @@ exports[`<ProfilePage /> Renders correctly in various states viewing own profile
</div>
<p
className="lead"
data-hj-suppress={true}
>
This is my bio
</p>
Expand Down Expand Up @@ -1278,6 +1300,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
<img
alt="profile avatar"
className="w-100 h-100 d-block rounded-circle overflow-hidden"
data-hj-suppress={true}
src="http://localhost:18000/media/profile-images/d2a9bdc2ba165dcefc73265c54bf9a20_500.jpg?v=1552495012"
style={
Object {
Expand Down Expand Up @@ -1308,24 +1331,28 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
<div
className="d-md-none"
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
<span
data-hj-suppress={true}
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-none d-md-block float-right"
Expand Down Expand Up @@ -1360,24 +1387,28 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
<div
className="d-none d-md-block mb-4"
>
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
<span
data-hj-suppress={true}
>
<span>
Member since
<h1
className="h2 mb-0 font-weight-bold"
>
staff
</h1>
<p
className="mb-0"
>
<span>
2017
Member since
<span>
2017
</span>
</span>
</span>
</p>
<hr
className="d-none d-md-block"
/>
</p>
<hr
className="d-none d-md-block"
/>
</span>
</div>
<div
className="d-md-none mb-4"
Expand Down Expand Up @@ -1486,6 +1517,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
<p
className="h5"
data-hj-suppress={true}
>
Lemon Seltzer
</p>
Expand Down Expand Up @@ -1581,6 +1613,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
<p
className="h5"
data-hj-suppress={true}
>
Montenegro
</p>
Expand Down Expand Up @@ -1671,6 +1704,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
<p
className="h5"
data-hj-suppress={true}
>
Yoruba
</p>
Expand Down Expand Up @@ -1761,6 +1795,7 @@ exports[`<ProfilePage /> Renders correctly in various states while saving an edi
</div>
<p
className="h5"
data-hj-suppress={true}
>
Elementary/primary school
</p>
Expand Down
4 changes: 2 additions & 2 deletions src/profile/forms/Bio.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Bio extends React.Component {
showVisibility={visibilityBio !== null}
visibility={visibilityBio}
/>
<p className="lead">{bio}</p>
<p data-hj-suppress className="lead">{bio}</p>
</React.Fragment>
),
empty: (
Expand All @@ -109,7 +109,7 @@ class Bio extends React.Component {
static: (
<React.Fragment>
<EditableItemHeader content={intl.formatMessage(messages['profile.bio.about.me'])} />
<p className="lead">{bio}</p>
<p data-hj-suppress className="lead">{bio}</p>
</React.Fragment>
),
}}
Expand Down
Loading

0 comments on commit 2f9f573

Please sign in to comment.