Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions src/components/patterns/Footer/Footer.css
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,23 @@
justify-content: center;
gap: var(--space-6);

a {
display: inline-flex;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these changes are not required

align-items: center;
justify-content: center;
min-width: var(--size-6);
min-height: var(--size-6);
}

li {
display: inline;
}

svg {
color: var(--color-icon-primary);
width: var(--size-4);
height: var(--size-4);
flex-shrink: 0;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

width and height is not required for icons, already default size is given to icons.

Also I would have put flex-shrink=0 on <li> because they are direct children of flex box <ul>.

}

svg path {
Expand All @@ -86,6 +97,8 @@

@media (--xs-only) {
padding: var(--space-4) 0 var(--space-6);
flex-wrap: wrap;

@ShubhamOulkar ShubhamOulkar Sep 2, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is right approach but need to add this for all view port widths. see issue #2494 (review)

gap: var(--space-3);
}

@media (--md-up) {
Expand Down
36 changes: 36 additions & 0 deletions tests/e2e/homepage.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -242,4 +242,40 @@ test.describe('Homepage Content', () => {
await expect(blueskyLink).toBeVisible();
await expect(rssLink).toBeVisible();
});

test('should preserve minimum social icon and target sizes on narrow screens', async ({

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am +1 on adding tests on target sizes for all the buttons and sidebar. Feel free to open PR's for it.

page,
}) => {
await page.setViewportSize({ width: 390, height: 844 });

const footer = page.getByTestId('footer');
const measurementTolerance = 0.01;
const socialLinks = [
footer.getByRole('link', { name: /GitHub/i }),
footer.getByRole('link', { name: /Youtube/i }),
footer.getByRole('link', { name: /X account/i }),
footer.getByRole('link', { name: /slack/i }),
footer.getByRole('link', { name: /Open Collective/i }),
footer.getByRole('link', { name: /bluesky/i }),
footer.getByRole('link', { name: /RSS Feed/i }),
];

for (const link of socialLinks) {
const linkBox = await link.boundingBox();
const iconBox = await link.locator('svg').boundingBox();

expect(linkBox).not.toBeNull();
expect(iconBox).not.toBeNull();
expect(linkBox!.width).toBeGreaterThanOrEqual(24 - measurementTolerance);
expect(linkBox!.height).toBeGreaterThanOrEqual(24 - measurementTolerance);
expect(iconBox!.width).toBeGreaterThanOrEqual(16 - measurementTolerance);
expect(iconBox!.height).toBeGreaterThanOrEqual(16 - measurementTolerance);
}

const viewport = await page.evaluate(() => ({
clientWidth: document.documentElement.clientWidth,
scrollWidth: document.documentElement.scrollWidth,
}));
expect(viewport.scrollWidth).toBeLessThanOrEqual(viewport.clientWidth);
});
});
Loading