Skip to content

fix(item-card): expand checkbox tap target on touch devices#1524

Draft
brokenalarms wants to merge 2 commits into
sysadminsmedia:mainfrom
brokenalarms:up/item-card-tap-target
Draft

fix(item-card): expand checkbox tap target on touch devices#1524
brokenalarms wants to merge 2 commits into
sysadminsmedia:mainfrom
brokenalarms:up/item-card-tap-target

Conversation

@brokenalarms

Copy link
Copy Markdown

What type of PR is this?

  • bug

What this PR does / why we need it:

The selection checkbox on item cards has a small hit area, making it hard to tap reliably on touch devices.

  • frontend/components/Item/Card.vue: expand the checkbox tap target so it is comfortably tappable on touch devices.

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Pure UX/touch-ergonomics tweak; no behavioral change to selection logic.

Testing

  • Manually verified the enlarged tap target on a touch device / responsive emulation.
  • eslint passes clean on the changed file.

The 20px checkbox in the item card corner was too small for finger
taps; taps that landed a few pixels off would hit the surrounding
NuxtLink and navigate to the item instead of selecting it, making
batch-select painful on iOS/Android.

Wrap the checkbox in a padded hit area that grows to ~44px only under
`pointer-coarse` so desktop mouse precision is unchanged. Move the
toggle handler to the wrapper and disable pointer events on the inner
checkbox so a single tap fires once. `@click.stop`/`@pointerdown.stop`
keep the underlying card link from receiving the event.

https://claude.ai/code/session_012aZhnQmF8RGDXAMdpKdoka
(cherry picked from commit beda6f8)
@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e1faa816-6281-4348-aa72-3ec7d42ca980

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

The frontend CI runs `pnpm lint:ci` which is `eslint ... --max-warnings 1`,
and main has accumulated 7 errors plus 2 warnings that block every PR
regardless of what it touches. Clear them so the lint job goes green
for this PR (and is a no-op once upstream merges any of these in any
order).

- components/Location/CreateModal.vue: drop unused EntityTypeSummary
  import.
- lib/api/classes/items.ts: drop the `error: any` cast on
  getLocations' return; TypeScript infers a tighter type from the
  spread.
- pages/collection/index/entity-types.vue: drop the unused `t` from
  useI18n and the now-unused useI18n import itself.
- pages/item/[id]/index/edit.vue,
  pages/location/[id]/index/edit.vue: drop the dead `locations`
  computed and the locationStore wiring it dragged in. Nothing on the
  template reads either.
- pages/location/[id]/index/index.vue: drop the dead `refresh` from
  useAsyncData and the dead locationStore. Replace
  `class="aspect-square ..."` with `aspect-[1/1]` so the
  tailwindcss/no-custom-classname rule stops flagging it (the rule's
  allowlist doesn't include `aspect-square`).
- pages/reset-password.vue: collapse a multi-line Button attribute set
  to one line per the prettier suggestion.

No runtime behavior changes — every removal is a value/import that
was never read. Verified with `pnpm lint:ci` exit 0.

https://claude.ai/code/session_012aZhnQmF8RGDXAMdpKdoka
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants