Delete hand-rolled UI superseded by native SwiftUI APIs - #553
Merged
Merged
Conversation
Removes six view files and two `Color` members that reimplement SwiftUI
APIs the app already uses elsewhere. Every one has zero call sites
outside its own file, so this is deletion only — no behaviour change.
| Deleted | Superseded by |
| --- | --- |
| `SearchTextField.swift` | `.searchable`, already used at `VaultItemFeedView.swift:80` |
| `TextArea.swift` | `TextEditor`, already used in three places |
| `TextEditingView.swift` + `TextViewViewController.swift` | `TextEditor` |
| `OTPCodeLabels.swift` | the inline `labelsStack` copies that replaced it |
| `View+Center.swift` | `.frame(maxWidth:)` |
| `Color.contrastingForegroundColor` / `.contrastingBackgroudColor` | unreferenced |
`TextEditingView` carried a doc comment explaining it existed to dodge
"bugs we've experienced with raw SwiftUI text editors". That workaround
was never in service — `SecureNoteDetailView` and `BackupCreatePDFView`
both use a plain `TextEditor` — so nothing regresses by removing it.
`HorizontallyCenter` (`HStack { Spacer(); content; Spacer() }`) is
replaced at its nine call sites by `.frame(maxWidth: .infinity)`, which
centres its child at its ideal size the same way. Six of those sites are
buttons whose pill chrome is applied by an inner modifier, so the button
keeps its intrinsic size rather than stretching.
## Verification
Local, iPhone 18 Pro Max / iOS 27.0:
- `xcodebuild build-for-testing` — `TEST BUILD SUCCEEDED`, no warnings
(`-warnings-as-errors` is on package-wide)
- Full suite, `-parallel-testing-enabled NO` — `TEST EXECUTE SUCCEEDED`,
2834 passed, 0 failures (1417 tests across 12 bundles, run under both
the Default and TSAN configurations)
- **Zero snapshots re-recorded.** That is the check that matters here: if
any of these types had still been reachable, an image would have moved.
- `make format` + `make lint` — clean
⚠️ Automatic CI is still disabled (#548), so this is local verification only.
Co-Authored-By: Claude Opus 5 (1M context) <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.
Removes six view files and two
Colormembers that reimplement SwiftUIAPIs the app already uses elsewhere. Every one has zero call sites
outside its own file, so this is deletion only — no behaviour change.
SearchTextField.swift.searchable, already used atVaultItemFeedView.swift:80TextArea.swiftTextEditor, already used in three placesTextEditingView.swift+TextViewViewController.swiftTextEditorOTPCodeLabels.swiftlabelsStackcopies that replaced itView+Center.swift.frame(maxWidth:)Color.contrastingForegroundColor/.contrastingBackgroudColorTextEditingViewcarried a doc comment explaining it existed to dodge"bugs we've experienced with raw SwiftUI text editors". That workaround
was never in service —
SecureNoteDetailViewandBackupCreatePDFViewboth use a plain
TextEditor— so nothing regresses by removing it.HorizontallyCenter(HStack { Spacer(); content; Spacer() }) isreplaced at its nine call sites by
.frame(maxWidth: .infinity), whichcentres its child at its ideal size the same way. Six of those sites are
buttons whose pill chrome is applied by an inner modifier, so the button
keeps its intrinsic size rather than stretching.
Verification
Local, iPhone 18 Pro Max / iOS 27.0:
xcodebuild build-for-testing—TEST BUILD SUCCEEDED, no warnings(
-warnings-as-errorsis on package-wide)-parallel-testing-enabled NO—TEST EXECUTE SUCCEEDED,2834 passed, 0 failures (1417 tests across 12 bundles, run under both
the Default and TSAN configurations)
any of these types had still been reachable, an image would have moved.
make format+make lint— clean🤖 Generated with Claude Code