Skip to content

Update TextFieldUI to determine cursor color based on component luminance#13211

Open
tjclawson-stripe wants to merge 2 commits into
masterfrom
tyler/cursor-color-fix
Open

Update TextFieldUI to determine cursor color based on component luminance#13211
tjclawson-stripe wants to merge 2 commits into
masterfrom
tyler/cursor-color-fix

Conversation

@tjclawson-stripe

Copy link
Copy Markdown
Collaborator

Summary

  • Refactor isDark helper from IconHelper to StripeTheme
  • Use isComponentColorDark to determine which cursor color to use

Motivation

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
Screenshot_1780874787 Screenshot_1780874861

Changelog

@tjclawson-stripe tjclawson-stripe marked this pull request as ready for review June 8, 2026 17:04
@tjclawson-stripe tjclawson-stripe requested review from a team as code owners June 8, 2026 17:04
unfocusedIndicatorColor = Color.Transparent,
cursorColor = MaterialTheme.stripeColors.textCursor,
cursorColor = StripeTheme.getColors(isComponentColorDark()).textCursor,
errorCursorColor = when (fieldDisplayState) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need a fix for the errorCursorColor? or should that be out of scope and address by the new API?

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.

2 participants