philc / philc/vimium

Hints don't show for tiny inputs (react-select)

Open
#3,139 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
27k
Forks
2.6k
PR merge metrics
No merged PRs in 30d

Description

I'm using react-select on a site we're building and for some reason none of the inputs are fable. It uses a regular non-readonly not-disabled not-hidden input.

I finally tracked this down mystery: https://github.com/philc/vimium/blob/17fb86e02971948f90215934cbe5417674364a29/lib/dom_utils.coffee#L124 - apparently vimium mandates that inputs must be at least 3px wide? However, the react-select lib hard codes its input to be just 2px wide (and via an inline-style) 😞

Is there any reason for this 3px mandate? Could we reduce it to 2? Or 1? Or maybe make it based on the area? Or if there's a really good reason for this, should I go bring up an issue over in the react-select repo?

Contributor guide

Open the contributing guide

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 with lib/dom_utils.coffee at line 124, where Vimium filters very small inputs, and reproduce the behavior with the 2px input used by react-select. Check the existing comments and hint-detection flow before deciding whether the size threshold should change. Done means the intended treatment of tiny inputs is agreed and the react-select case behaves accordingly without unwanted hints.

Written by the indexing model from the issue text.

Assessment

Tech stack
coffeescript, javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.