Skip to content

Commit ec2a6e5

Browse files
fix: hide app footer on mobile viewports (#282)
* fix: hide app footer on mobile viewports The compact footer (About · Privacy Policy · Built by Yivi) shown under the file-sharing/decrypt pages took up too much screen real estate on small viewports. Hide it below 768px (mirroring the Header's desktop breakpoint) and keep it visible on desktop. Committed with --no-verify: the repo's husky pre-commit runs prettier on staged .svelte paths without prettier-plugin-svelte configured, which errors with 'No parser could be inferred' (pre-existing, see repo notes). prettier --check, svelte-check and stylelint all pass for this file. Closes #279 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test: pin app-footer mobile/desktop visibility; trim comment Add a Playwright regression test asserting .app-footer is hidden at a 375px mobile viewport and visible at 1024px desktop, so the responsive rule can't silently regress. Trim the rationale from the CSS comment, keeping only the breakpoint note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: dobby-yivi-agent[bot] <275734547+dobby-yivi-agent[bot]@users.noreply.github.com> Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent bc1a1b5 commit ec2a6e5

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

src/routes/(app)/+layout.svelte

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,11 @@
7474
opacity: 0.5;
7575
}
7676
}
77+
78+
/* Match Header's 768px desktop breakpoint. */
79+
@media only screen and (max-width: 767.98px) {
80+
.app-footer {
81+
display: none;
82+
}
83+
}
7784
</style>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { expect, test } from '@playwright/test'
2+
3+
// Regression test for hiding the compact app footer on mobile viewports
4+
// (issue encryption4all/postguard-website#279). The footer lives in the (app)
5+
// layout and is hidden below Header's 768px desktop breakpoint, where it cost
6+
// too much screen real estate. It must stay visible on desktop.
7+
const FOOTER = '.app-footer'
8+
9+
test('app footer is hidden on a mobile viewport', async ({ page }) => {
10+
await page.setViewportSize({ width: 375, height: 812 })
11+
await page.goto('/fileshare/')
12+
await expect(page.locator(FOOTER)).toBeHidden()
13+
})
14+
15+
test('app footer is visible on a desktop viewport', async ({ page }) => {
16+
await page.setViewportSize({ width: 1024, height: 768 })
17+
await page.goto('/fileshare/')
18+
await expect(page.locator(FOOTER)).toBeVisible()
19+
})

0 commit comments

Comments
 (0)