Skip to content

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

jurajpiar
Copy link
Contributor

@jurajpiar jurajpiar commented Aug 4, 2025

Changes allocation sliders to represent the ratio of available stRIF, only.

  • fix user stories

@jurajpiar jurajpiar added the collective-rewards PRs that touch CR parts label Aug 4, 2025
Copy link

github-actions bot commented Aug 4, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@jurajpiar jurajpiar force-pushed the TOK-870/backing_cards_fix branch 8 times, most recently from 6e53b31 to 7b47c4b Compare August 5, 2025 14:23
@jurajpiar jurajpiar marked this pull request as ready for review August 5, 2025 14:23
@jurajpiar jurajpiar requested review from a team and Copilot August 5, 2025 14:23
Copy link
Contributor

@Copilot Copilot AI left a 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

@jurajpiar jurajpiar force-pushed the TOK-870/backing_cards_fix branch 5 times, most recently from a276498 to ae2d530 Compare August 7, 2025 09:45
…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
@jurajpiar jurajpiar force-pushed the TOK-870/backing_cards_fix branch 2 times, most recently from 39f281d to ca47afe Compare August 7, 2025 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
collective-rewards PRs that touch CR parts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant