equinor / equinor/webviz

Color select debounce

Open
#992 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
9
Forks
11
Avg merge
5d 10h
Merged PRs (30d)
23

Description

The `ColorSelect` input component should have a debounce; the color updates as you're moving around in the browser color picker, causing a lot of unnecessary update events.

On that note: the change event *should* only be fired once the color dialog closes, but React [deviates from the standard](https://github.com/facebook/react/issues/6308#issuecomment-199223358) in this case, which is why the issue occurs. In addition to the debounce, we should consider re-implementing the standard DOM behavior, keeping a local value, and then emitting `onChange` when onBlur happens

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the TypeScript ColorSelect input component and inspect its change and blur handling first. Reproduce movement in the browser color picker, then resolve whether the completed behavior should use debouncing or standard DOM-style local-value and onBlur handling; done means updates no longer emit repeatedly while the dialog is open.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
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.