Revert summary separator rendering changes#1385
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughThe TransactionDetailsReceipt component was refactored to replace grouped-border visibility logic with simpler single-criteria border logic. Multiple PaymentInfoRow instances now use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (1)
246-259: Consider removing unused grouped-border infrastructure or documenting the timeline for re-enablement.The
shouldHideGroupBorderfunction and its supporting infrastructure (rowGroups,lastVisibleInGroups,getLastVisibleInGroup) are defined but unused after this refactor. While the TODO comment indicates these will be re-enabled, keeping unused code can:
- Increase cognitive load for maintainers
- Risk divergence if the main logic evolves before re-enablement
- Cause confusion about which helpers are actually in use
Consider either:
- Removing this infrastructure now and restoring it when tackling grouped borders
- Adding a more specific TODO with a timeline or issue reference
- Adding JSDoc comments to clarify these are intentionally unused pending future work
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx(5 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-10-24T12:38:32.793Z
Learnt from: jjramirezn
Repo: peanutprotocol/peanut-ui PR: 478
File: src/components/Request/Create/Views/Initial.view.tsx:81-89
Timestamp: 2024-10-24T12:38:32.793Z
Learning: In `src/components/Request/Create/Views/Initial.view.tsx`, the function `getTokenDetails` is a simple function that does not fetch from the network or perform asynchronous operations.
Applied to files:
src/components/TransactionDetails/TransactionDetailsReceipt.tsx
🧬 Code graph analysis (1)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (2)
src/components/Payment/PaymentInfoRow.tsx (1)
PaymentInfoRow(18-87)src/utils/general.utils.ts (1)
formatDate(522-534)
⏰ 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: Deploy-Preview
🔇 Additional comments (1)
src/components/TransactionDetails/TransactionDetailsReceipt.tsx (1)
601-601: Consistent simplification of border logic across all affected rows.The replacement of
shouldHideGroupBorderwithshouldHideBorderis applied consistently across allPaymentInfoRowinstances. This simplifies the separator rendering from group-aware logic to a single criterion (global last visible row), which aligns with the PR objective.Note: This changes the visual appearance by removing group separators between logical sections (dateRows, txnDetails, fees). All rows except the final visible row will now show borders.
Also applies to: 609-609, 617-617, 625-625, 709-709, 736-736, 1091-1091, 1099-1099
No description provided.