Skip to content

feat(button)!: add the tinted red style - #46

Merged
romchornyi merged 1 commit into
masterfrom
feat/button-tinted-red
Nov 1, 2026
Merged

romchornyi merged 1 commit into
masterfrom
feat/button-tinted-red

Conversation

@romchornyi

@romchornyi romchornyi commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

The DashConnect connection sheet's Disconnect button is btn-l tinted-red in Figma (background --button/tinted-red/bg rgba(234,57,67,0.05), content --button/tinted-red/content #EA3943). DashButtonStyle had tinted blue, gray and white but no red, so dashwallet-ios laid a background behind a .plainRed button, and its clear background left only the title tappable (dashpay/dashwallet-ios#1277).

What was done?

  • DashButtonStyle.tintedRed, following tintedBlue: four tokens (buttonTintedRedBackground, …BackgroundDisabled, buttonTintedRedContent, …ContentDisabled) backed by colour sets with light and dark entries.
    • Enabled: background #EA3943 at 0.05, content #EA3943 (the Figma values; the existing red tokens are #EB3842).
    • Disabled: the neutral #0A0B0D at 0.05 and 0.40, as every other style's disabled colours.
    • Dark is the same as light, as for tinted blue.
  • Preview grid row "Tinted Red" (enabled and disabled, all sizes); docs and README list the style.
  • DashButtonStyleTests: the style returns the four tokens, and each colour set resolves under light and dark to the expected values with a non-zero alpha, so the whole background takes taps.

How Has This Been Tested?

  • swift build (macOS); xcodebuild -destination 'generic/platform=iOS' -configuration Release CODE_SIGNING_ALLOWED=NO build; the CI test command on the iOS 27 simulator: 20 tests, 0 failures; conventions.sh OK.

Before / After

Before After
Light — light
Dark — dark

Breaking Changes

DashButtonStyle gains the case tintedRed. The enum is public and not frozen, so a host that switches over it without a default stops compiling until it handles the new case. dashwallet-ios has no such switch (its own button styles are a separate type), so it builds unchanged.

🤖 Generated with Claude Code

A destructive action that is not the primary one (DashConnect's Disconnect)
is drawn tinted red; without the style the app had to lay a background
behind a plain red button, which left only its title tappable.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 30 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 7dcacb0 and a25cf7a.

Files ignored due to path filters: 5
  • Sources/DashUIKit/Resources/Media.xcassets/Colors/Buttons/Styles/TintedRed/ButtonTintedRedBackground.colorset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Colors/Buttons/Styles/TintedRed/ButtonTintedRedBackgroundDisabled.colorset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Colors/Buttons/Styles/TintedRed/ButtonTintedRedContent.colorset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Colors/Buttons/Styles/TintedRed/ButtonTintedRedContentDisabled.colorset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Colors/Buttons/Styles/TintedRed/Contents.json is excluded by !**/*.xcassets/**
Files selected for processing: 6
  • README.md
  • Sources/DashUIKit/Button/DashButton.swift
  • Sources/DashUIKit/Foundation/Color+DashUI.swift
  • Tests/DashUIKitTests/DashButtonStyleTests.swift
  • docs/buttons-and-inputs.md
  • docs/foundation.md
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@romchornyi-pitcrew

romchornyi-pitcrew commented Oct 31, 2026 •

Copy link
Copy Markdown

✅ Review posted for commit a25cf7a · triage: trivial · approve · took 1 min

@romchornyi
romchornyi marked this pull request as ready for review October 31, 2026 21:00

@romchornyi-pitcrew romchornyi-pitcrew left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ no blockers · no majors · 3 non-blocking recommendations — reviewed at a25cf7aa4c

Level Verdict
1 · Idea ✅ valid Figma's btn-l tinted-red had no style, so dashwallet-ios#1277 laid a background behind .plainRed, and only the title was tappable
2 · Architecture ✅ right layer A style plus four tokens, following .tintedBlue, backed by colour sets
3 · Completeness ✅ complete Both backgroundColor and foregroundColor switches, the preview names, a preview, docs, README and foundation.md all list the new style
4 · Code ✅ clean Enabled values match the Figma tokens. The disabled pair is the same neutral as .tintedBlue's (#0A0B0D at 0.05 / 0.40, the same in dark), checked against those colour sets. The test pins all four values in light and dark

Most checks were still running when this review was written.

3 non-blocking recommendations
  1. A new case in a public enum —
    public enum DashButtonStyle {
    case filledBlue, filledRed, strokeGray, tintedBlue, tintedRed, tintedGray, plainBlue, plainBlack, plainRed, filledWhiteBlue, tintedWhite, plainWhite
    — DashButtonStyle is a public, non-frozen enum, so a host that switches over it exhaustively stops compiling at the next tag. dashwallet-ios has none: its Button.swift defines its own struct DashButtonStyle: ButtonStyle and does not switch over DashUIKit's enum. Still, a line in the release notes helps other hosts, and the Public API check should list the case as additive. (dashwallet-ios develop verified)
  2. Two reds — the content is #EA3943, the Figma value, while the existing red tokens are #EB3842 (the description says so). Two near-identical reds can drift apart. If Figma has moved to #EA3943 for every red, one issue to align the others would settle which is right.
  3. Dark mode — the enabled background is 5% red on a dark page, the same as light, which follows .tintedBlue. A dark render of the DashConnect sheet would confirm the button still reads as a button there; the "Dark" screenshot here shows the preview grid only.
Review details

Tier: trivial (one style, four tokens and a test, following an existing pattern). Levels 1–3 one line each. Level 4 was checked inline: the diff, the colour sets against .tintedBlue's, the test, and dashwallet-ios for exhaustive switches over DashButtonStyle. No lane was run for a pattern-copy of this size.

🤖 Reviewed with Claude Code

@romchornyi romchornyi changed the title feat(button): add the tinted red style feat(button)!: add the tinted red style Nov 1, 2026
@romchornyi
romchornyi merged commit bcf3858 into master Nov 1, 2026
14 of 16 checks passed
@romchornyi
romchornyi deleted the feat/button-tinted-red branch November 1, 2026 15:55
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