feat(icon): add iconShape (square/circle/none) for decorative icon tiles - #73
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 picksquare,circleornoneper instance or app-wide.Changes
@sdcorejs/angular/modules/icon: new typeSdIconShape = 'square' | 'circle' | 'none'.provideSdIcon({ defaultShape })sets the app default, andresolveSdIconConfigfills in'square'.iconShapeinput onsd-section,sd-informandsd-data-state.iconShapeoption onSdNotifyServicesuccess/info/warning/error.iconShapeoption on all sixSdConfirmServicemethods.nonedrops the background but keeps the tile size.data-icon-shape, and--sd-icon-shape-radiusoverrides the square radius.nonestays transparent in every tone and state. This covers the data-state error/forbidden/loading rules and the toast per-type rules.sd-*.mdfiles.CHANGELOG.md[Unreleased]has an Added entry and a Changed entry. The Changed entry says how to keep round tiles:provideSdIcon({ defaultShape: 'circle' }).npm run sync(v22 kept LF).icon-shape-optionare 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
73886e1with a clean tree, using Node 22.22.3. All exited 0.--code-coverage: 6200/6200.npm run lint -- sdcorejs-angular: clean.npm run build(v19 lib): OK.npm run test:showcase-examples: 17/17.npm run build: OK.npm run check:sync: v20, v21 and v22 match v19.CONVERGED(13 validation rows, 9 tasks), with a sealed receipt. The handoff check was accepted.nonetest fails.Visual checks were done in the local showcase (section, inform and data-state): square 8px, circle 50%, none transparent.
Risks and rollback
provideSdIcon({ defaultShape: 'circle' })restores the previous look.ISdIconResolvedConfigurationnow requiresdefaultShape. Hand-builtSD_ICON_CONFIGURATIONvalues must useresolveSdIconConfig(...); the docs and showcase already do.🤖 Generated with Claude Code