-
Notifications
You must be signed in to change notification settings - Fork 3
TOK-870: fix allocation sliders #1273
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
base: main
Are you sure you want to change the base?
Conversation
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
6e53b31
to
7b47c4b
Compare
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.
Pull Request Overview
This PR fixes allocation sliders to represent the ratio of available stRIF only, as part of TOK-870. The changes refactor the allocation system from a spread prop pattern to a more structured approach with explicit backing state management.
- Refactors BuilderCard and AllocationInput components to use structured props instead of spread syntax
- Updates allocation logic to properly calculate available backing based on stRIF balance and existing allocations
- Removes unused components (TotalBackingMetric, AvailableBackingMetric) and consolidates their functionality into inline components
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 5 comments.
Show a summary per file
File | Description |
---|---|
src/components/TokenAmountDisplay/TokenAmountDisplay.tsx | Reorders imports and adds TODO comment for actions prop |
src/app/shared/components/BuildersSpotlight/BuildersSpotlight.tsx | Changes from spread props to explicit builder prop |
src/app/shared/components/BuilderCard/BuilderCardControl.tsx | Major refactor to use structured backing state props instead of individual allocation props |
src/app/shared/components/BuilderCard/BuilderCard.tsx | Updates component interface to accept structured props and removes internal state management |
src/app/shared/components/BuilderCard/BuilderCard.stories.tsx | Updates stories to match new component interface with structured backing state |
src/app/backing/components/index.ts | Removes all exports (component cleanup) |
src/app/backing/components/TotalBackingMetric/* | Removes entire component and its stories |
src/app/backing/components/Spotlight/Spotlight.tsx | Updates to use new builder prop pattern |
src/app/backing/components/AvailableBackingMetric/* | Removes entire component and its stories |
src/app/backing/components/AllocationInput/AllocationInput.tsx | Major refactor to handle structured backing state and fix slider calculations |
src/app/backing/components/AllocationInput/AllocationInput.stories.tsx | Updates stories to match new component interface |
src/app/backing/BackingPage.tsx | Inlines removed components and updates allocation distribution logic |
a276498
to
ae2d530
Compare
…ilable strif only cleanup moving alocation metrics component to backing page make allocationInput free of context fixes allocs input value fix(backing): allows slider to pick all
39f281d
to
ca47afe
Compare
Changes allocation sliders to represent the ratio of available stRIF, only.