Skip to content

Resources tab: Add statsig logging to triggered tours#72313

Merged
molly-moen merged 5 commits intostagingfrom
molly/intro-flows-statsig
Apr 23, 2026
Merged

Resources tab: Add statsig logging to triggered tours#72313
molly-moen merged 5 commits intostagingfrom
molly/intro-flows-statsig

Conversation

@molly-moen
Copy link
Copy Markdown
Contributor

@molly-moen molly-moen commented Apr 23, 2026

This adds statsig logging to tours triggered via the resource tab. I did a little refactoring to share metric names between the auto-triggered tours and the resource tab-triggered tours.
I also found a styling bug in the tour play button, it wasn't using MUI styles and was not theming correctly. I switched it to use MUI styles, and they now match the mocks.

Button colors before

Screenshot 2026-04-23 at 11 09 06 AM Screenshot 2026-04-23 at 11 08 57 AM

Button colors after

Screenshot 2026-04-23 at 11 11 19 AM Screenshot 2026-04-23 at 11 11 12 AM

Links

Testing story

Tested locally.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds richer analytics logging for product tours started from the Resources tab, and refactors tour configuration so analytics “flowName” values are sourced consistently from a shared configuration object.

Changes:

  • Introduces TriggerSource and includes it in intro-flow analytics events for both auto-triggered tours and Resources-tab-triggered tours.
  • Refactors product tour configs to include a shared metricName, removing duplicated flow-name constants.
  • Fixes the Resources tab “play tour” button styling by switching to MUI IconButton styling props.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
apps/test/unit/lab2/productTours/useResourcePanelToursTest.ts Updates test setup to source flow names from ProductTourConfigurations (but assertions likely need updating for new payload fields).
apps/src/sketchlab/excalidraw/introTour/useSketchlabTour.ts Adds triggerSource and uses centralized metricName for analytics payloads.
apps/src/lab2/views/components/Instructions/ResourcePanel/constants.ts Removes duplicated resource-panel tour flow-name constants.
apps/src/lab2/views/components/Instructions/ResourcePanel/StudentResources/guided-walkthroughs.module.scss Removes custom .tourPlayButton styling (now handled via MUI props).
apps/src/lab2/views/components/Instructions/ResourcePanel/StudentResources/GuidedWalkthroughs.tsx Adds analytics events for tours started from Student Resources tab; switches play button to MUI styling props.
apps/src/lab2/productTours/useResourcePanelTours.ts Adds triggerSource to analytics payloads; sources flow names from ProductTourConfigurations.metricName.
apps/src/lab2/productTours/productToursPerLab.ts Adds metricName to ProductTourConfig and exports ProductTourConfigurations for reuse.
apps/src/lab2/productTours/constants.ts Adds TriggerSource enum to standardize analytics trigger-source values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/src/lab2/productTours/useResourcePanelTours.ts
@molly-moen molly-moen marked this pull request as ready for review April 23, 2026 18:16
@molly-moen molly-moen requested a review from a team April 23, 2026 18:16
Copy link
Copy Markdown
Contributor

@fisher-alice fisher-alice left a comment

Choose a reason for hiding this comment

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

Looks good! Just left a small question.

Comment thread apps/src/lab2/productTours/useResourcePanelTours.ts Outdated
@molly-moen molly-moen merged commit d5e108a into staging Apr 23, 2026
8 checks passed
@molly-moen molly-moen deleted the molly/intro-flows-statsig branch April 23, 2026 22:29
Sign up for free to 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.

3 participants