Skip to content

Commit

Permalink
Chore: remove hotjar, as we're no longer using it
Browse files Browse the repository at this point in the history
  • Loading branch information
vanderhoop committed Apr 5, 2022
1 parent 3385b0d commit 0db9b26
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 40 deletions.
1 change: 0 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ module.exports = {
"expect": false,
"beforeEach": false,
"afterEach": false,
"hj": false,
"Honeybadger": false,
"mountWithConnectedSubcomponents": false,
},
Expand Down
11 changes: 0 additions & 11 deletions lib/remote_retro_web/templates/layout/app.html.eex
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@
</script>

<script>
// Hotjar Tracking Code for https://remoteretro.org
(function(h,o,t,j,a,r){
h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
h._hjSettings={hjid:650812,hjsv:6};
a=o.getElementsByTagName('head')[0];
r=o.createElement('script');r.async=1;
r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
a.appendChild(r);
})(window,document,'https://static.hotjar.com/c/hotjar-','.js?sv=');

// disable react dev tools in prod to eliminate possible attack vector
var hasReactDevToolsExtension = typeof window.__REACT_DEVTOOLS_GLOBAL_HOOK__ === 'object'
if (hasReactDevToolsExtension) {
Expand All @@ -35,7 +25,6 @@
<% else %>
<!-- stub out vendor script funcs in dev/test -->
<script>
window.hj = () => {};
window.Honeybadger = {
notify: () => {},
setContext: () => {},
Expand Down
12 changes: 0 additions & 12 deletions test/components/remote_retro_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ describe("RemoteRetro component", () => {
},
}

context("when the component mounts", () => {
it("triggers a hotjar event, passing the stage", () => {
const hotjarSpy = spy(global, "hj")

shallow(
<RemoteRetro {...defaultProps} stage={CLOSED} />
)

expect(hotjarSpy).calledWith("trigger", CLOSED)
})
})

// we can't afford to have this integration break, as the grouping stage relies
// on viewport manipulation
it("renders a ViewportMetaTag, passing stage, alert, and browser orientation", () => {
Expand Down
2 changes: 0 additions & 2 deletions test/support/js/test_helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import Enzyme from "enzyme"
import Adapter from "enzyme-adapter-react-16"
import sinon from "sinon"
import PropTypes from "prop-types"
import noop from "lodash/noop"
import STAGES from "../../../web/static/js/configs/stages"

chai.use(chaiUUID)
Expand All @@ -18,7 +17,6 @@ const { IDEA_GENERATION } = STAGES

Enzyme.configure({ adapter: new Adapter() })

global.hj = noop
global.expect = expect
global.Image = function Image() {}
global.Honeybadger = { notify: () => {} }
Expand Down
2 changes: 1 addition & 1 deletion web/static/js/components/idea_content_base.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const IdeaContentBase = props => {
canUserEditIdeaContents={canUserEditIdeaContents}
/>
<div className="text">
<span data-hj-masked>{ idea.body }</span>
<span>{ idea.body }</span>
{assignee && <span className={styles.assignee}> ({assignee.name})</span>}
{isEdited && <span className={styles.editedIndicator}> (edited)</span>}
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/static/js/components/idea_live_edit_content.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const IdeaLiveEditContent = props => {
return (
<div className="ui raised segment">
<p className="ui center aligned sub dividing header">Facilitator is Editing</p>
<span data-hj-masked>{idea.liveEditText}</span>
<span>{idea.liveEditText}</span>
</div>
)
}
Expand Down
11 changes: 0 additions & 11 deletions web/static/js/components/remote_retro.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,6 @@ import Error from "./error"
import StageHelp from "./stage_help"

export class RemoteRetro extends Component {
// Trigger analytics events on page load and stage changes
componentDidMount() {
const { stage } = this.props
hj("trigger", stage)
}

componentDidUpdate(prevProps) {
const { stage } = this.props
if (prevProps.stage !== stage) { hj("trigger", stage) }
}

componentDidCatch(error) {
const { stage, presences, usersById } = this.props

Expand Down
2 changes: 1 addition & 1 deletion web/static/js/components/user_list_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const UserListItem = ({ user, votes, isVotingStage, currentUser, actions
</button>
)}
<img className={styles.picture} src={imgSrc} alt={identifier} />
<p data-hj-masked>{identifier}</p>
<p>{identifier}</p>
{ isVotingStage ? (
<p className={`${styles.allVotesIn} ${allVotesIn ? "opaque" : ""}`}>ALL VOTES IN</p>
) : (
Expand Down

0 comments on commit 0db9b26

Please sign in to comment.