[Tooltip] Increase default x/y offset on mobile / touch

Open
#485 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
frontend

Research direction

Start in packages/layerchart/src/lib/components/tooltip/Tooltip.svelte at lines 175-177, where pointer mode defaults xOffset and yOffset to 10 pixels. Compare the available touch-detection approaches mentioned in the issue and determine the increased offsets for touch input. Done means touch tooltips use the larger defaults without changing non-touch behavior.

Written by the indexing model from the issue text.

Description

Currently we default xOffset / yOffset to 10 pixels when using pointer mode, but this can easily obscure tooltips under your bring.

We should instead increase the offset when touch is detected using maybe new MediaQuery('(pointer: course)') (svelte, mdn) or navigator.maxTouchPoints (mdn) as a tell.

Dominant language
TypeScript
Stars
1.3k
Forks
41
Avg merge
2d 8h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from techniq/layerchart

All issues in techniq/layerchart

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.