feat: Explicit empty states for charts (no misleading zeros)#1122
Merged
anderdc merged 2 commits intoMay 16, 2026
Merged
Conversation
Contributor
Author
|
Hi, @anderdc , @ventura-oss |
anderdc
approved these changes
May 16, 2026
hunnyboy1217
added a commit
to hunnyboy1217/gittensor-ui
that referenced
this pull request
May 16, 2026
Resolve conflicts between the GitHub-aligned light mode work and recent upstream changes: keep theme-aware chart colors alongside the new ChartEmptyPanel empty-states (entrius#1122), reconcile the simplified onboarding (entrius#1069) by adopting the new AboutContent and dropping Scoring.tsx, and fold the RepositoryCodeBrowser GoToFileSearch (entrius#1144) into the breadcrumb layout with theme tokens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When charts had no meaningful data—a new miner with zero PRs/issues, filters that match nothing, or a repo/language view with nothing to plot—ECharts still drew technically valid but semantically empty visuals: donuts with 0% in the center (easy to read as “bad performance”), radars with axes but no polygon, bar chart areas with no series. Users could confuse “no data yet” with “worst possible scores.”. This pr is mentioned in the previous several PRs, but not resolved successfully so far.
Related Issues
Closes #616
Type of Change
Checklist
npm run formatandnpm run lint:fixhave been runnpm run buildpassesSolution
ChartEmptyPanel(src/components/common/ChartEmptyPanel.tsx)Reusable panel: icon, title, optional hint, dashed border,
role="status". Whenemptyis false, it renderschildrenunchanged.chartNumericSeriesHasPositive(values)Shared helper:
trueif any value is a finite number > 0 (so an all-zero PR/issue count series is treated as empty).Miner activity
CredibilityChart: empty when merged + open + closed PR counts are all zero; copy explains credibility appears after PR activity in tracked repos.PerformanceRadar: optionalisActivityEmpty; miner Activity tab sets it whentotalPrs === 0.MinerActivity.tsx): Issue Solve Ratio donut and Discovery Profile radar use the same empty pattern when solved + open + closed issues are all zero.Leaderboard / repositories
TopRepositoriesTable: when the bar chart is expanded but there are no repositories to plot, showChartEmptyPanelinstead of an empty canvas.LanguageWeightsTable: when the chart is expanded but no language rows exist for the chart slice, showChartEmptyPanel.Small donuts
MinerCardCredDonut: if segment totals are 0, show a dashed “—” placeholder + tooltip instead of a pie and a colored 0%.ActivitySidebarCardsActivityDonutCard: if total segment weight is 0, show dashed “— / No data” instead of a grey placeholder ring and a misleading center rate%.Note:
ContributionHeatmapalready had copy-based empty handling when there is no contribution data; unchanged.Files touched
src/components/common/ChartEmptyPanel.tsx,src/components/common/index.tssrc/components/miners/CredibilityChart.tsxsrc/components/miners/PerformanceRadar.tsx,src/components/miners/MinerActivity.tsxsrc/components/leaderboard/TopRepositoriesTable.tsx,src/components/leaderboard/MinerCard.tsx,src/components/leaderboard/ActivitySidebarCards.tsxsrc/components/repositories/LanguageWeightsTable.tsxScreenshots