Repository navigation
refactor: replace the last foregroundColor, cornerRadius and overlay(_:alignment:) calls - #95
Merged
romchornyi merged 2 commits intoDec 4, 2026
Conversation
…_:alignment:) calls foregroundStyle, clipShape(.rect(cornerRadius:style: .circular)) and the content-closure overlay, with the same look. Closes dashpay#28. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
romchornyi
approved these changes
Dec 4, 2026
romchornyi
left a comment
Collaborator
There was a problem hiding this comment.
✅ No blockers, nothing open — reviewed at d7ea13a83c
| Level | Verdict | |
|---|---|---|
| 1 · Idea | ✅ valid | The last deprecated calls #28 counted. |
| 2 · Architecture | ✅ right layer | A mechanical swap to the current API at the same sites. |
| 3 · Completeness | ✅ complete | At this head Sources/ has no .foregroundColor(, .cornerRadius( or .overlay(_:alignment:) call left (DashButton.Style.foregroundColor(isEnabled:) is the library's own method), and README.md and docs/ have none either. |
| 4 · Code | ✅ clean | .clipShape(.rect(cornerRadius:style: .circular)) keeps the corner .cornerRadius drew, so the snapshots stay as they are; none of the replaced foregroundColor calls sits in a Text concatenation. |
🤖 Reviewed with Claude Code
clipShape(.rect(cornerRadius:)) caps the radius at half the height, so the switch track's ends are half circles; cornerRadius(1000) flattened them. The bottom sheet grabber differs only in anti-aliasing. References from CI run 47328651003. Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Issue being fixed or feature implemented
Closes #28.
Most of the deprecated calls the issue counted were already replaced by later PRs. What was left on
master:.foregroundColor(_:)BottomSheettitle and grabber)BottomSheetpreviews).cornerRadius(_:)BottomSheetgrabber,SwitchViewtrack)ScrollViewWithOnScrollChanged).overlay(_:alignment:)ScrollViewWithOnScrollChanged)What was done?
.foregroundColor(x)→.foregroundStyle(Color.x)..cornerRadius(r)→.clipShape(.rect(cornerRadius: r, style: .circular)), keeping the non-continuous corner. One visible change follows: the switch track sets a radius of 1000 to mean a capsule..cornerRadius(1000)drew its ends slightly flattened, while.rect(cornerRadius:)caps the radius at half the height, so the ends are now half circles, like a systemToggle. The bottom sheet grabber differs only in anti-aliasing (at most 6/255 on its edge pixels)..overlay(Text(…))→.overlay { Text(…) }.Sources/now has no call to any of the three. None of the replacedforegroundColorcalls sat in aTextconcatenation.How Has This Been Tested?
Sources/;conventions.sh.MenuItem's switch accessory and the darkBottomSheetheaders are re-recorded from the CI run, after comparing them pixel by pixel with the old ones: the switch ends and the grabber's edge pixels are the only differences.Before / After
The switch states (on, off, disabled on, disabled off), from the snapshot references.
Breaking Changes
None in the API. The switch track's ends are half circles instead of slightly flattened.
Checklist:
🤖 Generated with Claude Code