-
-
Notifications
You must be signed in to change notification settings - Fork 202
Implement custom sorting for Top Repo column in DevIndex #9308
Copy link
Copy link
Closed
Labels
Description
Problem:
The topRepo column in the DevIndex grid maps to an array ['repoName', count]. Default sorting fails because it compares array references rather than the contribution count.
Proposed Solution:
Leverage "Turbo Mode" soft hydration by adding a topRepoCount virtual field to DevIndex.model.Contributor and intercepting the sort property inside DevIndex.view.home.GridContainer#onSortColumn to sort by this count.
apps/devindex/model/Contributor.mjs: AddtopRepoCountvirtual field using(data.topRepo ?? data.tr)?.[1] || 0.apps/devindex/view/home/GridContainer.mjs: OverrideonSortColumnto swaptopRepofortopRepoCountinsortOptsbefore passing to the store, preserving the original property forremoveSortingCssto keep visual state correct.
Reactions are currently unavailable