LearnNewsExamplesServices
Frontmatter
id9191
titleDevIndex: Implement 4-Mode Data Toggle (Total, Public, Private, Commits)
stateClosed
labels
enhancementai
assigneestobiu
createdAtFeb 17, 2026, 5:12 AM
updatedAtFeb 17, 2026, 5:41 AM
githubUrlhttps://github.com/neomjs/neo/issues/9191
authortobiu
commentsCount1
parentIssue9106
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtFeb 17, 2026, 5:41 AM

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

Closed v12.0.0 enhancementai
tobiu
tobiu commented on Feb 17, 2026, 5:12 AM

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.
tobiu added the enhancement label on Feb 17, 2026, 5:12 AM
tobiu added the ai label on Feb 17, 2026, 5:12 AM
tobiu added parent issue #9106 on Feb 17, 2026, 5:12 AM
tobiu referenced in commit a8e64a1 - "feat: Implement 4-Mode Data Toggle (Total, Public, Private, Commits) (#9191)" on Feb 17, 2026, 5:40 AM
tobiu assigned to @tobiu on Feb 17, 2026, 5:40 AM
tobiu
tobiu Feb 17, 2026, 5:40 AM

Input from Gemini 3 Pro:

✦ Implemented the 4-Mode Data Toggle ('Total', 'Public', 'Private', 'Commits').

Changes:

  1. Model (DevIndex.model.Contributor):

    • Added totalPublicContributions calculated field (Total - Private).
    • Updated addYearFields to generate py{year} (Private) and puy{year} (Public, calculated) virtual fields. These use the same optimized, prototype-based getter strategy as y and cy to support Grid sorting without memory overhead.
    • Enhanced class documentation to explain the RecordFactory optimization.
  2. Controls (DevIndex.view.home.ControlsContainer):

    • Replaced the "Commits Only" checkbox with a Radio Group (name: 'dataMode') offering the 4 mutually exclusive modes.
  3. Grid (DevIndex.view.home.GridContainer):

    • Replaced commitsOnly config with dataMode (default: 'total').
    • Updated afterSetDataMode to:
      • Switch column data fields (totalContributions -> totalCommits -> totalPrivateContributions -> totalPublicContributions).
      • Update the active sorter to match the new mode.
      • Update activity sparkline logic to pull from the correct source arrays (y, cy, py, or y-py).
      • Update Year columns to use the correct prefix (y, cy, py). Note: Public Year sorting uses y (Total) as a proxy for now, as dynamic per-year sorting would require additional model complexity.
  4. Toolbar (DevIndex.view.home.StatusToolbar):

    • Updated updateLabels to calculate and display the correct total based on the selected dataMode.
tobiu closed this issue on Feb 17, 2026, 5:41 AM
tobiu referenced in commit 4e1e105 - "feat: Add Data Mode label to ControlsContainer (#9191)" on Feb 17, 2026, 5:50 AM
tobiu referenced in commit 13f846f - "feat: Add Filters label to ControlsContainer (#9191)" on Feb 17, 2026, 5:54 AM