Skip to content

feat: support Alt and Meta arrow colors with new colors mapping object#229

Open
Vikrambgs wants to merge 1 commit into
Clariity:mainfrom
Vikrambgs:feat/arrow-modifier-colors
Open

feat: support Alt and Meta arrow colors with new colors mapping object#229
Vikrambgs wants to merge 1 commit into
Clariity:mainfrom
Vikrambgs:feat/arrow-modifier-colors

Conversation

@Vikrambgs

@Vikrambgs Vikrambgs commented Jun 26, 2026

Copy link
Copy Markdown

Description

This PR introduces an architectural upgrade to arrowOptions to resolve the limitation of hardcoded arrow colors options.

Changes:

  • Replaces the hardcoded color, secondaryColor, and tertiaryColor variables with a scalable colors object map.
  • Unlocks the Alt and Meta/Cmd key modifiers, allowing users to draw up to 5 distinct arrow colors by default.
  • Deprecates the legacy color options but retains 100% backward compatibility for existing applications.
  • Updates the ArrowOptions Storybook page with distinct inputs for all 5 modifiers.

Motivation:
The previous architecture exhausted the available color variations and prevented developers from taking advantage of other useful keyboard modifiers (like Alt and Meta). This update makes the options fully scalable and gives developers cleaner, more granular control over their UI without breaking any existing apps.

Type of change

  • New feature (non-breaking change which adds functionality)
  • Documentation update
  • Code refactoring

How Has This Been Tested?

  • Manual Storybook Testing: Spun up pnpm storybook and verified that drawing arrows with Right-Click, Shift+Right-
    Click, Ctrl+Right-Click, Alt+Right-Click, and Meta+Right-Click correctly resolves and renders all 5 different configured colors.
  • Static Testing: Ran pnpm test:static locally to ensure no TypeScript compilation errors or Prettier formatting
    issues were introduced by the updated ChessboardOptions type definitions.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Replaces `secondaryColor`/`tertiaryColor` with an extensible `colors` object in `arrowOptions`. Deprecates legacy color props
  but retains full backward compatibility. Updates Storybook and docs to match.
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Vikrambgs is attempting to deploy a commit to the Ryan Gregory's projects Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant