Skip to content

refactor: unify FilterButton and ExplorerFilterButton into single component#990

Merged
anderdc merged 4 commits into
entrius:testfrom
bcExpt1123:refactor/unify-filter-pill-component
May 12, 2026
Merged

refactor: unify FilterButton and ExplorerFilterButton into single component#990
anderdc merged 4 commits into
entrius:testfrom
bcExpt1123:refactor/unify-filter-pill-component

Conversation

@bcExpt1123
Copy link
Copy Markdown
Contributor

Summary

Unified the FilterButton and ExplorerFilterButton components into a single, consolidated component to eliminate code duplication and standardize the API across the application. This refactor improves maintainability by centralizing filter pill styling and behavior, adopting responsive design patterns, and normalizing visual consistency across all tables.

Key changes include:

  • Consolidated duplicate filter pill components into one source of truth
  • Standardized prop API (changed selected to isActive, made count optional, added activeTextColor)
  • Adopted responsive styling from ExplorerFilterButton (responsive padding, font sizes, etc.)
  • Normalized visual styles across all tables for consistency
  • Migrated all call sites to use the unified component
  • Removed the redundant ExplorerFilterButton component

Related Issues

closes #980

Type of Change

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

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

…ponent

- Consolidate duplicate filter pill components into one source of truth
- Standardize prop API (use isActive, optional count, add �ctiveTextColor)
- Adopt responsive styling from ExplorerFilterButton
- Normalize visual styles across all tables for consistency
- Migrate all 10 call sites to unified component
- Remove ExplorerFilterButton
@xiao-xiao-mao xiao-xiao-mao Bot added the refactor Code restructuring without behavior change label May 8, 2026
@anderdc
Copy link
Copy Markdown
Collaborator

anderdc commented May 9, 2026

Fix conflicts.

@ventura-oss
Copy link
Copy Markdown
Contributor

Could you please resolve the merge conflicts so we can proceed with the review?

@bcExpt1123
Copy link
Copy Markdown
Contributor Author

Fixed conflicts. please review again. thanks

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.

Please scope this down to what #980 asks for. Keep: FilterButton.tsx consolidation, ExplorerFilterButton.tsx deletion, and the three miner-table call-site updates. Drop: src/components/miners/MinerIssuesTable.tsx — it was removed in #900 (0376a44) and is unrelated to #980. Also missing screenshots for the visual change to FilterButton at its existing call sites.

@bcExpt1123
Copy link
Copy Markdown
Contributor Author

Please scope this down to what #980 asks for. Keep: FilterButton.tsx consolidation, ExplorerFilterButton.tsx deletion, and the three miner-table call-site updates. Drop: src/components/miners/MinerIssuesTable.tsx — it was removed in #900 (0376a44) and is unrelated to #980. Also missing screenshots for the visual change to FilterButton at its existing call sites.

I've deleted src/components/miners/MinerIssuesTable.tsx. and I've attached screenshots. Please review:

Before:
Screenshot_21

After:
Screenshot_22

@anderdc anderdc merged commit ee1379c into entrius:test May 12, 2026
2 checks passed
galuis116 added a commit to galuis116/gittensor-ui that referenced this pull request May 12, 2026
ExplorerFilterButton was removed in favor of FilterButton (entrius#990) but this
file still referenced FilterButton without an import, breaking tsc.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FilterButton and ExplorerFilterButton render the same control with different prop names and styling, used across ten tables

3 participants