Skip to content

feat(icons): publish XmarkIcon and add the disabled menu-send-account variant - #12

Merged
QuantumExplorer merged 2 commits into
masterfrom
feat/public-xmark-icon
Aug 12, 2026
Merged

feat(icons): publish XmarkIcon and add the disabled menu-send-account variant#12
QuantumExplorer merged 2 commits into
masterfrom
feat/public-xmark-icon

Conversation

@romchornyi

@romchornyi romchornyi commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Two icon gaps found while building a Join DashPay menu row in dashwallet-ios.

1. menu-send-account had no disabled counterpart. MenuItem greys out its title and help text when isEnabled is false and swaps in disabledLeadingIcon — but with no disabled asset to pass, the row kept a full-colour blue icon against greyed text.

2. XmarkIcon was internal. App code needing a close control had to fall back to the bundled navigationbar-close asset, which is fixed artwork: it does not scale cleanly to an arbitrary size and does not take a tint.

What was done?

Disabled icon — adds the menu-send-account-disabled imageset at the usual three scales (30/60/90) and maps it as DashIcon.Menu.sendAccountDisabled, following the existing sendDisabled / receiveDisabled pairs.

XmarkIconXmarkIcon and its properties are now public, with an explicit public init(size:color:lineWidth:) (a public struct gets no public memberwise initializer). Defaults are unchanged, so the module's own call sites in Toast and SystemMessageView are untouched — this is a visibility change only, with no behaviour or rendering difference.

docs/feedback.md stated the opposite ("Internal to the module (not part of the public API) — reach for the bundled navigationbar-close asset or an SF Symbol from app code") and is corrected to explain when to prefer the shape and when the navigation-bar artwork is still right.

How Has This Been Tested?

swift build on macOS — build complete, no new warnings. The new imageset is consumed by JoinDashPayMenuItem in dashwallet-ios#999 via disabledLeadingIcon: .custom("menu-send-account-disabled", bundle: .dashUIKit), which is what surfaced the gap.

Note for the reviewer

The new artwork is the same shape and hue as the existing disabled icons (#B0B6BC) but is exported at 80% opacity, where menu-send-disabled and menu-receive-disabled are fully opaque. It will therefore read slightly fainter next to them. Flagging rather than silently normalising it, in case the softer weight is intended — happy to re-export at 100% if not.

Breaking Changes

None. Widening visibility cannot break existing callers, the added initializer matches the previous memberwise signature and defaults, and the new enum case is additive.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

Summary by CodeRabbit

  • New Features

    • Exposed the scalable, tintable X-shaped icon for use throughout the app.
    • Added configuration options for size, color, and line width while preserving existing defaults.
    • Added an icon for disabled account sending states.
  • Documentation

    • Updated guidance on choosing between the customizable icon and the bundled asset for exact navigation-bar artwork.

`XmarkIcon` was internal, so app code reaching for a close control had to
fall back to the bundled `navigationbar-close` asset. That asset is fixed
artwork: it neither scales cleanly to an arbitrary size nor takes a tint,
which is exactly what a close control drawn at 12pt inside a menu row
needs.

The icon is already a `Shape` with `size` / `color` / `lineWidth` knobs, so
nothing about it was internal by design — it simply had no reason to be
exported until now. Publishing it adds an explicit public initializer,
since a public struct gets no public memberwise init, and leaves the
call site unchanged for the module's own use in `Toast` and
`SystemMessageView`.

`docs/feedback.md` claimed the opposite ("Internal to the module ... reach
for the bundled navigationbar-close asset"), so it is corrected here and
now says when to prefer each.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 5192e373-7cda-44f4-87ee-2394c123b59d

📥 Commits

Reviewing files that changed from the base of the PR and between e82c3eb and aa00bc4.

⛔ Files ignored due to path filters (4)
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/Menu/menu-send-account-disabled.imageset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/Menu/menu-send-account-disabled.imageset/menu-send-account-disabled.png is excluded by !**/*.png, !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/Menu/menu-send-account-disabled.imageset/menu-send-account-disabled@2x.png is excluded by !**/*.png, !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/Menu/menu-send-account-disabled.imageset/menu-send-account-disabled@3x.png is excluded by !**/*.png, !**/*.xcassets/**
📒 Files selected for processing (1)
  • Sources/DashUIKit/Foundation/Icon_DashUI.swift

📝 Walkthrough

Walkthrough

XmarkIcon is now a public, configurable SwiftUI view. Documentation describes its custom sizing and tinting use. DashIcon.Menu now includes the sendAccountDisabled asset case.

Changes

XmarkIcon public API

Layer / File(s) Summary
Public API and usage guidance
Sources/DashUIKit/Components/Icons/XmarkIcon.swift, docs/feedback.md
XmarkIcon, its configuration properties, initializer, and body are public. Documentation describes custom sizing and tinting guidance while retaining the bundled asset for exact navigation-bar artwork.

Menu icon case

Layer / File(s) Summary
Send account disabled icon
Sources/DashUIKit/Foundation/Icon_DashUI.swift
DashIcon.Menu adds sendAccountDisabled, mapped to the menu-send-account-disabled asset.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • dashpay/DashUIKit#8: Introduced the typed DashIcon.Menu API that this change extends with sendAccountDisabled.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes both primary changes: publishing XmarkIcon and adding the disabled menu-send-account variant.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/public-xmark-icon

Comment @coderabbitai help to get the list of available commands.

`menu-send-account` had no disabled counterpart, so a `MenuItem` using it as
its leading icon had nothing to pass for `disabledLeadingIcon` and kept the
full-colour icon while the rest of the row was greyed out.

Adds the imageset at the usual three scales (30/60/90) and maps it as
`DashIcon.Menu.sendAccountDisabled`, following the existing
`sendDisabled` / `receiveDisabled` pairs.
@romchornyi romchornyi changed the title feat(icons): make XmarkIcon public feat(icons): publish XmarkIcon and add the disabled menu-send-account variant Aug 12, 2026
@QuantumExplorer
QuantumExplorer merged commit 5b373b1 into master Aug 12, 2026
4 checks passed
@QuantumExplorer
QuantumExplorer deleted the feat/public-xmark-icon branch August 12, 2026 17:27
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.

3 participants