Skip to content

feat(miner-details): add eligibility filter to per-repository standings#1259

Open
JamesR111 wants to merge 1 commit into
entrius:testfrom
JamesR111:feat/miner-repo-filter
Open

feat(miner-details): add eligibility filter to per-repository standings#1259
JamesR111 wants to merge 1 commit into
entrius:testfrom
JamesR111:feat/miner-repo-filter

Conversation

@JamesR111
Copy link
Copy Markdown

@JamesR111 JamesR111 commented May 22, 2026

Summary

Adds an All / Eligible / Ineligible filter to the per-repository standings section on the miner details page, making it easier to focus on repositories that are currently earning (or not earning) rewards on the active track.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Other (describe below)

Screenshots

Before

image

After

gorec-2026-05-22-06-52-42.webm

Checklist

  • New components are modularized/separated where sensible
  • Uses predefined theme (e.g. no hardcoded colors)
  • Responsive/mobile checked
  • Tested against the test API
  • npm run format and npm run lint:fix have been run
  • npm run build passes
  • Screenshots included for any UI/visual changes

@xiao-xiao-mao xiao-xiao-mao Bot added the enhancement New feature or request label May 22, 2026
Copy link
Copy Markdown
Collaborator

@anderdc anderdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reuse the existing eligibility-filter control instead of duplicating it.

src/components/leaderboard/TopMinersTable.tsx already defines EligibilityToggle (~line 989), the EligibilityFilter type (line 114), and the All/Eligible/Ineligible ELIGIBILITY_OPTIONS array (~line 982). This PR re-declares the same type and options in MinerRepoStandings.tsx and renders a fresh outlined ToggleButtonGroup.

  • Extract EligibilityToggle, EligibilityFilter, and ELIGIBILITY_OPTIONS into a shared module and import them in both places — drop the duplicated EligibilityFilter / ELIGIBILITY_FILTER_OPTIONS / ToggleButtonGroup block here.
  • EligibilityToggle is the soft pill segmented control already shipped on the leaderboard; the new outlined toggle group is the heavy MUI default, which is why the buttons read as out of place — reusing it makes this filter match the rest of the app.
  • The adjacent cards/table view toggle remains an outlined ToggleButtonGroup; style the two consistently so they don't clash side by side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants