Skip to content

feat(cds 1615) deprecate dangerouslySetBackground/dangerouslySetColor props#427

Merged
haoruikun-cb merged 3 commits intocds-v9from
harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props
Feb 27, 2026
Merged

feat(cds 1615) deprecate dangerouslySetBackground/dangerouslySetColor props#427
haoruikun-cb merged 3 commits intocds-v9from
harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props

Conversation

@haoruikun-cb
Copy link
Copy Markdown
Contributor

@haoruikun-cb haoruikun-cb commented Feb 24, 2026

What changed? Why?

https://linear.app/coinbase/issue/CDS-1615/deprecate-dangerouslysetbackgrounddangerouslysetcolor-props

  1. deprecated dangerouslySetBackground/dangerouslySetColor props
  2. Update our internal usage and examples to use styles instead of dangerouslySetBackground/dangerouslySetColor props
  3. Enhanced some CDS components with styles/classNames api, so customer can use that instead of dangerouslySetBackground/dangerouslySetColor

Root cause (required for bugfixes)

UI changes

iOS Old iOS New
old screenshot new screenshot
Android Old Android New
old screenshot new screenshot
Web Old Web New
old screenshot new screenshot

Testing

How has it been tested?

  • Unit tests
  • Interaction tests
  • Pseudo State tests
  • Manual - Web
  • Manual - Android (Emulator / Device)
  • Manual - iOS (Emulator / Device)

Testing instructions

For a comprehensive test, we will rely on visreg when we compare final v9 branch against the master

Illustrations/Icons Checklist

Required if this PR changes files under packages/illustrations/** or packages/icons/**

  • verified visreg changes with Terran (include link to visreg run/approval)
  • all illustration/icons names have been reviewed by Dom and/or Terran

Change management

type=routine
risk=low
impact=sev5

automerge=false

@linear
Copy link
Copy Markdown

linear Bot commented Feb 24, 2026

@cb-heimdall
Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 1
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1
CODEOWNERS 🟡 See below

🟡 CODEOWNERS

Code Owner Status Calculation
ui-systems-eng-team 🟡 0/1
Denominator calculation
Additional CODEOWNERS Requirement
Show calculation
Sum 0
0
From CODEOWNERS 1
Sum 1

@haoruikun-cb haoruikun-cb changed the base branch from master to cds-v9 February 24, 2026 20:28
@haoruikun-cb haoruikun-cb force-pushed the harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props branch from ddc4d2a to ffe334f Compare February 24, 2026 20:53
@haoruikun-cb haoruikun-cb changed the title feat(cds 1615) deprecate dangerouslysetbackgrounddangerouslysetcolor props feat(cds 1615) deprecate dangerouslySetBackground/dangerouslySetColor props Feb 24, 2026
) {
const rootStyleOverride = styles?.root;

const rootStyle = useMemo<PressableProps['style']>(() => {
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The Pressable style prop could be a function, so we are doing check like this

@haoruikun-cb haoruikun-cb force-pushed the harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props branch 3 times, most recently from 574dfe7 to be2ba27 Compare February 27, 2026 16:48
Comment thread packages/mobile/src/controls/HelperText.tsx
Comment thread packages/web/src/controls/HelperText.tsx
@haoruikun-cb haoruikun-cb force-pushed the harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props branch from be2ba27 to 88e1403 Compare February 27, 2026 19:41
@haoruikun-cb haoruikun-cb merged commit 0fe118e into cds-v9 Feb 27, 2026
14 of 15 checks passed
@haoruikun-cb haoruikun-cb deleted the harryhao/cds-1615-deprecate-dangerouslysetbackgrounddangerouslysetcolor-props branch February 27, 2026 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants