Repository navigation
[ios-685] Update old country picker screen - #1
Closed
rahuly-simform wants to merge 3 commits into
Closed
rahuly-simform wants to merge 3 commits into
rahuly-simform wants to merge 3 commits into
Conversation
rahuly-simform
requested review from
abhi-m-simformsolutons
and
a balanced review from Copilot
October 6, 2026 07:57
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Search state, row spacing, and the custom section index have functional and accessibility issues.
Review effort: Balanced
Findings: 6
Open (6)
Row spacing shrinks cells when row height is omitted · New Row spacing disappears with custom cell backgrounds · New Dismissed search controller leaves picker incorrectly filtered · New Custom index lacks VoiceOver section navigation · New Custom index overflows compact-height table frames · New Custom index bubble is invisible without explicit colors · New
What changed in this PR
Updates the iOS country picker’s presentation and customization.
Changes:
- Adds configurable row, header, footer, and section-index styling.
- Introduces external filtering and a custom section index.
- Dismisses the keyboard before presenting the picker.
| File | Description |
|---|---|
PhoneNumberKit/UI/PhoneNumberTextField.swift |
Ends editing before picker presentation. |
PhoneNumberKit/UI/CountryCodePickerViewController.swift |
Implements filtering and extensive picker UI customization. |
PhoneNumberKit/UI/CountryCodePickerOptions.swift |
Exposes the new styling options. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+140
to
+142
| if let rowHeight = options.rowHeight { | ||
| tableView.rowHeight = rowHeight + (options.rowSpacing ?? 0) | ||
| } |
| } | ||
|
|
||
| if let rowSpacing = options.rowSpacing, let cell = cell as? Cell { | ||
| cell.setRowSpacing(rowSpacing, color: options.backgroundColor) |
Comment on lines
346
to
348
| var isFiltering: Bool { | ||
| searchController.isActive && !isSearchBarEmpty | ||
| } | ||
|
|
||
| var isSearchBarEmpty: Bool { | ||
| searchController.searchBar.text?.isEmpty ?? true | ||
| !searchText.isEmpty | ||
| } |
Comment on lines
+456
to
+459
| let dragGesture = UILongPressGestureRecognizer(target: self, action: #selector(handleDrag)) | ||
| dragGesture.minimumPressDuration = 0 | ||
| dragGesture.delegate = self | ||
| addGestureRecognizer(dragGesture) |
Comment on lines
+469
to
+472
| NSLayoutConstraint.activate([ | ||
| stackView.topAnchor.constraint(equalTo: topAnchor), | ||
| stackView.bottomAnchor.constraint(equalTo: bottomAnchor), | ||
| stackView.centerXAnchor.constraint(equalTo: centerXAnchor) |
Comment on lines
+617
to
+619
| private func updateColors() { | ||
| shapeLayer.fillColor = options.sectionIndexBubbleBackgroundColor?.cgColor | ||
| layer.shadowColor = options.sectionIndexBubbleShadowColor?.cgColor |
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.

No description provided.