Sitelet https://github.com/sdcorejs/sdcorejs-angular/pull/73
Skip to content

feat(icon): add iconShape (square/circle/none) for decorative icon tiles - #73

Merged
sdcorejs merged 2 commits into
mainfrom
claude/icon-corner-radius-4e6167
Oct 2, 2026
Merged

sdcorejs merged 2 commits into
mainfrom
claude/icon-corner-radius-4e6167

Conversation

@sdcorejs

@sdcorejs sdcorejs commented Oct 1, 2026

Copy link
Copy Markdown
Owner

Summary

The decorative icon tile of <sd-section> (header), <sd-inform>, <sd-data-state>, notify toasts and confirm dialogs is now a square with an 8px radius instead of a circle. Consumers can pick square, circle or none per instance or app-wide.

Changes

  • @sdcorejs/angular/modules/icon: new type SdIconShape = 'square' | 'circle' | 'none'. provideSdIcon({ defaultShape }) sets the app default, and resolveSdIconConfig fills in 'square'.
  • Instance option (wins over the app default):
    • iconShape input on sd-section, sd-inform and sd-data-state.
    • iconShape option on SdNotifyService success/info/warning/error.
    • iconShape option on all six SdConfirmService methods.
  • Rendering:
    • none drops the background but keeps the tile size.
    • Each tile carries data-icon-shape, and --sd-icon-shape-radius overrides the square radius.
    • The shape rules come after the tone/state rules and have matching specificity, so none stays transparent in every tone and state. This covers the data-state error/forbidden/loading rules and the toast per-type rules.
    • The inform tip variant stays flat.
  • Docs:
    • Updated the six sd-*.md files.
    • CHANGELOG.md [Unreleased] has an Added entry and a Changed entry. The Changed entry says how to keep round tiles: provideSdIcon({ defaultShape: 'circle' }).
  • Showcase: an "Icon shape" section on the section, inform, data-state, notify and confirm pages. The generated example sources/manifest and the demo-count registry/specs are updated to match.
  • Rollout: v20/v21/v22 were derived with npm run sync (v22 kept LF).
  • Workflow artifacts: spec, architecture (r2) and plan (r4) snapshots for contract icon-shape-option are under .sdcorejs/.

Not touched: sd-button, avatars, dots, spinners, stepper, close/clear/remove buttons, file-explorer, home page, autoid-inspector.

Verification

Every command below was run on commit 73886e1 with a clean tree, using Node 22.22.3. All exited 0.

  • Karma (focused, v19):
    • icon: 11/11
    • section: 57/57
    • inform: 69/69
    • data-state: 30/30
    • notify: 89/89
    • confirm: 75/75
    • all five shape-geometry suites together: 320/320
  • Karma full suite, v19, --code-coverage: 6200/6200.
  • npm run lint -- sdcorejs-angular: clean.
  • npm run build (v19 lib): OK.
  • Showcase:
    • npm run test:showcase-examples: 17/17.
    • Registry and data-state-demo specs: 9/9.
    • npm run build: OK.
    • Before the commit, the full showcase suite also passed (209/209).
  • npm run check:sync: v20, v21 and v22 match v19.
  • Automated scope and grep checks:
    • All 165 changed paths are inside the approved write scope.
    • The docs and CHANGELOG mention the new option.
    • No consumer hardcodes a shape fallback.
    • No CRLF in the v22 index.
  • sdcorejs convergence (feature mode): CONVERGED (13 validation rows, 9 tasks), with a sealed receipt. The handoff check was accepted.
  • One spec was mutation-checked: with the data-state specificity rule removed, the none test fails.

Visual checks were done in the local showcase (section, inform and data-state): square 8px, circle 50%, none transparent.

Risks and rollback

  • Visible default change: every consumer sees square tiles after upgrading. provideSdIcon({ defaultShape: 'circle' }) restores the previous look.
  • ISdIconResolvedConfiguration now requires defaultShape. Hand-built SD_ICON_CONFIGURATION values must use resolveSdIconConfig(...); the docs and showcase already do.
  • Rollback: revert this commit. No data, dependency or migration changes.

🤖 Generated with Claude Code

nghiatt15 and others added 2 commits October 1, 2026 23:20
The decorative icon tile of sd-section (header), sd-inform, sd-data-state,
notify toasts and confirm dialogs is now a square with an 8px radius instead
of a circle, and can be chosen per instance or app-wide:

- New type SdIconShape = 'square' | 'circle' | 'none' in
  @sdcorejs/angular/modules/icon; provideSdIcon({ defaultShape }) sets the
  app default (resolveSdIconConfig fills 'square').
- iconShape input on sd-section, sd-inform and sd-data-state; iconShape
  option on SdNotifyService success/info/warning/error and on all six
  SdConfirmService methods. The instance value wins over the app default.
- 'none' drops the background but keeps the tile size. Each tile carries
  data-icon-shape; --sd-icon-shape-radius overrides the square radius.
  Shape rules sit after the tone/state rules with matching specificity so
  'none' stays transparent in every tone and state. The inform tip variant
  stays flat.
- Docs for the six entries, CHANGELOG [Unreleased] (Added + Changed, with
  provideSdIcon({ defaultShape: 'circle' }) to keep round tiles), an
  "Icon shape" showcase section on five pages, and v20/v21/v22 rolled out
  with npm run sync.

Spec, architecture (r2) and plan (r4) snapshots for contract
icon-shape-option are included under .sdcorejs/.

Verification: re-run on this commit before the PR (Karma focused + full
suite with coverage, lint, lib and showcase build/tests, check:sync).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in #72 (table field reads, @sdcorejs/utils 1.2.5). The only
conflicts were the "Updated At" timestamps in versions/v*/SYNC-STATUS.md;
kept this branch's side. npm run sync on the merged tree produced no
content change, and npm run check:sync passes.

Verification: npm ci (v19); Karma icon, section, inform, data-state,
notify, confirm, image-editor and table specs 1128/1128.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sdcorejs
sdcorejs merged commit 445d18a into main Oct 2, 2026
6 checks passed
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