Skip to content

Commit

Permalink
fix: remove Segment event for rendering toggle (#26)
Browse files Browse the repository at this point in the history
In #25, we added a Segment event for rendering the Xpert toggle button. This results in test failures in the downstream frontend-app-learning. These failures are likely due to the fact that the frontend-app-learning test is unable to mock out the frontend-platform module installed in this library. This results in failures, because the analytics service is not configured in the frontend-app-learning tests. In light of that, we've decided to move the render Segment event to the Chat component in the frontend-app-learning, which wraps the Xpert component.
  • Loading branch information
MichaelRoytman authored Sep 8, 2023
1 parent 43cef9f commit b6ab385
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/components/ToggleXpertButton/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,6 @@ const ToggleXpert = ({
});
};

// TODO: Remove this Segment alert. This has been added purely to diagnose whether
// usage issues are as a result of the Xpert toggle button not appearing.
sendTrackEvent('edx.ui.lms.learning_assistant.render_toggle_button', {
course_id: courseId,
});

return (
(!isOpen && (
<div className={
Expand Down

0 comments on commit b6ab385

Please sign in to comment.