-
Notifications
You must be signed in to change notification settings - Fork 49
feat: new overview design #2022
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
WalkthroughThe changes update several components to accept Changes
Sequence Diagram(s)sequenceDiagram
participant OverviewPage
participant DisputeContext
participant Verdict
participant FinalDecision
participant DisputeTimeline
OverviewPage->>DisputeContext: Render with {dispute, disputeDetails, votingHistory, disputeId, isRpcError}
OverviewPage->>Verdict: Render with {arbitrable, votingHistory}
Verdict->>FinalDecision: Pass {arbitrable, votingHistory}
Verdict->>DisputeTimeline: Pass {arbitrable}
DisputeContext->>DisputeContext: Compute jurorRewardsDispersed from votingHistory
DisputeContext->>DisputeContext: Conditionally render ruling and rewards indicators
DisputeTimeline->>DisputeTimeline: Build timeline items (including enforcement) from props
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms (12)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
❌ Deploy Preview for kleros-v2-university failed. Why did it fail? →
|
✅ Deploy Preview for kleros-v2-testnet-devtools ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-neo ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for kleros-v2-testnet ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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 ignored due to path filters (1)
web/src/assets/svgs/icons/gavel-executed.svg
is excluded by!**/*.svg
📒 Files selected for processing (5)
web/src/components/DisputePreview/DisputeContext.tsx
(3 hunks)web/src/components/Verdict/DisputeTimeline.tsx
(3 hunks)web/src/components/Verdict/FinalDecision.tsx
(5 hunks)web/src/components/Verdict/index.tsx
(2 hunks)web/src/pages/Cases/CaseDetails/Overview/index.tsx
(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
web/src/components/DisputePreview/DisputeContext.tsx (4)
web/src/hooks/queries/useDisputeDetailsQuery.ts (1)
DisputeDetailsQuery
(8-8)web/src/hooks/queries/useVotingHistory.ts (1)
VotingHistoryQuery
(8-8)web/src/components/StyledSkeleton.tsx (1)
StyledSkeleton
(8-10)web/src/components/Divider.tsx (1)
Divider
(3-10)
web/src/components/Verdict/DisputeTimeline.tsx (5)
web/src/utils/index.ts (1)
getTxnExplorerLink
(13-14)web/src/components/ExternalLink.tsx (1)
ExternalLink
(5-9)web/src/utils/date.ts (1)
formatDate
(23-37)web/src/utils/getVoteChoice.ts (1)
getVoteChoice
(5-14)web/src/components/StyledIcons/ClosedCircleIcon.tsx (1)
StyledClosedCircle
(5-9)
web/src/components/Verdict/FinalDecision.tsx (1)
web/src/hooks/queries/useVotingHistory.ts (1)
VotingHistoryQuery
(8-8)
⏰ Context from checks skipped due to timeout of 90000ms (11)
- GitHub Check: Redirect rules - kleros-v2-neo
- GitHub Check: Header rules - kleros-v2-neo
- GitHub Check: Pages changed - kleros-v2-neo
- GitHub Check: Redirect rules - kleros-v2-testnet-devtools
- GitHub Check: Header rules - kleros-v2-testnet-devtools
- GitHub Check: Pages changed - kleros-v2-testnet-devtools
- GitHub Check: Redirect rules - kleros-v2-university
- GitHub Check: Header rules - kleros-v2-university
- GitHub Check: Pages changed - kleros-v2-university
- GitHub Check: contracts-testing
- GitHub Check: SonarCloud
🔇 Additional comments (9)
web/src/pages/Cases/CaseDetails/Overview/index.tsx (1)
59-59
: LGTM! Clean prop passing implementation.The changes correctly pass
votingHistory
anddispute
data to child components, following the pattern of lifting data fetching up and passing it down as props.Also applies to: 62-62
web/src/components/Verdict/index.tsx (1)
6-7
: LGTM! Proper type-safe prop drilling.The component correctly accepts and passes down
votingHistory
toFinalDecision
while maintaining type safety with the importedVotingHistoryQuery
type.Also applies to: 19-19, 22-22, 25-26
web/src/components/Verdict/FinalDecision.tsx (2)
15-15
: LGTM! Clean refactor to prop-based data flow.The component correctly receives
votingHistory
as a prop instead of fetching it internally, which improves data flow consistency across the application.Also applies to: 82-82, 85-85
103-108
: Good UI consolidation.The button text logic has been simplified and the voting link rendering is now consolidated within the
VerdictContainer
, making the component structure cleaner.Also applies to: 133-139
web/src/components/DisputePreview/DisputeContext.tsx (2)
92-93
: Good use of useMemo for derived state.The
jurorRewardsDispersed
computation is properly memoized to avoid unnecessary recalculations.
98-109
: Clean UI restructuring with conditional rendering.The new
TitleSection
wrapper and conditional rendering ofRulingAndRewardsIndicators
properly consolidates the UI logic that was previously spread across components.web/src/components/Verdict/DisputeTimeline.tsx (3)
66-71
: Good separation of concerns for transaction links.Splitting the explorer links into
txnDisputeCreatedLink
andtxnEnforcementLink
improves clarity and maintainability.
75-75
: Clean timeline structure with early return pattern.The early return for missing dispute data and the separation of base timeline items improve code readability and maintainability.
Also applies to: 80-92
131-142
: Well-implemented enforcement timeline item.The conditional addition of the enforcement item with appropriate icon and transaction link properly completes the dispute timeline visualization.
Code Climate has analyzed commit f5f2530 and detected 8 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
|
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.
lgtm
PR-Codex overview
This PR focuses on enhancing the
DisputeInfoCard
,DisputeContext
, andVerdict
components by adding new props for better functionality and integrating additional data handling, especially around voting history and dispute details.Detailed summary
isList
andisOverview
props toCardLabel
.DisputeContext
to acceptdisputeId
andvotingHistory
.Verdict
component to includevotingHistory
.FinalDecision
to usevotingHistory
and adjusted button text.DisputeTimeline
to include enforcement details and transaction links.Summary by CodeRabbit