Agentic Setup: Fix onboarding copy prompt CTA appearing without hover#34696
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the CopyButton wrapper used in the sidebar onboarding checklist so it can forward additional props to the underlying ActionList.Button, which is needed for correct hover/targeting behavior (e.g., data-target-id used by the hover UI).
Changes:
- Add rest props (
...props) toCopyButtonand spread them ontoActionList.Button. - Reformat the
CopyButtonreturn to support prop forwarding.
Comments suppressed due to low confidence (1)
code/core/src/manager/components/sidebar/ChecklistWidget.tsx:185
CopyButtonnow forwards...propstoActionList.Button, but the component’s props type still only declareslabel,copyContent, andonClick. As a result, JSX usages likedata-target-id(and any other button props you intend to forward) will still be a TypeScript error. Update theCopyButtonprops type to extend the underlyingActionList.Buttonprops (e.g.,React.ComponentProps<typeof ActionList.Button>), omitting conflicting keys likechildren/onClickas needed so callers can pass through DOM/ARIA/data attributes safely.
...props
}: {
label: string;
copyContent: string;
onClick: (e: SyntheticEvent) => void;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe ChangesProps Forwarding Enhancement
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes ✨ Finishing Touches📝 Generate docstrings
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Review rate limit: 4/5 reviews remaining, refill in 12 minutes. Comment |
Fixed with canary
Summary by CodeRabbit