refactor(guide-tooltip): migrate GuideTooltip from Flow to TypeScript - #4768
refactor(guide-tooltip): migrate GuideTooltip from Flow to TypeScript#4768bonchevskyi wants to merge 1 commit into
Conversation
WalkthroughGuideTooltip now uses an exported TypeScript props interface. Its barrel export and message definitions use TypeScript modules. Tests and story imports no longer use Flow syntax. ChangesGuideTooltip TypeScript migration
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/guide-tooltip/GuideTooltip.stories.tsx (1)
7-7: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse a checked suppression for the PNG import.
If the PNG import still lacks a module declaration, replace
@ts-ignorewith@ts-expect-error. Prefer a project-wide*.pngdeclaration when possible.Proposed change
-// `@ts-ignore` png import has no type declaration +// `@ts-expect-error`: PNG import has no type declaration🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/components/guide-tooltip/GuideTooltip.stories.tsx` at line 7, Replace the unchecked `@ts-ignore` suppression above the PNG import in the GuideTooltip story with `@ts-expect-error`, or use the project-wide *.png module declaration if one is available; preserve the import behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/components/guide-tooltip/GuideTooltip.stories.tsx`:
- Line 7: Replace the unchecked `@ts-ignore` suppression above the PNG import in
the GuideTooltip story with `@ts-expect-error`, or use the project-wide *.png
module declaration if one is available; preserve the import behavior.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 8956490b-0aa5-433d-b37f-fc0b14d4342d
📒 Files selected for processing (6)
src/components/guide-tooltip/GuideTooltip.stories.tsxsrc/components/guide-tooltip/GuideTooltip.tsxsrc/components/guide-tooltip/__tests__/GuideTooltip.test.tsxsrc/components/guide-tooltip/index.tssrc/components/guide-tooltip/messages.js.flowsrc/components/guide-tooltip/messages.ts
💤 Files with no reviewable changes (1)
- src/components/guide-tooltip/messages.js.flow
Convert GuideTooltip component to TypeScript
This PR converts
src/components/guide-tooltipfrom JavaScript with Flow to TypeScript.Changes
GuideTooltip.tsxmigration with exportedGuideTooltipPropsinterface and JSDoc on every propindex.tsto re-export the component andGuideTooltipPropsmessages.jstomessages.tsand addedmessages.js.flowfor Flow consumers__tests__/GuideTooltip.test.jstoGuideTooltip.test.tsxGuideTooltip.js.flow/index.js.flowstubs for backward compatibilityContract
Testing
src/components/guide-tooltip; all 4 passyarn lint:tsandflow checkpassComponents/GuideTooltip) that behavior is unchangedSummary by CodeRabbit
New Features
Enhancements