Skip to content

feat(icons): add the system-message public icon - #62

Merged
romchornyi merged 3 commits into
masterfrom
feat/system-message-public-icon
Nov 11, 2026
Merged

romchornyi merged 3 commits into
masterfrom
feat/system-message-public-icon

Conversation

@romchornyi

@romchornyi romchornyi commented Nov 11, 2026 •

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

The design system has a "public" system-message icon (Design system - Hybrid, system_message-public: a blue eye) shown next to a notice that an amount and a destination become public, but DashUIKit had no asset for it. Dash Wallet iOS needs it on the Send confirmation for a payment from the Shielded balance to Core (dashpay/dashwallet-ios#1358).

What was done?

  • New icon DashIcon.SystemMessage.`public` (system-message-public): a vector SVG exported from the design system, transparent around the eye, stored with "preserve vector data" and original rendering.
  • .github/scripts/conventions.sh reads a backticked enum case (case `public` = "…"), so the DashIcon ↔ imageset check covers it; a case for it in conventions-test.sh.
  • SystemMessageView: a "Public icon" preview and a testPublicIcon snapshot test (light and dark).
  • docs/foundation.md lists the system-message icons.

No existing view changes.

How Has This Been Tested?

  • .github/scripts/conventions.sh and its test: OK.
  • swift build, swift test: pass. The iOS DashIconTests (every case's image loads) run in CI.
  • Snapshot tests: two new references, testPublicIcon.public-icon-light/-dark, rendered by CI and committed with fetch-snapshots.sh; no existing reference changes.

Before / After

Before After
Light (no asset)
Dark (no asset)
  • No visual change (refactor, tests, docs). Say why in "What was done?".

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added a public-system icon for use in system messages, including messages about public transactions.
  • Documentation
    • Updated the bundled icon asset listing with additional system-message icons.

DashIcon.SystemMessage.publicVisibility (system-message-public): the design
system's blue eye used next to a notice that an amount and a destination become
public. Stored like info-rect-small (PNG 1x/2x/3x).
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The icon convention scanner now handles backtick-escaped Swift identifiers. The system-message icon enum adds a public icon, with a preview, snapshot test, and documentation updates for system-message assets.

Changes: Backticked icon case scanning

Layer / File(s) Summary
Recognize and validate backticked cases
.github/scripts/conventions.sh, .github/scripts/tests/conventions-test.sh
The scanner accepts backtick-escaped identifiers and removes the backticks when deriving implicit asset names. Its fixture and expected failures cover missing assets for backticked cases. Explicit string raw values remain unchanged.

Public system-message icon

Layer / File(s) Summary
Add and show the public icon
Sources/DashUIKit/Foundation/Icon_DashUI.swift, Sources/DashUIKit/Components/SystemMessageView.swift, SnapshotTests/Tests/DashUIKitSnapshotTests/SystemMessageViewSnapshotTests.swift, docs/foundation.md
The icon enum adds system-message-public. A preview and snapshot test show the icon with a title and subtitle. The documentation adds three system-message asset names.

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

Change: Feature

Possibly related PRs

  • dashpay/DashUIKit#53: Adds snapshot coverage for SystemMessageView, which this PR extends with a snapshot for the public icon.
  • dashpay/DashUIKit#30: Introduces the convention scanner and tests that this PR updates for backticked identifiers.
  • dashpay/DashUIKit#36: Shares the DashIcon declarations and asset-name scanner changed in this PR.

Suggested reviewers: romchornyi-pitcrew

Merge Risk: Minimal · up to 446f6

This change adds a new system-message icon with its preview, snapshots, and documentation, and extends the convention check to handle backticked case names. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding the system-message public icon.
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.
Finishing Touches

Generate docstrings

  • Commit to this branch
  • Create a new PR
Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • 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

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between e8ae3e7 and 446f630.

Files ignored due to path filters: 4

  • SnapshotTests/Tests/DashUIKitSnapshotTests/__Snapshots__/SystemMessageViewSnapshotTests/testPublicIcon.public-icon-dark.png is excluded by !**/*.png
  • SnapshotTests/Tests/DashUIKitSnapshotTests/__Snapshots__/SystemMessageViewSnapshotTests/testPublicIcon.public-icon-light.png is excluded by !**/*.png
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/System message/system-message-public.imageset/Contents.json is excluded by !**/*.xcassets/**
  • Sources/DashUIKit/Resources/Media.xcassets/Icons & Illustrations/System message/system-message-public.imageset/system-message-public.svg is excluded by !**/*.svg, !**/*.xcassets/**
Files selected for processing: 6

  • .github/scripts/conventions.sh
  • .github/scripts/tests/conventions-test.sh
  • SnapshotTests/Tests/DashUIKitSnapshotTests/SystemMessageViewSnapshotTests.swift
  • Sources/DashUIKit/Components/SystemMessageView.swift
  • Sources/DashUIKit/Foundation/Icon_DashUI.swift
  • docs/foundation.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@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.

🔴 Changes requested — 1 blocker (inline) · 1 major · 4 non-blocking recommendations — reviewed at eea52a444a

Level Verdict
1 · Idea ✅ valid The Send confirmation for a Shielded → Core payment (dashpay/dashwallet-ios#1358) needs the design's "public" system-message icon
2 · Architecture ✅ right layer Design-system assets live here
3 · Completeness ✅ complete One icon, one case, docs line
4 · Code 🔴 1 blocker The exported PNGs are opaque with a white background

Blocker

  • system-message-public@3x.png (and the 1x/2x) — every pixel has alpha 255 and the background is solid white (#FFFFFF at the corners and edges), while every sibling, e.g. system-message-info-rect-small@3x.png, is transparent around the glyph. In SystemMessageView the icon will sit in a white 30 pt square: a bright box in dark mode, a visible box on the tinted card in light mode. The asset needs a re-export with a transparent background.

Major

  • The Light and Dark "After" cells embed the same image, and screenshots-check.py keeps only distinct images (L278), so it finds 1 of the 2 it needs and the Before / After screenshots check will fail. A dark render (the icon on a dark card) would also have shown the white square above.
4 non-blocking recommendations
  1. Check the export against the design node — the PR describes "a blue eye in a circle", but the PNG has a blue eye shape with a white ring and no enclosing circle. Together with the flattened background, this looks like a different layer or frame was exported. (not verified against Figma)
  2. The case name — Icon_DashUI.swift L237 — every other case is the camel-cased raw-value suffix; case \public`is legal Swift and reads asDashIcon.SystemMessage.publicat call sites, so the keyword need not forcepublicVisibility`. (not compiled)
  3. Catch opaque icons in CI — conventions.sh and DashIconTests only check that the asset loads; a rule flagging icon PNGs whose alpha is 255 everywhere would have caught this.
  4. docs/foundation.md — L126 — the edited line runs to about 150 columns in a paragraph wrapped at about 85, and lists 2 of the 7 system-message icons before "…".
Review details

Trivial-tier asset PR: levels 1–3 inline; level 4 a general code review at high effort plus the UI checklist. The blocker was checked by decoding the PNGs' pixels (corner (255,255,255,255) here vs (0,0,0,0) in info-rect-small) and by drawing the 2x on black; the major against screenshots-check.py. CI was still running at review time.

🤖 Reviewed with Claude Code

…ic`, snapshot

- The icon is the design's eye (Figma node 2156:895) as a vector SVG with a
  transparent background; the opaque PNGs, which carried the page's white
  background, are gone. Stored like dialogue-warning (preserves vector,
  original rendering).
- The case is `public` (raw value system-message-public); conventions.sh
  now reads a case name in backticks, with a test.
- SystemMessageView gets a Public icon preview and snapshot test.
- docs/foundation.md names all seven system-message icons.
@romchornyi

Copy link
Copy Markdown
Collaborator Author

In cbb0157:

  • Major: a testPublicIcon snapshot (light and dark) and a Public icon preview for SystemMessageView; Before/After will use the two CI-rendered references.
  1. Checked against the design node: system_message-public (2156:895) is a blue eye with a see-through ring and no enclosing circle, so the PR text was wrong, not the glyph; the PR description is corrected.
  2. Fixed: the case is public; conventions.sh now reads a case name in backticks, with a test.
  3. Not changing this here: a rule for fully opaque icon PNGs is worth having but is its own change.
  4. Fixed: the foundation.md line names all seven system-message icons and is wrapped.

@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.

✅ Clean once CI renders the new references — the blocker and the major are closed · no blockers — re-reviewed at cbb0157e27

This replaces the verdict of the earlier "changes requested" review.

Level Verdict
1 · Idea ✅ valid unchanged
2 · Architecture ✅ right layer unchanged
3 · Completeness ✅ complete
4 · Code ✅ clean A transparent vector asset, a snapshot in SystemMessageView, a tested conventions.sh change

Closed since the last review

  • Blocker: opaque PNGs → system-message-public.svg has no background shape; the ring's two subpaths wind in opposite directions, so the default non-zero fill leaves the ring see-through, as the design node draws it. Stored like dialogue-warning (vector, original rendering).
  • Major: one image for both Before/After rows → testPublicIcon renders the icon inside SystemMessageView in light and dark, and the description will use those two references.
  • The glyph vs the design → confirmed against the node; the description was wrong, not the glyph, and it is corrected.
  • Case name → case \public`, with conventions.shreading names in backticks and two new cases inconventions-test.sh`.
  • docs/foundation.md → all seven system-message icons named, the paragraph re-wrapped.
  • The opaque-icon CI rule is left for a separate change, as the author said; it was a recommendation.

Before merging

The public-icon references are not in the branch yet and the description's images still point at eea52a444a (the same PNG twice), so Snapshot tests and Before / After screenshots will fail until the CI-rendered references are fetched with .github/scripts/fetch-snapshots.sh and linked in the description.

Review details

Re-review of eea52a444a..cbb0157e27 against the earlier findings and the author's replies. The SVG was read by hand (no background, winding of the ring), SystemMessageView draws the icon through Image(dash:) with no tint, and the conventions.sh regex change was checked against its new test cases. CI was still queued at review time.

🤖 Reviewed with Claude Code

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

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@romchornyi
romchornyi merged commit 41ff490 into master Nov 11, 2026
15 checks passed
@romchornyi
romchornyi deleted the feat/system-message-public-icon branch November 11, 2026 22:03
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