Resources tab: Add statsig logging to triggered tours#72313
Merged
molly-moen merged 5 commits intostagingfrom Apr 23, 2026
Merged
Resources tab: Add statsig logging to triggered tours#72313molly-moen merged 5 commits intostagingfrom
molly-moen merged 5 commits intostagingfrom
Conversation
Contributor
There was a problem hiding this comment.
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
TriggerSourceand 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
IconButtonstyling 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.
fisher-alice
approved these changes
Apr 23, 2026
Contributor
fisher-alice
left a comment
There was a problem hiding this comment.
Looks good! Just left a small question.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Button colors after
Links
Testing story
Tested locally.