raystack / raystack/apsara

[ColorPicker] Support ref as prop, make input editable, and fix pointer events

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

Nobody has claimed this yet.

component triage
Dominant language
TypeScript
Stars
70
Forks
13
Avg merge
2d 5h
Merged PRs (30d)
8

Description

Summary

Improvements to the ColorPicker component to add missing ref support and improve configurability.

Improvements

1. Missing ref prop support on multiple sub-components

ColorPickerRoot, ColorPickerArea, and ColorPickerInput don't accept ref as a prop.

2. ColorPickerInput is hardcoded readOnly

The input always renders as readOnly — users can't type in a hex/rgb value directly.

4. Manual pointer event handling in Area

ColorPickerArea manually manages pointermove/pointerup window event listeners. These should be cleaned up properly on unmount.

Moved to Cross-Cutting Issues

The following items have been moved to cross-cutting issues that address them across all components:

  • Replace hardcoded CSS values with design tokens (#672)

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 by locating the ColorPickerRoot, ColorPickerArea, and ColorPickerInput entry points and inspect how refs, input readOnly behavior, and pointermove/pointerup listeners are handled. Done means the three sub-components accept refs, ColorPickerInput permits direct hex/rgb editing, and ColorPickerArea cleans up its window listeners on unmount.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.