feat(link): add tracking props to links#120307
Conversation
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit bdcd791. Configure here.
| shapeVariant: _shapeVariant, | ||
| ...props | ||
| }: LinkButtonProps & {shapeVariant: 'rectangular' | 'square'}) => { | ||
| const {handleClick} = useClickTracking(props); |
There was a problem hiding this comment.
LinkButton tracking props filtered
High Severity
useClickTracking now runs inside StyledLinkButton, after shouldForwardProp drops non-DOM props via isPropValid. That strips analyticsEventKey, analyticsEventName, analyticsParams, busy, and variant, so custom LinkButton analytics never fire and busy clicks are no longer blocked. Previously these were read outside the styled component. Existing callers such as the resolve setup LinkButton lose their event keys.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit bdcd791. Configure here.
| } | ||
|
|
||
| return <Component {...behavior()} />; | ||
| return <Component {...propsWithBehavior} onClick={handleClick} />; |
There was a problem hiding this comment.
Analytics props leak to DOM
Medium Severity
Link spreads propsWithBehavior onto the underlying router/a component, including the new analyticsEventKey, analyticsEventName, and analyticsParams. Those are not valid DOM attributes, so React warns and analyticsParams (an object) is especially problematic on the anchor element.
Reviewed by Cursor Bugbot for commit bdcd791. Configure here.


No description provided.