-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Make program reward modifiers tooltip scrollable #2895
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughExtracted tooltip content into an internal component, added a public props type, and integrated scroll-tracking with a bottom fade; rendering now delegates to a content component passed into InfoTooltip while preserving reward/modifier and OR-divider logic. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant IT as InfoTooltip
participant P as ProgramRewardModifiersTooltip
participant C as ProgramRewardModifiersTooltipContent
participant SP as useScrollProgress
U->>IT: hover/focus
IT->>P: mount content component
P->>C: pass `reward` props
activate C
C->>C: render base reward, OR sections, modifiers
C->>SP: init scroll tracking with container ref
SP-->>C: emit scroll progress (0..1)
C->>C: render progress overlay & bottom fade based on progress
deactivate C
IT-->>U: display tooltip content
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code graph analysis (1)apps/web/ui/partners/program-reward-modifiers-tooltip.tsx (3)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
apps/web/ui/partners/program-reward-modifiers-tooltip.tsx(2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
apps/web/ui/partners/program-reward-modifiers-tooltip.tsx (3)
apps/web/lib/zod/schemas/rewards.ts (2)
ATTRIBUTE_LABELS(84-92)rewardConditionsArraySchema(131-133)apps/web/lib/types.ts (1)
RewardProps(504-504)packages/ui/src/hooks/use-scroll-progress.ts (1)
useScrollProgress(6-37)
🪛 Biome (2.1.2)
apps/web/ui/partners/program-reward-modifiers-tooltip.tsx
[error] 53-53: This hook is being called conditionally, but all hooks must be called in the exact same order in every component render.
Hooks should not be called after an early return.
For React to preserve state between calls, hooks needs to be called unconditionally and always in the same order.
See https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
(lint/correctness/useHookAtTopLevel)
[error] 54-54: This hook is being called conditionally, but all hooks must be called in the exact same order in every component render.
Hooks should not be called after an early return.
For React to preserve state between calls, hooks needs to be called unconditionally and always in the same order.
See https://reactjs.org/docs/hooks-rules.html#only-call-hooks-at-the-top-level
(lint/correctness/useHookAtTopLevel)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build
Summary by CodeRabbit
New Features
Refactor