techniq / techniq/layerchart

[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.

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

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.

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.

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.