Skip to content

DevIndex: Implement 4-Mode Data Toggle (Total, Public, Private, Commits) #9191

@tobiu

Description

@tobiu

We are currently using a "Commits Only" checkbox to switch between Total Contributions and Total Commits. To provide deeper insights, we want to expand this to a "Data Mode" concept with 4 mutually exclusive views:

  1. Total (Default): Shows Total Contributions.
  2. Public: Shows Public Contributions (Calculated: Total - Private).
  3. Private: Shows Private Contributions.
  4. Commits: Shows Total Commits.

Tasks:

  1. Model (Contributor.mjs): Add totalPublicContributions calculated field.
  2. View (ControlsContainer.mjs): Replace "Commits Only" checkbox with a Radio Group for the 4 modes.
  3. Grid (GridContainer.mjs):
    • Replace commitsOnly config with dataMode (String enum).
    • Update afterSetDataMode to switch columns (totalContributions, totalPublicContributions, totalPrivateContributions, totalCommits) and update the active sorter.
    • Update activity sparkline logic to use the correct data source (Public = y - py, Private = py).
  4. Toolbar (StatusToolbar.mjs): Update summary labels based on the selected mode.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions