Skip to content

refactor: remove hardcoded data window strings in dashboard components#1405

Closed
Sarthak-Nayak wants to merge 7 commits into
Priyanshu-byte-coder:mainfrom
Sarthak-Nayak:refactor/remove-hardcoded-data-window
Closed

refactor: remove hardcoded data window strings in dashboard components#1405
Sarthak-Nayak wants to merge 7 commits into
Priyanshu-byte-coder:mainfrom
Sarthak-Nayak:refactor/remove-hardcoded-data-window

Conversation

@Sarthak-Nayak
Copy link
Copy Markdown
Contributor

Description

Refactored multiple dashboard metrics components to eliminate hardcoded date window text strings (e.g., "Last 90d", "Last 30d"). These UI labels are now dynamically generated using array mapping and template literals derived directly from their respective tracking constants and state variables. This ensures the UI remains synced and robust against future date window configuration changes.

Changes Made

  • Updated dropdown options in CommitTimeChart.tsx, ActivityRingChart.tsx, and other dashboard cards to dynamically map over day values.
  • Updated internal component definitions in page.tsx to utilize a unified data window constant for public metrics visibility.

Closes

Closes #956

@vercel
Copy link
Copy Markdown

vercel Bot commented May 28, 2026

@Sarthak-Nayak is attempting to deploy a commit to the PRIYANSHU DOSHI's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot added gssoc26 GSSoC 2026 contribution type:refactor GSSoC type bonus: refactor (+10 pts) type:testing GSSoC type bonus: tests (+10 pts) labels May 28, 2026
@github-actions
Copy link
Copy Markdown

GSSoC Label Checklist 🏷️

@Priyanshu-byte-coder — please apply the appropriate labels before merging:

Difficulty (pick one):

  • level:beginner — 20 pts
  • level:intermediate — 35 pts
  • level:advanced — 55 pts
  • level:critical — 80 pts

Quality (optional):

  • quality:clean — ×1.2 multiplier
  • quality:exceptional — ×1.5 multiplier

Validation (required to score):

  • gssoc:approved — counts for points
  • gssoc:invalid / gssoc:spam / gssoc:ai-slop — does not score

Type labels (type:*) are auto-detected from files and title. Review and adjust if needed.
Points formula: (difficulty × quality_multiplier) + type_bonus

@Sarthak-Nayak Sarthak-Nayak deleted the refactor/remove-hardcoded-data-window branch May 28, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc26 GSSoC 2026 contribution type:refactor GSSoC type bonus: refactor (+10 pts) type:testing GSSoC type bonus: tests (+10 pts)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GOOD FIRST ISSUE] Replace hardcoded 'Last 90 days' text with dynamic date range label

1 participant