-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix sorting in Domain Selection screen #24631
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
} else { | ||
// If neither rhs nor lhs ara a match then sort alphabetically | ||
return lhs.domainName.caseInsensitiveCompare(rhs.domainName) == .orderedAscending | ||
completion(Result.failure(error)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RCA:
- Server returns results already sorted by relevance. If the query is specific enough, it might start returning low-relevance domains with dashes at the bottom of the response:
{
"domain_name": "buy-a-simple-domain.casa",
"relevance": 0.32,
- The spring incorrectly sorts the domains with dashes earlier than the same domains without them.
The app doesn't need the extra sorting as the default relevance-based sorting is done by the server and matches the web.
@@ -64,20 +62,6 @@ final class DomainSelectionViewController: CollapsableHeaderViewController { | |||
table.reloadData() | |||
} | |||
} | |||
private var _hasExactMatch: Bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was unused.
|
App Name | Jetpack | |
Configuration | Release-Alpha | |
Build Number | 28017 | |
Version | PR #24631 | |
Bundle ID | com.jetpack.alpha | |
Commit | bb29b06 | |
Installation URL | 0luu1n413gamo |
|
App Name | WordPress | |
Configuration | Release-Alpha | |
Build Number | 28017 | |
Version | PR #24631 | |
Bundle ID | org.wordpress.alpha | |
Commit | bb29b06 | |
Installation URL | 20jsp0e2sedl0 |
|
Fixes https://linear.app/a8c/issue/CMM-535/sometimes-domains-are-displayed-with-dashes