diff --git a/apps/antalmanac/src/components/PatchNotes.tsx b/apps/antalmanac/src/components/PatchNotes.tsx
index eab0a78bc..601003c8e 100644
--- a/apps/antalmanac/src/components/PatchNotes.tsx
+++ b/apps/antalmanac/src/components/PatchNotes.tsx
@@ -51,15 +51,18 @@ function PatchNotes() {
data-testid={dialogTestId}
slots={{ backdrop: PatchNotesBackdrop }}
>
- {"What's New - August 2023"}
+ {"What's New - October 2023"}Features
-
Courses will now be greyed out if they conflict with your current schedule
+
+ You can now hover over the Zotistics button to see the Zotistics graph! On mobile, you can still
+ click the Zotistics button to toggle the graph.
+
{
const [bannerVisibility, setBannerVisibility] = React.useState(true);
diff --git a/apps/antalmanac/src/components/RightPane/SectionTable/CourseInfoButton.tsx b/apps/antalmanac/src/components/RightPane/SectionTable/CourseInfoButton.tsx
index 0f54c60fd..4899f1271 100644
--- a/apps/antalmanac/src/components/RightPane/SectionTable/CourseInfoButton.tsx
+++ b/apps/antalmanac/src/components/RightPane/SectionTable/CourseInfoButton.tsx
@@ -1,7 +1,7 @@
-import { Button, Popover, useMediaQuery } from '@material-ui/core';
+import { Button, Paper, Popper, useMediaQuery } from '@material-ui/core';
import { withStyles } from '@material-ui/core/styles';
import { ClassNameMap } from '@material-ui/core/styles/withStyles';
-import React, { useState } from 'react';
+import React, { useEffect, useState } from 'react';
import { MOBILE_BREAKPOINT } from '../../../globals';
import { logAnalytics } from '$lib/analytics';
@@ -34,25 +34,55 @@ function CourseInfoButton({
}: CourseInfoButtonProps) {
const [popupAnchor, setPopupAnchor] = useState(null);
const isMobileScreen = useMediaQuery(`(max-width: ${MOBILE_BREAKPOINT})`);
+ const [isClicked, setIsClicked] = useState(false);
+
+ useEffect(() => {
+ // When the user clicks on the button, it triggers both onMouseEnter
+ // and onClick. In order to log the analytics only once, we should
+ // have this hook when the popupAnchor changes
+ if (popupAnchor) {
+ logAnalytics({
+ category: analyticsCategory,
+ action: analyticsAction,
+ });
+ }
+ }, [popupAnchor, analyticsCategory, analyticsAction]);
+
+ const handleMouseEnter = (event: React.MouseEvent) => {
+ // If there is popup content, allow the content to be shown when the button is hovered
+ // Note that on mobile devices, hovering is not possible, so the popup still needs to be able
+ // to appear when the button is clicked
+ if (popupContent) {
+ setPopupAnchor(event.currentTarget);
+ }
+ };
+
+ const handleMouseLeave = () => {
+ if (popupContent) {
+ setIsClicked(false);
+ setPopupAnchor(null);
+ }
+ };
+
return (
- <>
+