From 8c4de9ba1fba009c03f2e08f9ef9b50775e1f2a3 Mon Sep 17 00:00:00 2001 From: Preston-Cook Date: Mon, 21 Oct 2024 13:50:28 -0500 Subject: [PATCH 1/4] fix: bug fix to address issue #363 --- src/views/components/settings/Settings.tsx | 5 ++ test.ts | 55 ++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 test.ts diff --git a/src/views/components/settings/Settings.tsx b/src/views/components/settings/Settings.tsx index 614f7714e..b4e1f783c 100644 --- a/src/views/components/settings/Settings.tsx +++ b/src/views/components/settings/Settings.tsx @@ -546,6 +546,11 @@ export default function Settings(): JSX.Element { admin => admin.githubUsername === username ) && !LONGHORN_DEVELOPERS_SWE.some(swe => swe.githubUsername === username) ) + .sort( + (a, b) => + (githubStats.userGitHubStats[b]?.commits ?? 0) - + (githubStats.userGitHubStats[a]?.commits ?? 0) + ) .map(username => (
Date: Mon, 21 Oct 2024 13:57:05 -0500 Subject: [PATCH 2/4] fix: bug fix to address issue #363 --- test.ts | 55 ------------------------------------------------------- 1 file changed, 55 deletions(-) delete mode 100644 test.ts diff --git a/test.ts b/test.ts deleted file mode 100644 index d0017cf5d..000000000 --- a/test.ts +++ /dev/null @@ -1,55 +0,0 @@ -const obj = { - adminGitHubStats: { - IsaDavRod: { commits: 3, linesAdded: 2397, linesDeleted: 1227 }, - 'Lukas-Zenick': { commits: 22, linesAdded: 1296, linesDeleted: 1874 }, - Samathingamajig: { commits: 42, linesAdded: 3657, linesDeleted: 2614 }, - DereC4: { commits: 53, linesAdded: 22263, linesDeleted: 364 }, - Razboy20: { commits: 95, linesAdded: 43134, linesDeleted: 86766 }, - doprz: { commits: 104, linesAdded: 59892, linesDeleted: 30046 }, - sghsri: { commits: 307, linesAdded: 85052, linesDeleted: 55359 }, - }, - userGitHubStats: { - chrisnunes57: { commits: 1, linesAdded: 1, linesDeleted: 1 }, - 'yahya-kousa': { commits: 1, linesAdded: 3, linesDeleted: 2 }, - EthanL06: { commits: 1, linesAdded: 4, linesDeleted: 4 }, - roccovp3: { commits: 1, linesAdded: 7, linesDeleted: 2 }, - lanc33llis: { commits: 1, linesAdded: 2, linesDeleted: 2 }, - darshanbhatta: { commits: 2, linesAdded: 37, linesDeleted: 15 }, - vinsonzheng499: { commits: 2, linesAdded: 45, linesDeleted: 39 }, - vivek12311: { commits: 2, linesAdded: 3145, linesDeleted: 504 }, - mas0nd: { commits: 3, linesAdded: 42, linesDeleted: 43 }, - caseycharleston: { commits: 5, linesAdded: 639, linesDeleted: 179 }, - omajoshi: { commits: 6, linesAdded: 56, linesDeleted: 27 }, - abhinavchadaga: { commits: 15, linesAdded: 2202, linesDeleted: 1156 }, - tadakda: { commits: 22, linesAdded: 17350, linesDeleted: 608 }, - 'DhruvArora-03': { commits: 22, linesAdded: 1270, linesDeleted: 549 }, - knownotunknown: { commits: 42, linesAdded: 15420, linesDeleted: 2773 }, - }, - contributors: [ - 'chrisnunes57', - 'yahya-kousa', - 'EthanL06', - 'roccovp3', - 'lanc33llis', - 'darshanbhatta', - 'vinsonzheng499', - 'vivek12311', - 'mas0nd', - 'IsaDavRod', - 'caseycharleston', - 'omajoshi', - 'abhinavchadaga', - 'tadakda', - 'Lukas-Zenick', - 'DhruvArora-03', - 'knownotunknown', - 'Samathingamajig', - 'DereC4', - 'Razboy20', - 'doprz', - 'sghsri', - ], - dataFetched: '2024-10-21T18:40:06.016Z', - lastUpdated: '2024-10-21T18:40:06.016Z', - isCached: false, -}; From 3d6cd2cad10df478478c18116b11b6384a39b6df Mon Sep 17 00:00:00 2001 From: Preston-Cook Date: Mon, 21 Oct 2024 16:03:20 -0500 Subject: [PATCH 3/4] fix: bug fix to sort LONGHORN_SWE constant --- src/views/components/settings/Settings.tsx | 6 +++++- src/views/styles/colors.module.scss | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/components/settings/Settings.tsx b/src/views/components/settings/Settings.tsx index b4e1f783c..34477e331 100644 --- a/src/views/components/settings/Settings.tsx +++ b/src/views/components/settings/Settings.tsx @@ -501,7 +501,11 @@ export default function Settings(): JSX.Element {

UTRP CONTRIBUTERS

- {LONGHORN_DEVELOPERS_SWE.map(swe => ( + {LONGHORN_DEVELOPERS_SWE.sort( + (a, b) => + (githubStats?.userGitHubStats[b.githubUsername]?.commits ?? 0) - + (githubStats?.userGitHubStats[a.githubUsername]?.commits ?? 0) + ).map(swe => (
Date: Mon, 21 Oct 2024 16:05:44 -0500 Subject: [PATCH 4/4] fix: fix to sort LONGHORN_SWE constant --- src/views/styles/colors.module.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/styles/colors.module.scss b/src/views/styles/colors.module.scss index 99bc83a5a..45e74adfd 100644 --- a/src/views/styles/colors.module.scss +++ b/src/views/styles/colors.module.scss @@ -10,7 +10,7 @@ $turquoise: #00a9b7; $bluebonnet: #005f86; $shade: #9cadb7; $limestone: #d6d2c4; -$speedway_brick: #d10000; +$speedway_brick: #af2e2d; //scss hover active focus color calculation