From 629f0e45e876750e44456b3c53daa08e535480e8 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Fri, 28 Feb 2025 19:29:52 +0530 Subject: [PATCH 01/11] adding feature of anchor links --- .../src/pages/ProjectDetails.test.tsx | 3 +- .../src/pages/RepositoryDetails.test.tsx | 3 +- frontend/src/components/CardDetailsPage.tsx | 132 ++++++++++++++++-- frontend/src/components/ItemCardList.tsx | 5 +- frontend/src/components/SecondaryCard.tsx | 2 +- .../src/components/ToggleContributors.tsx | 14 +- frontend/src/components/ToggleableList.tsx | 3 +- frontend/src/index.css | 8 ++ frontend/src/pages/Home.tsx | 74 +++++++++- 9 files changed, 222 insertions(+), 22 deletions(-) diff --git a/frontend/__tests__/src/pages/ProjectDetails.test.tsx b/frontend/__tests__/src/pages/ProjectDetails.test.tsx index 2e18abbe0..fea46cc51 100644 --- a/frontend/__tests__/src/pages/ProjectDetails.test.tsx +++ b/frontend/__tests__/src/pages/ProjectDetails.test.tsx @@ -98,7 +98,8 @@ describe('ProjectDetailsPage', () => { const contributorsSection = screen .getByRole('heading', { name: /Top Contributors/i }) - .closest('div') + .closest('div.mb-8') as HTMLElement + const showMoreButton = within(contributorsSection!).getByRole('button', { name: /Show more/i }) fireEvent.click(showMoreButton) diff --git a/frontend/__tests__/src/pages/RepositoryDetails.test.tsx b/frontend/__tests__/src/pages/RepositoryDetails.test.tsx index 818f7c673..73de20474 100644 --- a/frontend/__tests__/src/pages/RepositoryDetails.test.tsx +++ b/frontend/__tests__/src/pages/RepositoryDetails.test.tsx @@ -99,7 +99,8 @@ describe('RepositoryDetailsPage', () => { const contributorsSection = screen .getByRole('heading', { name: /Top Contributors/i }) - .closest('div') + .closest('div.mb-8') as HTMLElement + const showMoreButton = within(contributorsSection!).getByRole('button', { name: /Show more/i }) fireEvent.click(showMoreButton) diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index bcb7a0c58..b13b16421 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -1,4 +1,4 @@ -import { faCalendar, faFileCode, faTag } from '@fortawesome/free-solid-svg-icons' +import { faCalendar, faFileCode, faLink, faTag } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { DetailsCardProps } from 'types/card' import { formatDate } from 'utils/dateFormatter' @@ -38,13 +38,39 @@ const DetailsCard = ({ {!is_active && ( Inactive )} - + +
+ Summary + + + +
+ + } + >

{summary}

+
+ {`${type[0].toUpperCase() + type.slice(1)} Details`} + + + +
+
+ } className={`${type !== 'chapter' ? 'md:col-span-5' : 'md:col-span-3'} gap-2`} > {details && @@ -58,7 +84,22 @@ const DetailsCard = ({ )}
{(type === 'project' || type === 'repository' || type === 'committee') && ( - + +
+ Statistics + + + +
+ + } + className="md:col-span-2" + > {stats.map((stat, index) => ( ))} @@ -78,8 +119,42 @@ const DetailsCard = ({
- {languages.length !== 0 && } - {topics.length !== 0 && } + {languages.length !== 0 && ( + +
+ Languages + + + +
+
+ } + /> + )} + {topics.length !== 0 && ( + +
+ Topics + + + +
+ + } + /> + )} )} @@ -88,7 +163,19 @@ const DetailsCard = ({ {(type === 'project' || type === 'repository') && ( <> +
+ Recent Issues + + + +
+ + } data={recentIssues} renderDetails={(item) => (
@@ -100,7 +187,19 @@ const DetailsCard = ({ )} /> +
+ Recent Releases + + + +
+
+ } data={recentReleases} renderDetails={(item) => (
@@ -114,7 +213,22 @@ const DetailsCard = ({ )} {type === 'project' && repositories.length > 0 && ( - + +
+ Repositories + + + +
+
+ } + className="mt-6" + >
)} diff --git a/frontend/src/components/ItemCardList.tsx b/frontend/src/components/ItemCardList.tsx index 55fb0f6c8..4e9850b16 100644 --- a/frontend/src/components/ItemCardList.tsx +++ b/frontend/src/components/ItemCardList.tsx @@ -1,4 +1,5 @@ import { JSX } from 'react' +import React from 'react' import { ProjectIssuesType, ProjectReleaseType } from 'types/project' import SecondaryCard from './SecondaryCard' @@ -7,7 +8,7 @@ const ItemCardList = ({ data, renderDetails, }: { - title: string + title: React.ReactNode data: ProjectReleaseType[] | ProjectIssuesType[] renderDetails: (item: { createdAt: string @@ -35,7 +36,7 @@ const ItemCardList = ({ ))} ) : ( -

No {title.toLowerCase()}.

+

Currently , Nothing to Display .

)}
) diff --git a/frontend/src/components/SecondaryCard.tsx b/frontend/src/components/SecondaryCard.tsx index 43ef23aaf..969babb2e 100644 --- a/frontend/src/components/SecondaryCard.tsx +++ b/frontend/src/components/SecondaryCard.tsx @@ -5,7 +5,7 @@ const SecondaryCard = ({ children = null, className = '', }: { - title?: string + title?: React.ReactNode children?: React.ReactNode className?: string } = {}) => ( diff --git a/frontend/src/components/ToggleContributors.tsx b/frontend/src/components/ToggleContributors.tsx index b1394128f..a27704124 100644 --- a/frontend/src/components/ToggleContributors.tsx +++ b/frontend/src/components/ToggleContributors.tsx @@ -1,5 +1,5 @@ import { Button } from '@chakra-ui/react' -import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons' +import { faChevronDown, faChevronUp, faLink } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useState } from 'react' import { useNavigate } from 'react-router-dom' @@ -29,7 +29,17 @@ const TopContributors = ({ } return (
-

{label}

+
+
+

{label}

+ + + +
+
{displayContributors.map((contributor, index) => (
{ const [showAll, setShowAll] = useState(false) diff --git a/frontend/src/index.css b/frontend/src/index.css index 580b642a8..a8d75c756 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -293,3 +293,11 @@ a { transform: rotate(360deg); } } + +html { + scroll-behavior: smooth; +} + +.inherit-color { + color: inherit; +} diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 89f9f770b..c33cfc1fe 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -5,6 +5,7 @@ import { faCalendar, faCode, faFileCode, + faLink, faMapMarkerAlt, faTag, } from '@fortawesome/free-solid-svg-icons' @@ -127,7 +128,21 @@ export default function Home() {
- + +
+ New Chapters + + + +
+
+ } + >
{data.recentChapters.map((chapter) => (
@@ -150,7 +165,21 @@ export default function Home() { ))}
- + +
+ New Projects + + + +
+
+ } + >
{data.recentProjects.map((project) => (
@@ -179,7 +208,18 @@ export default function Home() {
-

OWASP Chapters Nearby

+
+
+

OWASP Chapters Nearby

+ + + +
+
+
+
+ Recent Issues + + + +
+
+ } data={data.recentIssues} renderDetails={(item) => (
@@ -199,7 +251,19 @@ export default function Home() { )} /> +
+ Recent Releases + + + +
+
+ } data={data.recentReleases} renderDetails={(item) => (
From c8f5865db50e1160494699b03416ec8d5767bbfd Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Fri, 28 Feb 2025 20:16:55 +0530 Subject: [PATCH 02/11] fix update --- frontend/__tests__/src/pages/ProjectDetails.test.tsx | 1 - frontend/__tests__/src/pages/RepositoryDetails.test.tsx | 1 - 2 files changed, 2 deletions(-) diff --git a/frontend/__tests__/src/pages/ProjectDetails.test.tsx b/frontend/__tests__/src/pages/ProjectDetails.test.tsx index fea46cc51..720e0fc99 100644 --- a/frontend/__tests__/src/pages/ProjectDetails.test.tsx +++ b/frontend/__tests__/src/pages/ProjectDetails.test.tsx @@ -99,7 +99,6 @@ describe('ProjectDetailsPage', () => { const contributorsSection = screen .getByRole('heading', { name: /Top Contributors/i }) .closest('div.mb-8') as HTMLElement - const showMoreButton = within(contributorsSection!).getByRole('button', { name: /Show more/i }) fireEvent.click(showMoreButton) diff --git a/frontend/__tests__/src/pages/RepositoryDetails.test.tsx b/frontend/__tests__/src/pages/RepositoryDetails.test.tsx index 73de20474..64bf1d568 100644 --- a/frontend/__tests__/src/pages/RepositoryDetails.test.tsx +++ b/frontend/__tests__/src/pages/RepositoryDetails.test.tsx @@ -100,7 +100,6 @@ describe('RepositoryDetailsPage', () => { const contributorsSection = screen .getByRole('heading', { name: /Top Contributors/i }) .closest('div.mb-8') as HTMLElement - const showMoreButton = within(contributorsSection!).getByRole('button', { name: /Show more/i }) fireEvent.click(showMoreButton) From f1de9aadc6de24136abeafaabc50f62f02588f50 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Tue, 4 Mar 2025 14:41:15 +0530 Subject: [PATCH 03/11] update asked changes --- frontend/src/components/CardDetailsPage.tsx | 129 ++++++------------ frontend/src/components/TitleWithIcon.tsx | 37 +++++ .../src/components/ToggleContributors.tsx | 18 +-- frontend/src/pages/Home.tsx | 82 ++++------- 4 files changed, 111 insertions(+), 155 deletions(-) create mode 100644 frontend/src/components/TitleWithIcon.tsx diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index ef051263e..97bc46c87 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -10,6 +10,7 @@ import RepositoriesCard from 'components/RepositoriesCard' import SecondaryCard from 'components/SecondaryCard' import ToggleableList from 'components/ToggleableList' import TopContributors from 'components/ToggleContributors' +import TitleWithIcon from 'components/TitleWithIcon' const DetailsCard = ({ title, @@ -40,17 +41,11 @@ const DetailsCard = ({ )} -
- Summary - - - -
-
+ } >

{summary}

@@ -59,17 +54,11 @@ const DetailsCard = ({
-
- {`${type[0].toUpperCase() + type.slice(1)} Details`} - - - -
-
+ } className={`${type !== 'chapter' ? 'md:col-span-5' : 'md:col-span-3'} gap-2`} > @@ -86,17 +75,11 @@ const DetailsCard = ({ {(type === 'project' || type === 'repository' || type === 'committee') && ( -
- Statistics - - - -
-
+ } className="md:col-span-2" > @@ -129,17 +112,11 @@ const DetailsCard = ({ -
- Languages - - - -
-
+ } /> )} @@ -147,17 +124,11 @@ const DetailsCard = ({ -
- Topics - - - -
-
+ } /> )} @@ -170,17 +141,11 @@ const DetailsCard = ({ <> -
- Recent Issues - - - -
- + } data={recentIssues} renderDetails={(item) => ( @@ -194,17 +159,11 @@ const DetailsCard = ({ /> -
- Recent Releases - - - -
- + } data={recentReleases} renderDetails={(item) => ( @@ -221,17 +180,11 @@ const DetailsCard = ({ {type === 'project' && repositories.length > 0 && ( -
- Repositories - - - -
- + } className="mt-6" > diff --git a/frontend/src/components/TitleWithIcon.tsx b/frontend/src/components/TitleWithIcon.tsx new file mode 100644 index 000000000..c3887a52f --- /dev/null +++ b/frontend/src/components/TitleWithIcon.tsx @@ -0,0 +1,37 @@ +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { IconProp } from '@fortawesome/fontawesome-svg-core' + +interface TitleWithIconProps { + href: string + icon: IconProp + title: string +} + +const TitleWithIcon: React.FC = ({ href, icon, title }) => { + const id = href.replace('#', '') + + const handleClick = (event: React.MouseEvent) => { + const element = document.getElementById(id) + if (element) { + event.preventDefault() + element.scrollIntoView({ behavior: 'smooth' }) + } + } + + return ( +
+
+

{title}

+ + + +
+
+ ) +} + +export default TitleWithIcon diff --git a/frontend/src/components/ToggleContributors.tsx b/frontend/src/components/ToggleContributors.tsx index a27704124..cf623fbaa 100644 --- a/frontend/src/components/ToggleContributors.tsx +++ b/frontend/src/components/ToggleContributors.tsx @@ -4,6 +4,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { TopContributorsTypeGraphql } from 'types/contributor' +import TitleWithIcon from 'components/TitleWithIcon' + const TopContributors = ({ contributors, label = 'Top Contributors', @@ -29,17 +31,11 @@ const TopContributors = ({ } return (
-
-
-

{label}

- - - -
-
+
{displayContributors.map((contributor, index) => (
-
- New Chapters - - - -
-
+ } >
@@ -167,17 +162,11 @@ export default function Home() { -
- New Projects - - - -
-
+ } >
@@ -208,18 +197,11 @@ export default function Home() {
-
-
-

OWASP Chapters Nearby

- - - -
-
- + -
- Recent Issues - - - -
-
+ } data={data.recentIssues} renderDetails={(item) => ( @@ -252,17 +228,11 @@ export default function Home() { /> -
- Recent Releases - - - -
-
+ } data={data.recentReleases} renderDetails={(item) => ( From 04dd54c32009eae9910ff6ebbdb10daf2dbe2059 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Tue, 4 Mar 2025 15:30:13 +0530 Subject: [PATCH 04/11] fix checks --- frontend/_tmp_8_04b505e25001ea055ea6209470772f9f | 0 frontend/src/components/CardDetailsPage.tsx | 2 +- frontend/src/components/TitleWithIcon.tsx | 3 ++- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 frontend/_tmp_8_04b505e25001ea055ea6209470772f9f diff --git a/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f b/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f new file mode 100644 index 000000000..e69de29bb diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index 97bc46c87..2d759a87d 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -8,9 +8,9 @@ import InfoBlock from 'components/InfoBlock' import ItemCardList from 'components/ItemCardList' import RepositoriesCard from 'components/RepositoriesCard' import SecondaryCard from 'components/SecondaryCard' +import TitleWithIcon from 'components/TitleWithIcon' import ToggleableList from 'components/ToggleableList' import TopContributors from 'components/ToggleContributors' -import TitleWithIcon from 'components/TitleWithIcon' const DetailsCard = ({ title, diff --git a/frontend/src/components/TitleWithIcon.tsx b/frontend/src/components/TitleWithIcon.tsx index c3887a52f..dab400d50 100644 --- a/frontend/src/components/TitleWithIcon.tsx +++ b/frontend/src/components/TitleWithIcon.tsx @@ -1,5 +1,6 @@ -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { IconProp } from '@fortawesome/fontawesome-svg-core' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import React from 'react' interface TitleWithIconProps { href: string From 4f40573f00deec33d8998891f0bef4f93cbf9c5d Mon Sep 17 00:00:00 2001 From: Sneha Tripathi Date: Tue, 4 Mar 2025 15:32:03 +0530 Subject: [PATCH 05/11] remove unwanted file --- frontend/_tmp_8_04b505e25001ea055ea6209470772f9f | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 frontend/_tmp_8_04b505e25001ea055ea6209470772f9f diff --git a/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f b/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f deleted file mode 100644 index e69de29bb..000000000 From 0127c282e323fca7cbb6bed43ff6227f8bbd7fbb Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Tue, 4 Mar 2025 16:03:24 +0530 Subject: [PATCH 06/11] fix checks --- frontend/_tmp_8_04b505e25001ea055ea6209470772f9f | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 frontend/_tmp_8_04b505e25001ea055ea6209470772f9f diff --git a/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f b/frontend/_tmp_8_04b505e25001ea055ea6209470772f9f deleted file mode 100644 index e69de29bb..000000000 From 63e5c448366f835b606a71be41704cfa1eb617bf Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Tue, 4 Mar 2025 16:24:22 +0530 Subject: [PATCH 07/11] fix --- frontend/src/components/CardDetailsPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index 2d759a87d..5f77bd26e 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -12,6 +12,7 @@ import TitleWithIcon from 'components/TitleWithIcon' import ToggleableList from 'components/ToggleableList' import TopContributors from 'components/ToggleContributors' + const DetailsCard = ({ title, is_active = true, From b2c8854274f7e4e9c9d60168a4e162644d93ec2c Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Wed, 5 Mar 2025 18:34:43 +0530 Subject: [PATCH 08/11] update fix --- frontend/src/components/CardDetailsPage.tsx | 57 +++---------------- frontend/src/components/TitleWithIcon.tsx | 2 +- .../src/components/ToggleContributors.tsx | 6 +- frontend/src/pages/Home.tsx | 38 ++----------- 4 files changed, 14 insertions(+), 89 deletions(-) diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index 5f77bd26e..181b49918 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -12,7 +12,6 @@ import TitleWithIcon from 'components/TitleWithIcon' import ToggleableList from 'components/ToggleableList' import TopContributors from 'components/ToggleContributors' - const DetailsCard = ({ title, is_active = true, @@ -40,15 +39,7 @@ const DetailsCard = ({ {!is_active && ( Inactive )} - - } - > + }>

{summary}

@@ -75,13 +66,7 @@ const DetailsCard = ({
{(type === 'project' || type === 'repository' || type === 'committee') && ( - } + title={} className="md:col-span-2" > {stats.map((stat, index) => ( @@ -112,25 +97,13 @@ const DetailsCard = ({ {languages.length !== 0 && ( - } + label={} /> )} {topics.length !== 0 && ( - } + label={} /> )}
@@ -141,13 +114,7 @@ const DetailsCard = ({ {(type === 'project' || type === 'repository') && ( <> - } + title={} data={recentIssues} renderDetails={(item) => (
@@ -160,11 +127,7 @@ const DetailsCard = ({ /> + } data={recentReleases} renderDetails={(item) => ( @@ -180,13 +143,7 @@ const DetailsCard = ({ )} {type === 'project' && repositories.length > 0 && ( - } + title={} className="mt-6" > diff --git a/frontend/src/components/TitleWithIcon.tsx b/frontend/src/components/TitleWithIcon.tsx index dab400d50..3a186ca4f 100644 --- a/frontend/src/components/TitleWithIcon.tsx +++ b/frontend/src/components/TitleWithIcon.tsx @@ -21,7 +21,7 @@ const TitleWithIcon: React.FC = ({ href, icon, title }) => { return (
-
+

{title}

- +
{displayContributors.map((contributor, index) => (
- } + title={} >
{data.recentChapters.map((chapter) => ( @@ -161,13 +155,7 @@ export default function Home() {
- } + title={} >
{data.recentProjects.map((project) => ( @@ -197,11 +185,7 @@ export default function Home() {
- +
- } + title={} data={data.recentIssues} renderDetails={(item) => (
@@ -227,13 +205,7 @@ export default function Home() { )} /> - } + title={} data={data.recentReleases} renderDetails={(item) => (
From a58ff4ea567e0dbd59cb321c195bc7d44434a9b8 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Thu, 6 Mar 2025 11:20:32 +0530 Subject: [PATCH 09/11] resolve conversation --- .../{TitleWithIcon.tsx => AnchorTitle.tsx} | 11 ++++----- frontend/src/components/CardDetailsPage.tsx | 23 ++++++++----------- .../src/components/ToggleContributors.tsx | 6 ++--- frontend/src/pages/Home.tsx | 17 +++++--------- 4 files changed, 24 insertions(+), 33 deletions(-) rename frontend/src/components/{TitleWithIcon.tsx => AnchorTitle.tsx} (74%) diff --git a/frontend/src/components/TitleWithIcon.tsx b/frontend/src/components/AnchorTitle.tsx similarity index 74% rename from frontend/src/components/TitleWithIcon.tsx rename to frontend/src/components/AnchorTitle.tsx index 3a186ca4f..bccc792e1 100644 --- a/frontend/src/components/TitleWithIcon.tsx +++ b/frontend/src/components/AnchorTitle.tsx @@ -1,14 +1,13 @@ -import { IconProp } from '@fortawesome/fontawesome-svg-core' +import { faLink } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import React from 'react' -interface TitleWithIconProps { +interface AnchorTitleProps { href: string - icon: IconProp title: string } -const TitleWithIcon: React.FC = ({ href, icon, title }) => { +const AnchorTitle: React.FC = ({ href, title }) => { const id = href.replace('#', '') const handleClick = (event: React.MouseEvent) => { @@ -28,11 +27,11 @@ const TitleWithIcon: React.FC = ({ href, icon, title }) => { className="inherit-color ml-2 opacity-0 transition-opacity duration-200 group-hover:opacity-100" onClick={handleClick} > - +
) } -export default TitleWithIcon +export default AnchorTitle diff --git a/frontend/src/components/CardDetailsPage.tsx b/frontend/src/components/CardDetailsPage.tsx index 181b49918..51b9b251c 100644 --- a/frontend/src/components/CardDetailsPage.tsx +++ b/frontend/src/components/CardDetailsPage.tsx @@ -1,14 +1,14 @@ -import { faCalendar, faFileCode, faLink, faTag } from '@fortawesome/free-solid-svg-icons' +import { faCalendar, faFileCode, faTag } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { DetailsCardProps } from 'types/card' import { formatDate } from 'utils/dateFormatter' import { getSocialIcon } from 'utils/urlIconMappings' +import AnchorTitle from 'components/AnchorTitle' import ChapterMap from 'components/ChapterMap' import InfoBlock from 'components/InfoBlock' import ItemCardList from 'components/ItemCardList' import RepositoriesCard from 'components/RepositoriesCard' import SecondaryCard from 'components/SecondaryCard' -import TitleWithIcon from 'components/TitleWithIcon' import ToggleableList from 'components/ToggleableList' import TopContributors from 'components/ToggleContributors' @@ -39,16 +39,15 @@ const DetailsCard = ({ {!is_active && ( Inactive )} - }> + }>

{summary}

} @@ -66,7 +65,7 @@ const DetailsCard = ({ {(type === 'project' || type === 'repository' || type === 'committee') && ( } + title={} className="md:col-span-2" > {stats.map((stat, index) => ( @@ -97,13 +96,13 @@ const DetailsCard = ({ {languages.length !== 0 && ( } + label={} /> )} {topics.length !== 0 && ( } + label={} /> )}
@@ -114,7 +113,7 @@ const DetailsCard = ({ {(type === 'project' || type === 'repository') && ( <> } + title={} data={recentIssues} renderDetails={(item) => (
@@ -126,9 +125,7 @@ const DetailsCard = ({ )} /> - } + title={} data={recentReleases} renderDetails={(item) => (
@@ -143,7 +140,7 @@ const DetailsCard = ({ )} {type === 'project' && repositories.length > 0 && ( } + title={} className="mt-6" > diff --git a/frontend/src/components/ToggleContributors.tsx b/frontend/src/components/ToggleContributors.tsx index 6a61cc073..a42e8a825 100644 --- a/frontend/src/components/ToggleContributors.tsx +++ b/frontend/src/components/ToggleContributors.tsx @@ -1,10 +1,10 @@ import { Button } from '@chakra-ui/react' -import { faChevronDown, faChevronUp, faLink } from '@fortawesome/free-solid-svg-icons' +import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { useState } from 'react' import { useNavigate } from 'react-router-dom' import { TopContributorsTypeGraphql } from 'types/contributor' -import TitleWithIcon from 'components/TitleWithIcon' +import AnchorTitle from 'components/AnchorTitle' const TopContributors = ({ contributors, @@ -31,7 +31,7 @@ const TopContributors = ({ } return (
- +
{displayContributors.map((contributor, index) => (
- } - > + }>
{data.recentChapters.map((chapter) => (
@@ -154,9 +151,7 @@ export default function Home() { ))}
- } - > + }>
{data.recentProjects.map((project) => (
@@ -185,7 +180,7 @@ export default function Home() {
- +
} + title={} data={data.recentIssues} renderDetails={(item) => (
@@ -205,7 +200,7 @@ export default function Home() { )} /> } + title={} data={data.recentReleases} renderDetails={(item) => (
From 0f223666947ba3476d51232b09ec833b471a8b08 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Sun, 9 Mar 2025 11:29:19 +0530 Subject: [PATCH 10/11] fix checks --- frontend/src/components/AnchorTitle.tsx | 2 +- frontend/src/components/ToggleableList.tsx | 2 +- frontend/src/pages/Home.tsx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/AnchorTitle.tsx b/frontend/src/components/AnchorTitle.tsx index 9ccfb1210..85a6c1ed7 100644 --- a/frontend/src/components/AnchorTitle.tsx +++ b/frontend/src/components/AnchorTitle.tsx @@ -27,7 +27,7 @@ const AnchorTitle: React.FC = ({ href, title }) => { className="inherit-color ml-2 opacity-0 transition-opacity duration-200 group-hover:opacity-100" onClick={handleClick} > - +
diff --git a/frontend/src/components/ToggleableList.tsx b/frontend/src/components/ToggleableList.tsx index f2ced9720..29e7dc455 100644 --- a/frontend/src/components/ToggleableList.tsx +++ b/frontend/src/components/ToggleableList.tsx @@ -1,7 +1,7 @@ import { Button } from '@chakra-ui/react' import { faChevronDown, faChevronUp } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' -import React, { useState} from 'react' +import React, { useState } from 'react' const ToggleableList = ({ items, diff --git a/frontend/src/pages/Home.tsx b/frontend/src/pages/Home.tsx index 762240a69..4b3f7d087 100644 --- a/frontend/src/pages/Home.tsx +++ b/frontend/src/pages/Home.tsx @@ -17,9 +17,9 @@ import { AlgoliaResponseType } from 'types/algolia' import { ChapterTypeAlgolia } from 'types/chapter' import { EventType } from 'types/event' import { MainPageData } from 'types/home' -import AnchorTitle from 'components/AnchorTitle' import { capitalize } from 'utils/capitalize' import { formatDate, formatDateRange } from 'utils/dateFormatter' +import AnchorTitle from 'components/AnchorTitle' import AnimatedCounter from 'components/AnimatedCounter' import ChapterMap from 'components/ChapterMap' import ItemCardList from 'components/ItemCardList' From 6c9d86617c39e56b8e4c38b2ab6c57eb68033904 Mon Sep 17 00:00:00 2001 From: shining-bluemoon-11 Date: Mon, 10 Mar 2025 09:23:10 +0530 Subject: [PATCH 11/11] fix required updates --- frontend/src/components/ItemCardList.tsx | 2 +- frontend/src/index.css | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/ItemCardList.tsx b/frontend/src/components/ItemCardList.tsx index 721450087..47c444e58 100644 --- a/frontend/src/components/ItemCardList.tsx +++ b/frontend/src/components/ItemCardList.tsx @@ -49,7 +49,7 @@ const ItemCardList = ({ ))}
) : ( -

Nothing to Display .

+

Nothing to display.

)} ) diff --git a/frontend/src/index.css b/frontend/src/index.css index e671efe50..7b9507a90 100644 --- a/frontend/src/index.css +++ b/frontend/src/index.css @@ -298,6 +298,7 @@ html { } .custom-icon { - position: relative; - top: 4px; + display: inline-flex; + align-items: center; + vertical-align: middle; }