-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Bug 1302815 - Switch Firefox iOS to use list.json #3555
Conversation
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
364f478
to
ce8f298
Compare
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.
Looks good; some comments about testing.
// } | ||
// | ||
// Telemetry.default.add(pingBuilderType: CorePingBuilder.self) | ||
// Telemetry.default.add(pingBuilderType: MobileEventPingBuilder.self) |
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.
Ug.
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.
woops. My bad. This commit is so annoyingly large that I didnt see this 😢
} | ||
return possibilities |
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 code is cleaner than what went before, to be sure.
// These exceptions can go away when we drop iOS 8 or when we start using a better mechanism for search
// engine selection that is not based on language identifier.
What happens when we drop iOS8? What's in iOS9?
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.
Apple changed Locale Identifiers
|
||
// might not work to change the default. | ||
// if someone has added/removed an engine new engines or edits to the default engines might never be shown. |
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.
Can we test this?
// setup the list json | ||
let searchPrefs = DefaultSearchPrefs(with: Bundle.main.resourceURL!.appendingPathComponent("SearchPlugins").appendingPathComponent("list.json"))! | ||
|
||
// setup the most popular locales |
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.
How do we know we're not shipping broken XML files to Indonesia or India?
For that matter, how do we know we're not shipping broken list.json
? (smoke testing aside)
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.
The good thing about this setup vs the old one is. The XML files are all shared between countries. So if we test the global xml file in a test for en_CA then the XML file should also work in India.
As for List.json, Hopefully we arent merging patches to master without CI 😄
<Param name="tag" value="firefox-fr-21"/> | ||
<Param name="sourceid" value="Mozilla-search"/> | ||
</Url> | ||
<SearchForm>https://www.amazon.fr/</SearchForm> |
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.
Are these files actually changed, or are they simply mv
ed? Did you git mv
them?
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.
I picked up this patch from mkaply, according to him. These were just moved
ce8f298
to
24c0b25
Compare
This PR looks big but its mostly search metadata files being moved.
You can look at
DefaultSearchPrefs.swift
andSearchEngines.swift
for the code changes.