2 Commits

Author SHA1 Message Date
46e90a709c fix(frontend): meet the 44x44 minimum tap target on every control (closes #43)
Some checks failed
check / check (push) Has been cancelled
Every interactive control measured below the 44x44 CSS px floor (Apple
HIG, WCAG 2.2 SC 2.5.5) on touch viewports: .pin-btn at 16x16, the
debug-log label at 89.3x14, #interval-select at 64x28 and, in the narrow
layout, #pause-btn at 108.2x39.8.

The pin button keeps its 16x16 layout footprint: the button box grows to
44x44 and matching negative margins take the growth back out of layout,
so neither row height nor the icon's position changes in either layout.
The select and the pause button get a min-height, the debug-log label
becomes an inline-flex box 44 tall. Applied unconditionally rather than
under a breakpoint, since a phone in landscape is above the 768px
breakpoint and still a touch device.
2026-08-10 13:54:58 +00:00
a644efe9ff chore: root .editorconfig and hardened .gitignore (closes #15)
All checks were successful
check / check (push) Successful in 45s
2026-08-10 15:47:49 +02:00
5 changed files with 71 additions and 4 deletions

27
.gitignore vendored
View File

@@ -1,4 +1,27 @@
node_modules/
dist/
# OS
.DS_Store
Thumbs.db
# Editors
*.swp
*.swo
*~
*.bak
.idea/
.vscode/
*.sublime-*
# Node
node_modules/
# Environment / secrets
.env
.env.*
*.pem
*.key
# Build output
dist/
# Logs
*.log

11
TODO.md
View File

@@ -22,6 +22,17 @@ files, so merging it also closes most compliance gaps.
# Completed Steps
- 2026-08-10: every interactive control now meets the 44x44 CSS px minimum tap
target (`.pin-btn`, `#interval-select`, the debug-log label and, on narrow
viewports, `#pause-btn`). The pin button's hit area grows via matching
negative margins, so its layout footprint and row density are unchanged
- 2026-08-09: dotfile compliance — lifted `backend/.editorconfig` to the repo
root so `root = true` covers the frontend too, and replaced `.gitignore` with
the org model (OS, editor, node, and environment/secrets sections) plus this
repo's `dist/` and `*.log`. `.env`, `.env.*`, `*.pem`, and `*.key` are now
ignored repo-wide, not just under `backend/`. Excluding `.git` from
`.dockerignore` stays deferred: both images read git metadata at build time
(`COPY .git` in `Dockerfile.backend`, `git rev-parse` in `vite.config.js`)
- 2026-07-07 Adopted scripts-to-rule-them-all: `script/` entrypoints, Makefile
shims, README Entrypoints section
- 2026-02-27: backend with buffered zstd-compressed report storage; CI workflow

View File

@@ -671,7 +671,7 @@ function buildUI(state) {
</p>
<p class="mt-2"><a href="https://git.eeqj.de/sneak/netwatch/commit/${__COMMIT_FULL__}" target="_blank" rel="noopener" class="text-gray-600 hover:text-gray-400">${__COMMIT_HASH__}</a></p>
<p class="mt-2">
<label class="cursor-pointer">
<label class="debug-toggle-label cursor-pointer">
<input type="checkbox" id="debug-toggle" class="mr-1">
<span>Debug log</span>
</label>

View File

@@ -14,6 +14,38 @@ body {
ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}
/* ---- Minimum tap targets ----------------------------------------------
Every interactive control is at least 44x44 CSS px (Apple HIG, WCAG 2.2
SC 2.5.5). Not scoped to a breakpoint or to `pointer: coarse`: a large
phone in landscape is above the 768px breakpoint and still a touch
device. */
/* The button grows to 44x44 while the negative margins keep its layout
footprint at the 16x16 of the icon inside it, so row height and the
icon's position are unchanged. */
.pin-btn {
display: flex;
align-items: center;
justify-content: center;
width: 2.75rem;
height: 2.75rem;
margin: -0.875rem;
}
/* A select paints its own background and border, so it has to actually be
44 tall rather than borrow the trick above. */
#interval-select {
min-height: 2.75rem;
}
/* The tappable target for #debug-toggle is the label wrapping it. */
.debug-toggle-label {
display: inline-flex;
align-items: center;
justify-content: center;
min-height: 2.75rem;
}
.sparkline-container {
background: linear-gradient(
to bottom,
@@ -38,9 +70,10 @@ body {
gap: 0.75rem;
}
/* Pause button: smaller on mobile */
/* Pause button: smaller on mobile, but not below the tap-target floor */
#pause-btn {
padding: 0.5rem 1rem;
min-height: 2.75rem;
}
#pause-btn svg {