Closed kemuru closed 1 month ago
The pull request introduces modifications to the GraphQL schema and related TypeScript files, focusing on the User
entity and its metrics. New fields totalCoherentVotes
, totalResolvedVotes
, and coherenceScore
are added, while the totalCoherent
field is removed. Changes in the KlerosCore.ts
file enhance the handling of juror votes, and various components and hooks are updated to reflect the new field names and structures.
File Path | Change Summary |
---|---|
subgraph/core/schema.graphql | - Added fields: totalCoherentVotes: BigInt! , totalResolvedVotes: BigInt! , coherenceScore: BigInt! in User .- Removed field: totalCoherent: BigInt! in User . |
subgraph/core/src/KlerosCore.ts | - Added import: ClassicVote .- Enhanced handleNewPeriod function for juror vote processing. |
subgraph/core/src/entities/User.ts | - Updated createUserFromAddress to use new properties.- Simplified resolveUserDispute function parameters and logic. |
web/src/hooks/queries/useTopUsersByCoherenceScore.ts | - Renamed field in query: totalCoherent to totalCoherentVotes , added totalResolvedVotes . |
web/src/hooks/queries/useUser.ts | - Renamed field in fragment: totalCoherent to totalCoherentVotes , added totalResolvedVotes . |
web/src/pages/Dashboard/JurorInfo/Coherency.tsx | - Updated ICoherency interface and component props to use new property names. |
web/src/pages/Dashboard/JurorInfo/Header.tsx | - Updated IHeader interface and component props to use new property names. |
web/src/pages/Dashboard/JurorInfo/index.tsx | - Renamed variables from totalCoherent to totalCoherentVotes and from totalResolvedDisputes to totalResolvedVotes . |
web/src/pages/Home/TopJurors/JurorCard/Coherency.tsx | - Updated ICoherency interface and component props to use new property names. |
web/src/pages/Home/TopJurors/JurorCard/DesktopCard.tsx | - Updated IDesktopCard interface to rename properties. |
web/src/pages/Home/TopJurors/JurorCard/MobileCard.tsx | - Updated IMobileCard interface to rename properties. |
web/src/pages/Home/TopJurors/JurorCard/index.tsx | - Updated IJurorCard interface to rename properties. |
subgraph/package.json | - Version updated from 0.7.4 to 0.7.6 . |
coherenceScore
at the vote level, as the new fields and logic enhance how coherence is tracked.totalCoherentVotes
and totalResolvedVotes
, which directly relate to the changes made in the main PR regarding the User
entity in the GraphQL schema.Type: FeatureπΏ
, Package: Web
π° In the realm of votes and scores,
A rabbit hops through open doors.
With coherent votes now shining bright,
User metrics take their flight!
A new dawn for jurors, clear and true,
Hooray for changes, fresh and new! π
Name | Link |
---|---|
Latest commit | 38efc1be80472467145585de14588c7fb36d6b10 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-neo/deploys/6703cbfa3ae0b30008321b11 |
Name | Link |
---|---|
Latest commit | 38efc1be80472467145585de14588c7fb36d6b10 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-university/deploys/6703cbfacba3f30008e32b37 |
Name | Link |
---|---|
Latest commit | 38efc1be80472467145585de14588c7fb36d6b10 |
Latest deploy log | https://app.netlify.com/sites/kleros-v2-testnet/deploys/6703cbfaaa39670008e270ff |
Deploy Preview | https://deploy-preview-1702--kleros-v2-testnet.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Code Climate has analyzed commit 38efc1be and detected 17 issues on this pull request.
Here's the issue category breakdown:
Category | Count |
---|---|
Complexity | 5 |
Duplication | 4 |
Style | 8 |
View more on Code Climate.
Issues
3 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
works good.
Summary by CodeRabbit
Release Notes
New Features
totalCoherentVotes
,totalResolvedVotes
, andcoherenceScore
.ClassicVote
, for improved dispute resolution.Improvements
Configuration
0.7.4
to0.7.6
.PR-Codex overview
This PR primarily focuses on renaming properties related to user voting metrics from
totalCoherent
tototalCoherentVotes
and updating the associated logic throughout the application. It also enhances the user level calculation by introducing minimum disputes criteria.Detailed summary
totalCoherent
tototalCoherentVotes
in various files.totalResolvedVotes
in multiple components.getUserLevelData
to includetotalResolvedDisputes
.computeCoherenceScore
to usetotalCoherentVotes
andtotalResolvedVotes
.resolveUserDispute
function to simplify parameters and logic.