From b0a3f96b4dd97f99c21d19f84835a6589138795c Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:21:21 +0000 Subject: [PATCH 1/5] Initial plan From a5d4a46087b6f5274007f2ac920b9aade6634115 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:29:48 +0000 Subject: [PATCH 2/5] feat: modularize footer social icons and update official links Agent-Logs-Url: https://github.com/podcodar/webapp/sessions/2a9c85a4-5689-4b4a-b49e-54ae9bbf3ea7 Co-authored-by: marco-souza <4452113+marco-souza@users.noreply.github.com> --- e2e/site.spec.ts | 25 +++++++++++++++++++++++++ src/components/Footer.astro | 25 ++----------------------- src/components/SocialLinks.astro | 20 ++++++++++++++++++++ src/data/social-links.ts | 24 ++++++------------------ 4 files changed, 53 insertions(+), 41 deletions(-) create mode 100644 src/components/SocialLinks.astro diff --git a/e2e/site.spec.ts b/e2e/site.spec.ts index 68f6a45..e7266e8 100644 --- a/e2e/site.spec.ts +++ b/e2e/site.spec.ts @@ -31,6 +31,31 @@ test.describe('Homepage', () => { const footer = page.locator('footer'); await expect(footer).toBeInViewport(); }); + + test('shows only official social links in the footer', async ({ page }) => { + await page.goto('/'); + + const footer = page.locator('footer'); + + await expect(footer.getByRole('link', { name: /podcodar no github/i })).toHaveAttribute( + 'href', + 'https://github.com/podcodar/' + ); + await expect(footer.getByRole('link', { name: /podcodar no linkedin/i })).toHaveAttribute( + 'href', + 'https://www.linkedin.com/company/podcodar/' + ); + await expect(footer.getByRole('link', { name: /podcodar no instagram/i })).toHaveAttribute( + 'href', + 'https://www.instagram.com/podcodar/' + ); + await expect(footer.getByRole('link', { name: /podcodar no youtube/i })).toHaveAttribute( + 'href', + 'https://www.youtube.com/@podcodar5070' + ); + + await expect(footer.getByRole('link')).toHaveCount(4); + }); }); // ────────────────────────────────────────────────────────────────────────────── diff --git a/src/components/Footer.astro b/src/components/Footer.astro index 34be428..140dd31 100644 --- a/src/components/Footer.astro +++ b/src/components/Footer.astro @@ -1,7 +1,6 @@ --- -import { Icon } from 'astro-icon/components'; import Logo from '@/components/Logo.astro'; -import { footerSocialIconify, footerSocialLinks } from '@/data/social-links'; +import SocialLinks from '@/components/SocialLinks.astro'; import { getLangFromUrl, useTranslations } from '@/i18n/utils'; const today = new Date(); @@ -14,25 +13,5 @@ const t = useTranslations(lang);

© {today.getFullYear()} PodCodar. {t('footer.copyright')}

-
- { - footerSocialLinks.map((link) => ( - - {link.label} - - )) - } -
+ diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro new file mode 100644 index 0000000..6555721 --- /dev/null +++ b/src/components/SocialLinks.astro @@ -0,0 +1,20 @@ +--- +import { Icon } from 'astro-icon/components'; +import { socialIconify, socialLinks } from '@/data/social-links'; +--- + +
+ { + socialLinks.map((link) => ( + + {link.label} + + )) + } +
diff --git a/src/data/social-links.ts b/src/data/social-links.ts index 3485ace..d274147 100644 --- a/src/data/social-links.ts +++ b/src/data/social-links.ts @@ -1,9 +1,9 @@ /** * Footer / social presence. Update hrefs if a handle or invite URL changes. */ -export type SocialNetwork = 'github' | 'linkedin' | 'instagram' | 'youtube' | 'x' | 'discord'; +export type SocialNetwork = 'github' | 'linkedin' | 'instagram' | 'youtube'; -export type FooterSocialLink = { +export type SocialLink = { href: string; /** Screen reader label (pt-BR). */ label: string; @@ -11,19 +11,17 @@ export type FooterSocialLink = { }; /** Iconify ids for `astro-icon` + `@iconify-json/simple-icons`. */ -export const footerSocialIconify: Record = { +export const socialIconify: Record = { github: 'simple-icons:github', linkedin: 'simple-icons:linkedin', instagram: 'simple-icons:instagram', youtube: 'simple-icons:youtube', - x: 'simple-icons:x', - discord: 'simple-icons:discord', }; -export const footerSocialLinks: FooterSocialLink[] = [ +export const socialLinks: SocialLink[] = [ { network: 'github', - href: 'https://github.com/podcodar', + href: 'https://github.com/podcodar/', label: 'PodCodar no GitHub', }, { @@ -38,17 +36,7 @@ export const footerSocialLinks: FooterSocialLink[] = [ }, { network: 'youtube', - href: 'https://www.youtube.com/@podcodar', + href: 'https://www.youtube.com/@podcodar5070', label: 'PodCodar no YouTube', }, - { - network: 'x', - href: 'https://x.com/podcodar', - label: 'PodCodar no X', - }, - { - network: 'discord', - href: 'https://discord.com/invite/podcodar', - label: 'PodCodar no Discord', - }, ]; From 0529e96123173561975be9317219ef208b9f6854 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 22 Apr 2026 19:31:24 +0000 Subject: [PATCH 3/5] test: scope footer social link assertions to social icons container Agent-Logs-Url: https://github.com/podcodar/webapp/sessions/2a9c85a4-5689-4b4a-b49e-54ae9bbf3ea7 Co-authored-by: marco-souza <4452113+marco-souza@users.noreply.github.com> --- e2e/site.spec.ts | 14 +++++++------- src/components/SocialLinks.astro | 2 +- src/data/social-links.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/e2e/site.spec.ts b/e2e/site.spec.ts index e7266e8..5b494a5 100644 --- a/e2e/site.spec.ts +++ b/e2e/site.spec.ts @@ -35,26 +35,26 @@ test.describe('Homepage', () => { test('shows only official social links in the footer', async ({ page }) => { await page.goto('/'); - const footer = page.locator('footer'); + const socialLinks = page.locator('footer').getByTestId('social-links'); - await expect(footer.getByRole('link', { name: /podcodar no github/i })).toHaveAttribute( + await expect(socialLinks.getByRole('link', { name: /podcodar no github/i })).toHaveAttribute( 'href', 'https://github.com/podcodar/' ); - await expect(footer.getByRole('link', { name: /podcodar no linkedin/i })).toHaveAttribute( + await expect(socialLinks.getByRole('link', { name: /podcodar no linkedin/i })).toHaveAttribute( 'href', 'https://www.linkedin.com/company/podcodar/' ); - await expect(footer.getByRole('link', { name: /podcodar no instagram/i })).toHaveAttribute( + await expect(socialLinks.getByRole('link', { name: /podcodar no instagram/i })).toHaveAttribute( 'href', 'https://www.instagram.com/podcodar/' ); - await expect(footer.getByRole('link', { name: /podcodar no youtube/i })).toHaveAttribute( + await expect(socialLinks.getByRole('link', { name: /podcodar no youtube/i })).toHaveAttribute( 'href', - 'https://www.youtube.com/@podcodar5070' + 'https://www.youtube.com/@podcodar5070/' ); - await expect(footer.getByRole('link')).toHaveCount(4); + await expect(socialLinks.getByRole('link')).toHaveCount(4); }); }); diff --git a/src/components/SocialLinks.astro b/src/components/SocialLinks.astro index 6555721..f9daad5 100644 --- a/src/components/SocialLinks.astro +++ b/src/components/SocialLinks.astro @@ -3,7 +3,7 @@ import { Icon } from 'astro-icon/components'; import { socialIconify, socialLinks } from '@/data/social-links'; --- -