From d813856ed5c041bb8d4a75e5aee7d06ced2806bd Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Wed, 15 Nov 2023 22:34:09 -0500 Subject: [PATCH 01/17] chore: added new tailwind class for border: 1px solid --- tailwind.config.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tailwind.config.js b/tailwind.config.js index db0379cf83..9654f2abd2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -228,6 +228,9 @@ module.exports = { backgroundImage: { "gradient-radial": "radial-gradient(var(--tw-gradient-stops))", }, + borderWidth: { + 1: "1px", + }, }, }, safelist: [ From cecee39b0068a089ae7debb8015286229ec665bb Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Wed, 15 Nov 2023 22:34:32 -0500 Subject: [PATCH 02/17] chore: first draft of most used languages component --- .../Graphs/most-used-languages-graph.tsx | 132 ++++++++++++++++++ .../most-used-languages-graph.stories.tsx | 51 +++++++ 2 files changed, 183 insertions(+) create mode 100644 components/Graphs/most-used-languages-graph.tsx create mode 100644 stories/graphs/most-used-languages-graph.stories.tsx diff --git a/components/Graphs/most-used-languages-graph.tsx b/components/Graphs/most-used-languages-graph.tsx new file mode 100644 index 0000000000..f90595525b --- /dev/null +++ b/components/Graphs/most-used-languages-graph.tsx @@ -0,0 +1,132 @@ +import { BsFillCircleFill } from "react-icons/bs"; +import Button from "components/atoms/Button/button"; +import Card from "components/atoms/Card/card"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "components/atoms/Dropdown/dropdown"; +import PeopleIcon from "img/icons/people.svg"; +import ChevronDownIcon from "img/chevron-down.svg"; +import SVGIcon from "components/atoms/SVGIcon/svg-icon"; +import Icon from "components/atoms/Icon/icon"; +import Text from "components/atoms/Typography/text"; + +export interface MostUsedLanguagesGraphProps { + data: { + mainLanguage: string; + data: { + name: string; + value: number; + }[]; + }; + setContributorType: (type: ContributorType) => void; + contributorType: ContributorType; +} + +interface ContributorTypeFilterProps { + setContributorType: (type: ContributorType) => void; + contributorType: ContributorType; +} + +export type ContributorType = "all" | "active" | "new" | "alumni"; + +const peopleFilters: Record = { + all: "All Contributors", + active: "Active Contributors", + new: "New Contributors", + alumni: "Alumni Contributors", +}; + +// TODO: Pull this out because it's used in more than one place now. +const ContributorTypeFilter = ({ setContributorType, contributorType }: ContributorTypeFilterProps) => { + return ( + + + + + + {Object.entries(peopleFilters).map(([key, value]) => ( + setContributorType(key as keyof typeof peopleFilters)} + > + {value} + + ))} + + + ); +}; + +export const MostUsedLanguagesGraph = ({ data, setContributorType, contributorType }: MostUsedLanguagesGraphProps) => { + const colors = [ + "hsl(53, 91%, 59%)", + "hsl(204, 100%, 40%)", + "hsl(14, 98%, 49%)", + "hsl(267, 36%, 37%)", + "hsl(17, 100%, 50%)", + ]; + const percentage = 10; + const { data: languages = [], mainLanguage } = data; + const lastItem = languages.length > 0 ? languages.length - 1 : 0; + + // TODO: add loading view + return ( + +
+

Most used languages

+ + {mainLanguage} contributions have been growing on average {percentage}% MoM + +
+ +
+ +
+ {languages.length > 0 ? ( + languages.map((item, index) => { + return ( +
+ ); + }) + ) : ( +
+ )} +
+ +
    + {languages.length > 0 ? ( + languages.map((item, index) => ( +
  • + + + {item.name} + + {/* TODO: text-slate-100 doesn't pass colour contrast check. + text-slate-600 passes contrast checks but need to check with design + */} + {item.value}% +
  • + )) + ) : ( +

    There is no language data

    + )} +
+
+ + ); +}; diff --git a/stories/graphs/most-used-languages-graph.stories.tsx b/stories/graphs/most-used-languages-graph.stories.tsx new file mode 100644 index 0000000000..33f3abd0df --- /dev/null +++ b/stories/graphs/most-used-languages-graph.stories.tsx @@ -0,0 +1,51 @@ +import { MostUsedLanguagesGraph } from "components/Graphs/most-used-languages-graph"; +import type { Meta, StoryObj } from "@storybook/react"; + +type MetaData = Meta; + +const meta: MetaData = { + title: "Components/Graphs/Most Used Languages Graph", + component: MostUsedLanguagesGraph, +}; + +export default meta; +type Story = StoryObj; + +function generateData() { + return { + mainLanguage: "TypeScript", + data: [ + { + name: "Python", + value: 10, + }, + { + name: "TypeScript", + value: 25, + }, + { + name: "JavaScript", + value: 20, + }, + { + name: "C++", + value: 15, + }, + { + name: "Zig", + value: 30, + }, + ], + }; +} + +export const Default: Story = { + args: { + data: generateData(), + contributorType: "all", + setContributorType(type) { + // eslint-disable-next-line no-console + console.log(type); + }, + }, +}; From 56f5838cf427a17fdfee0a2b9a8344b44739b58f Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 16 Nov 2023 13:08:51 -0500 Subject: [PATCH 03/17] chore: updated graph styling as per PR feedback --- components/Graphs/most-used-languages-graph.tsx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/components/Graphs/most-used-languages-graph.tsx b/components/Graphs/most-used-languages-graph.tsx index f90595525b..fe334e31f4 100644 --- a/components/Graphs/most-used-languages-graph.tsx +++ b/components/Graphs/most-used-languages-graph.tsx @@ -77,14 +77,15 @@ export const MostUsedLanguagesGraph = ({ data, setContributorType, contributorTy const { data: languages = [], mainLanguage } = data; const lastItem = languages.length > 0 ? languages.length - 1 : 0; - // TODO: add loading view return ( - +
-

Most used languages

- - {mainLanguage} contributions have been growing on average {percentage}% MoM - +
+

Most used languages

+ + {mainLanguage} contributions have been growing on average {percentage}% MoM + +
@@ -116,9 +117,6 @@ export const MostUsedLanguagesGraph = ({ data, setContributorType, contributorTy {item.name} - {/* TODO: text-slate-100 doesn't pass colour contrast check. - text-slate-600 passes contrast checks but need to check with design - */} {item.value}% )) From 9118c7d0f373825b3298e7634fa0c1d70056e847 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 16 Nov 2023 13:49:22 -0500 Subject: [PATCH 04/17] chore: added skeleton load for most used languages graph --- .../Graphs/most-used-languages-graph.tsx | 81 ++++++++++++------- .../most-used-languages-graph.stories.tsx | 12 +++ 2 files changed, 63 insertions(+), 30 deletions(-) diff --git a/components/Graphs/most-used-languages-graph.tsx b/components/Graphs/most-used-languages-graph.tsx index fe334e31f4..7530a16d09 100644 --- a/components/Graphs/most-used-languages-graph.tsx +++ b/components/Graphs/most-used-languages-graph.tsx @@ -1,4 +1,5 @@ import { BsFillCircleFill } from "react-icons/bs"; +import Skeleton from "react-loading-skeleton"; import Button from "components/atoms/Button/button"; import Card from "components/atoms/Card/card"; import { @@ -23,6 +24,7 @@ export interface MostUsedLanguagesGraphProps { }; setContributorType: (type: ContributorType) => void; contributorType: ContributorType; + isLoading?: boolean; } interface ContributorTypeFilterProps { @@ -65,7 +67,12 @@ const ContributorTypeFilter = ({ setContributorType, contributorType }: Contribu ); }; -export const MostUsedLanguagesGraph = ({ data, setContributorType, contributorType }: MostUsedLanguagesGraphProps) => { +export const MostUsedLanguagesGraph = ({ + data, + setContributorType, + contributorType, + isLoading = false, +}: MostUsedLanguagesGraphProps) => { const colors = [ "hsl(53, 91%, 59%)", "hsl(204, 100%, 40%)", @@ -91,39 +98,53 @@ export const MostUsedLanguagesGraph = ({ data, setContributorType, contributorTy
- {languages.length > 0 ? ( - languages.map((item, index) => { - return ( -
- ); - }) + {isLoading ? ( +
+ loading most used languages graph +
) : ( -
+ <> + {languages.length > 0 ? ( + languages.map((item, index) => { + return ( +
+ ); + }) + ) : ( +
+ )} + )}
-
    - {languages.length > 0 ? ( - languages.map((item, index) => ( -
  • - - - {item.name} - - {item.value}% -
  • - )) - ) : ( -

    There is no language data

    - )} -
+ {isLoading ? ( + + ) : ( +
    + {languages.length > 0 ? ( + languages.map((item, index) => ( +
  • + + + {item.name} + + {item.value}% +
  • + )) + ) : ( +

    There is no language data

    + )} +
+ )}
); diff --git a/stories/graphs/most-used-languages-graph.stories.tsx b/stories/graphs/most-used-languages-graph.stories.tsx index 33f3abd0df..286f9b3f64 100644 --- a/stories/graphs/most-used-languages-graph.stories.tsx +++ b/stories/graphs/most-used-languages-graph.stories.tsx @@ -49,3 +49,15 @@ export const Default: Story = { }, }, }; + +export const Loading: Story = { + args: { + isLoading: true, + data: generateData(), + contributorType: "all", + setContributorType(type) { + // eslint-disable-next-line no-console + console.log(type); + }, + }, +}; From e7b5f0fbe0fc3bcf725dba484c3c8c8cc6857257 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 16 Nov 2023 14:45:17 -0500 Subject: [PATCH 05/17] chore: refactor to share contributor type filter --- .../most-used-languages-graph.tsx | 52 +------------------ .../Graphs/shared/contributor-type-filter.tsx | 50 ++++++++++++++++++ .../most-active-contributors-card.tsx | 43 ++------------- .../most-used-languages-graph.stories.tsx | 2 +- 4 files changed, 55 insertions(+), 92 deletions(-) rename components/Graphs/{ => MostUsedLanguagesGraph}/most-used-languages-graph.tsx (64%) create mode 100644 components/Graphs/shared/contributor-type-filter.tsx diff --git a/components/Graphs/most-used-languages-graph.tsx b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx similarity index 64% rename from components/Graphs/most-used-languages-graph.tsx rename to components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx index 7530a16d09..d94bcdf196 100644 --- a/components/Graphs/most-used-languages-graph.tsx +++ b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx @@ -1,18 +1,8 @@ import { BsFillCircleFill } from "react-icons/bs"; import Skeleton from "react-loading-skeleton"; -import Button from "components/atoms/Button/button"; import Card from "components/atoms/Card/card"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "components/atoms/Dropdown/dropdown"; -import PeopleIcon from "img/icons/people.svg"; -import ChevronDownIcon from "img/chevron-down.svg"; -import SVGIcon from "components/atoms/SVGIcon/svg-icon"; -import Icon from "components/atoms/Icon/icon"; import Text from "components/atoms/Typography/text"; +import { ContributorType, ContributorTypeFilter } from "../shared/contributor-type-filter"; export interface MostUsedLanguagesGraphProps { data: { @@ -27,46 +17,6 @@ export interface MostUsedLanguagesGraphProps { isLoading?: boolean; } -interface ContributorTypeFilterProps { - setContributorType: (type: ContributorType) => void; - contributorType: ContributorType; -} - -export type ContributorType = "all" | "active" | "new" | "alumni"; - -const peopleFilters: Record = { - all: "All Contributors", - active: "Active Contributors", - new: "New Contributors", - alumni: "Alumni Contributors", -}; - -// TODO: Pull this out because it's used in more than one place now. -const ContributorTypeFilter = ({ setContributorType, contributorType }: ContributorTypeFilterProps) => { - return ( - - - - - - {Object.entries(peopleFilters).map(([key, value]) => ( - setContributorType(key as keyof typeof peopleFilters)} - > - {value} - - ))} - - - ); -}; - export const MostUsedLanguagesGraph = ({ data, setContributorType, diff --git a/components/Graphs/shared/contributor-type-filter.tsx b/components/Graphs/shared/contributor-type-filter.tsx new file mode 100644 index 0000000000..4941114a26 --- /dev/null +++ b/components/Graphs/shared/contributor-type-filter.tsx @@ -0,0 +1,50 @@ +import Button from "components/atoms/Button/button"; +import { + DropdownMenu, + DropdownMenuContent, + DropdownMenuItem, + DropdownMenuTrigger, +} from "components/atoms/Dropdown/dropdown"; +import PeopleIcon from "img/icons/people.svg"; +import ChevronDownIcon from "img/chevron-down.svg"; +import SVGIcon from "components/atoms/SVGIcon/svg-icon"; +import Icon from "components/atoms/Icon/icon"; + +interface ContributorTypeFilterProps { + setContributorType: (type: ContributorType) => void; + contributorType: ContributorType; +} + +export type ContributorType = "all" | "active" | "new" | "alumni"; + +const peopleFilters: Record = { + all: "All Contributors", + active: "Active Contributors", + new: "New Contributors", + alumni: "Alumni Contributors", +}; + +export const ContributorTypeFilter = ({ setContributorType, contributorType }: ContributorTypeFilterProps) => { + return ( + + + + + + {Object.entries(peopleFilters).map(([key, value]) => ( + setContributorType(key as keyof typeof peopleFilters)} + > + {value} + + ))} + + + ); +}; diff --git a/components/molecules/MostActiveContributorsCard/most-active-contributors-card.tsx b/components/molecules/MostActiveContributorsCard/most-active-contributors-card.tsx index 903d545dfa..7aa81b4b66 100644 --- a/components/molecules/MostActiveContributorsCard/most-active-contributors-card.tsx +++ b/components/molecules/MostActiveContributorsCard/most-active-contributors-card.tsx @@ -3,20 +3,11 @@ import { useGesture } from "@use-gesture/react"; import Image from "next/image"; import { ReactNode, useState } from "react"; import * as RawTooltip from "@radix-ui/react-tooltip"; -import Button from "components/atoms/Button/button"; import Card from "components/atoms/Card/card"; -import Icon from "components/atoms/Icon/icon"; -import { - DropdownMenu, - DropdownMenuContent, - DropdownMenuItem, - DropdownMenuTrigger, -} from "components/atoms/Dropdown/dropdown"; + import { getAvatarByUsername } from "lib/utils/github"; -import PeopleIcon from "img/icons/people.svg"; -import ChevronDownIcon from "img/chevron-down.svg"; -import SVGIcon from "components/atoms/SVGIcon/svg-icon"; import Tooltip from "components/atoms/Tooltip/tooltip"; +import { ContributorType, ContributorTypeFilter } from "components/Graphs/shared/contributor-type-filter"; // omit total_contributions and login from ContributorStat type StatKeys = keyof Omit; @@ -40,8 +31,6 @@ export interface ContributorStat { total_contributions: number; } -export type ContributorType = "all" | "active" | "new" | "alumni"; - interface Props { topContributor?: ContributorStat; data: ContributorStat[]; @@ -51,13 +40,6 @@ interface Props { totalContributions: number; } -const peopleFilters: Record = { - all: "All Contributors", - active: "Active Contributors", - new: "New Contributors", - alumni: "Alumni Contributors", -}; - const LegendItem = ({ color, title }: { color?: string; title: string }) => { return (
@@ -136,26 +118,7 @@ export default function MostActiveContributorsCard({ {/* buttons */}
- - - - - - {Object.entries(peopleFilters).map(([key, value]) => ( - setContributorType(key as keyof typeof peopleFilters)} - > - {value} - - ))} - - +
{/* chart */}
diff --git a/stories/graphs/most-used-languages-graph.stories.tsx b/stories/graphs/most-used-languages-graph.stories.tsx index 286f9b3f64..3fc4bf7821 100644 --- a/stories/graphs/most-used-languages-graph.stories.tsx +++ b/stories/graphs/most-used-languages-graph.stories.tsx @@ -1,4 +1,4 @@ -import { MostUsedLanguagesGraph } from "components/Graphs/most-used-languages-graph"; +import { MostUsedLanguagesGraph } from "components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph"; import type { Meta, StoryObj } from "@storybook/react"; type MetaData = Meta; From b982d32a275a73f239793a3338479eff86709260 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 16 Nov 2023 16:16:14 -0500 Subject: [PATCH 06/17] chore: now most used languages graph percentages are decending order --- .../MostUsedLanguagesGraph/most-used-languages-graph.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx index d94bcdf196..cbb91653fa 100644 --- a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx +++ b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx @@ -33,6 +33,7 @@ export const MostUsedLanguagesGraph = ({ const percentage = 10; const { data: languages = [], mainLanguage } = data; const lastItem = languages.length > 0 ? languages.length - 1 : 0; + const sortedLanguages = languages.sort((a, b) => b.value - a.value); return ( @@ -54,8 +55,8 @@ export const MostUsedLanguagesGraph = ({
) : ( <> - {languages.length > 0 ? ( - languages.map((item, index) => { + {sortedLanguages.length > 0 ? ( + sortedLanguages.map((item, index) => { return (
) : (
    - {languages.length > 0 ? ( - languages.map((item, index) => ( + {sortedLanguages.length > 0 ? ( + sortedLanguages.map((item, index) => (
  • Date: Thu, 16 Nov 2023 20:00:21 -0500 Subject: [PATCH 07/17] chore: added hover/focus effect for most used languages graph --- .../most-used-languages-graph.tsx | 33 ++++++++++++++++--- styles/globals.css | 5 +-- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx index cbb91653fa..a0104c14a2 100644 --- a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx +++ b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx @@ -1,5 +1,6 @@ import { BsFillCircleFill } from "react-icons/bs"; import Skeleton from "react-loading-skeleton"; +import { useEffect, useRef, useState } from "react"; import Card from "components/atoms/Card/card"; import Text from "components/atoms/Typography/text"; import { ContributorType, ContributorTypeFilter } from "../shared/contributor-type-filter"; @@ -34,6 +35,17 @@ export const MostUsedLanguagesGraph = ({ const { data: languages = [], mainLanguage } = data; const lastItem = languages.length > 0 ? languages.length - 1 : 0; const sortedLanguages = languages.sort((a, b) => b.value - a.value); + const languagesRef = useRef(null); + const [language, setLanguage] = useState(); + + useEffect(() => { + if (language) { + const languageElement = languagesRef.current?.querySelector(`[data-language="${language}"]`); + if (languageElement) { + languageElement.classList.add("font-semibold"); + } + } + }, [language]); return ( @@ -58,10 +70,21 @@ export const MostUsedLanguagesGraph = ({ {sortedLanguages.length > 0 ? ( sortedLanguages.map((item, index) => { return ( -
    { + const selectedLanguage = event.currentTarget.getAttribute("aria-label"); + setLanguage(selectedLanguage); + }} + onFocus={(event) => { + const selectedLanguage = event.currentTarget.getAttribute("aria-label"); + setLanguage(selectedLanguage); + }} /> ); }) @@ -75,16 +98,16 @@ export const MostUsedLanguagesGraph = ({ {isLoading ? ( ) : ( -
      +
        {sortedLanguages.length > 0 ? ( sortedLanguages.map((item, index) => (
      • - + {item.name} diff --git a/styles/globals.css b/styles/globals.css index 4df2e73a0d..2a0fdd309f 100644 --- a/styles/globals.css +++ b/styles/globals.css @@ -8,11 +8,8 @@ src: url("../public/assets/fonts/Inter-VariableFont_slnt,wght.ttf"); } -* { - @apply font-normal; -} - body { + @apply font-normal; background-color: #f8f9fa; } From 4b81d8dfba6284a69e11ad6bd66c2ffa61463617 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Thu, 16 Nov 2023 22:34:54 -0500 Subject: [PATCH 08/17] chore: fixed text to semibold on hover --- .../MostUsedLanguagesGraph/most-used-languages-graph.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx index a0104c14a2..1e1f6e192f 100644 --- a/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx +++ b/components/Graphs/MostUsedLanguagesGraph/most-used-languages-graph.tsx @@ -73,13 +73,14 @@ export const MostUsedLanguagesGraph = ({
      • )) ) : ( From b1987601ef949ad18aed440468f3c26d983280eb Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Fri, 17 Nov 2023 10:47:14 -0500 Subject: [PATCH 13/17] chore: missed an import for a type after refactoring --- lib/hooks/api/useContributionsByEvolutionType.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/hooks/api/useContributionsByEvolutionType.ts b/lib/hooks/api/useContributionsByEvolutionType.ts index 0cb79cdac7..3fb91fd77c 100644 --- a/lib/hooks/api/useContributionsByEvolutionType.ts +++ b/lib/hooks/api/useContributionsByEvolutionType.ts @@ -2,8 +2,8 @@ import { useState } from "react"; import useSWR, { Fetcher } from "swr"; import publicApiFetcher from "lib/utils/public-api-fetcher"; -import { ContributorType } from "components/molecules/MostActiveContributorsCard/most-active-contributors-card"; import { ContributionEvolutionByTypeDatum } from "components/molecules/ContributionsEvolutionByTypeCard/contributions-evolution-by-type-card"; +import { ContributorType } from "components/Graphs/shared/contributor-type-filter"; /** * Fetch most active contributors from a list. From 8dd5d71e22251b967ff42201a8eb543c98d07a17 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Fri, 17 Nov 2023 10:58:30 -0500 Subject: [PATCH 14/17] Revert "fix: refactor TableRepositoryName prop naming (#2102)" This reverts commit 2edfa99b21d33cb71e09f8a6c5ec215f37fd3a9c. --- .../molecules/TableRepositoryName/table-repository-name.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/molecules/TableRepositoryName/table-repository-name.tsx b/components/molecules/TableRepositoryName/table-repository-name.tsx index 51a6cc316d..6c962bc06d 100644 --- a/components/molecules/TableRepositoryName/table-repository-name.tsx +++ b/components/molecules/TableRepositoryName/table-repository-name.tsx @@ -4,8 +4,9 @@ import Tooltip from "components/atoms/Tooltip/tooltip"; interface TableRepositoryNameProps { avatarURL?: string | StaticImageData; fullName: string; + isLoading?: boolean; topic?: string; - userPage?: string; + user?: string | string[]; } const TableRepositoryName = ({ avatarURL, fullName }: TableRepositoryNameProps): JSX.Element => { From 470240e0853d1a328d6ba58106043877e8f12923 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Fri, 17 Nov 2023 11:10:28 -0500 Subject: [PATCH 15/17] chore: refactor cleanup --- lib/hooks/api/useMostActiveContributors.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/hooks/api/useMostActiveContributors.ts b/lib/hooks/api/useMostActiveContributors.ts index 1804223ac6..9c772ce491 100644 --- a/lib/hooks/api/useMostActiveContributors.ts +++ b/lib/hooks/api/useMostActiveContributors.ts @@ -3,10 +3,8 @@ import useSWR, { Fetcher } from "swr"; import { useRouter } from "next/router"; import publicApiFetcher from "lib/utils/public-api-fetcher"; -import { - ContributorStat, - ContributorType, -} from "components/molecules/MostActiveContributorsCard/most-active-contributors-card"; +import { ContributorStat } from "components/molecules/MostActiveContributorsCard/most-active-contributors-card"; +import { ContributorType } from "components/Graphs/shared/contributor-type-filter"; interface PaginatedResponse { readonly data: ContributorStat[]; From d8e23a97db0b1a9c36d2d26725ec7b5359118b60 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Fri, 17 Nov 2023 11:11:21 -0500 Subject: [PATCH 16/17] chore: reverted a change I didn't mean to add --- lib/utils/getInterestOptions.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/utils/getInterestOptions.ts b/lib/utils/getInterestOptions.ts index 622f026053..ba0939a827 100644 --- a/lib/utils/getInterestOptions.ts +++ b/lib/utils/getInterestOptions.ts @@ -17,7 +17,6 @@ const interests = [ "kubernetes", "hacktoberfest", "clojure", - "svelte", ] as const; export type interestsType = (typeof interests)[number]; From aa806e68b8c5d2291ae522ebbbcdf798549bd303 Mon Sep 17 00:00:00 2001 From: Nick Taylor Date: Fri, 17 Nov 2023 11:12:30 -0500 Subject: [PATCH 17/17] chore: refactor cleanup --- stories/molecules/most-active-contributors-card.stories.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/stories/molecules/most-active-contributors-card.stories.tsx b/stories/molecules/most-active-contributors-card.stories.tsx index 52a89e01b7..97b5f32eee 100644 --- a/stories/molecules/most-active-contributors-card.stories.tsx +++ b/stories/molecules/most-active-contributors-card.stories.tsx @@ -1,10 +1,10 @@ -import { Meta, StoryObj } from "@storybook/react"; +import { Meta } from "@storybook/react"; import { useEffect, useState } from "react"; import Button from "components/atoms/Button/button"; import MostActiveContributorsCard, { ContributorStat, - ContributorType, } from "components/molecules/MostActiveContributorsCard/most-active-contributors-card"; +import { ContributorType } from "components/Graphs/shared/contributor-type-filter"; const meta = { title: "Design System/Molecules/Most Active Contributors Card", @@ -22,8 +22,6 @@ const meta = { export default meta; -type Story = StoryObj; - export const Default = () => { const [data, setData] = useState(generateData());