feat: support Alt and Meta arrow colors with new colors mapping object#229
Open
Vikrambgs wants to merge 1 commit into
Open
feat: support Alt and Meta arrow colors with new colors mapping object#229Vikrambgs wants to merge 1 commit into
colors mapping object#229Vikrambgs wants to merge 1 commit into
Conversation
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.
|
@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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces an architectural upgrade to
arrowOptionsto resolve the limitation of hardcoded arrow colors options.Changes:
color,secondaryColor, andtertiaryColorvariables with a scalablecolorsobject map.AltandMeta/Cmdkey modifiers, allowing users to draw up to 5 distinct arrow colors by default.ArrowOptionsStorybook 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
How Has This Been Tested?
pnpm storybookand 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.
pnpm test:staticlocally to ensure no TypeScript compilation errors or Prettier formattingissues were introduced by the updated
ChessboardOptionstype definitions.Checklist: