-
Notifications
You must be signed in to change notification settings - Fork 213
feat(product tours): support auto-launch field, reduce bundle size #2724
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(product tours): support auto-launch field, reduce bundle size #2724
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 No Changeset FoundThis PR doesn't include a changeset. A changeset (and the release label) is required to release a new version. How to add a changesetRun this command and follow the prompts: pnpm changesetRemember: Never use |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
Size Change: 0 B Total Size: 5.19 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7 files reviewed, 2 comments
| "hls.js": "^1.5.15", | ||
| "next": "^15.5.7", | ||
| "posthog-js": "*", | ||
| "posthog-js": "file:/Users/adambowker/posthog-js/target/posthog-js.tgz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
syntax: hardcoded local file path should not be committed
| "posthog-js": "file:/Users/adambowker/posthog-js/target/posthog-js.tgz", | |
| "posthog-js": "*", |
Prompt To Fix With AI
This is a comment left during a code review.
Path: playground/nextjs/package.json
Line: 23:23
Comment:
**syntax:** hardcoded local file path should not be committed
```suggestion
"posthog-js": "*",
```
How can I resolve this? If you propose a fix, please make it concise.| // Determine the trigger selector - explicit trigger_selector takes precedence, | ||
| // otherwise use conditions.selector for click-only tours (auto_launch=false) | ||
| const triggerSelector = tour.trigger_selector || (!tour.auto_launch ? tour.conditions?.selector : null) | ||
|
|
||
| // Tours with a trigger selector: always attach listener | ||
| // These are "on-demand" tours that show when clicked | ||
| if (tour.trigger_selector) { | ||
| if (triggerSelector) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: when tour.auto_launch is undefined (not explicitly set), !tour.auto_launch evaluates to true, meaning tours without an explicit auto_launch field will use conditions.selector as a trigger selector. This changes the default behavior for existing tours that don't have the auto_launch field set. Consider checking explicitly for tour.auto_launch === false instead of !tour.auto_launch to preserve backwards compatibility.
Prompt To Fix With AI
This is a comment left during a code review.
Path: packages/browser/src/extensions/product-tours/product-tours.tsx
Line: 193:199
Comment:
**logic:** when `tour.auto_launch` is `undefined` (not explicitly set), `!tour.auto_launch` evaluates to `true`, meaning tours without an explicit `auto_launch` field will use `conditions.selector` as a trigger selector. This changes the default behavior for existing tours that don't have the `auto_launch` field set. Consider checking explicitly for `tour.auto_launch === false` instead of `!tour.auto_launch` to preserve backwards compatibility.
How can I resolve this? If you propose a fix, please make it concise.
Problem
Changes
Release info Sub-libraries affected
Libraries affected
Checklist
If releasing new changes
pnpm changesetto generate a changeset file