Closed Bug 1299535 Opened 9 years ago Closed 9 years ago

Add the ability to add custom search engines via url from the settings

Categories

(Firefox for iOS :: General, defect)

Other
iOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: farhan, Assigned: thePsguy, Mentored)

References

Details

(Whiteboard: [good-first-bug])

Attachments

(3 files, 3 obsolete files)

Attached image Screenshot 2016-08-31 09.39.21.png (obsolete) —
The current custom search engine adder in iOS is limited to fields with forms using GET requests. To support more search engines allow users to add search engines via url strings. I've added mocks of where this design should exist in the settings.
Attached image Screenshot 2016-08-31 09.39.14.png (obsolete) —
Hi, can I take this one?
Hi Nikolay, I'd love for you to work on this bug. This is my most wanted feature. I wish I had the time to work on it but sadly I'm too busy with other stuff. I'd love if you'd take it on and finally get this done! To assign a bug to yourself, you need to click the "take" link next to the "Assigned to" section. And then press save. This lets everyone else know that you are working on this feature and avoids cases of two people working on the same thing. As for where to start, The screenshots should be helpful and should give you a good starting place. The current search settings code is here https://github.com/mozilla/firefox-ios/blob/f8b7729d0446214dfae32a67fd0615cf200336a4/Client/Frontend/Settings/SearchSettingsTableViewController.swift If you need any help feel free to reach out to me on IRC. I'm in the #mobile channel -> @farhan
Hey Farhan, Looks like no one has been working on this issue yet. I would love to take it up, but for some reason I see no `take` link anywhere near `Assigned To: Nobody; OK to take it and work on it`. Also to begin with adding the 'Add Custom Search Engine' row, should I add another option to model.orderedEngines itself and handle it in an else? Or should I add an `else if indexPath.item < model.orderedEngines.count - 1{` condition for the Quick-Search engines, with the 'Add Custom Search Engine' option handled in an `else` in the UITableViewDataSource methods in the SearchSettingsTableViewController? I would really appreciate opinions on how I should move forward with this. Regards, Pushkar
Flags: needinfo?(fpatel)
Hi Pushkar! I know the screenshot doesn't suggest this but I'd recommend you make a separate section with only the "Add custom engine button" Also add a title to the section similar to the 2 existing sections. Something like "Custom Search engines" Then in that section you'll have one item called "Add Custom Search engine" In the cellforRowAtIndexPath you'd do something like else if indexPath.section == CustomEngineSection look at how the "SectionDefault" is done for an idea. Also if you are up for it. I'd love if you could refactor the cellforRowAtIndexPath function. Having a large and growing if statement like that make for messy code haha. in that section you'd create your cell that links to the new form that lets you add a new search engine. If you are more comfortable with having me follow along send me a link on IRC to your branch (@farhan) and you can ping me as you work on it for help :) I'd recommend first writing the additions to SearchSettingsTableView before writing the new CustomSearchAddController. If you are up for it. Let me know and I can assign this bug to you.
Flags: needinfo?(fpatel)
Hey Farhan, Of course I'm up for it. And yep, a separate section makes sense. I'll see what can be done about refactoring it too. I'll begin work on the SearchSettingsTableViewController in a while, and will send you the link to my branch once I do.
Assignee: nobody → thePsguy
Attached image Settings - Search@2x.png (obsolete) —
Here's the latest Mockup of the Search Settings Page.
Attachment #8786796 - Attachment is obsolete: true
Latest mock for the add form.
Attachment #8786794 - Attachment is obsolete: true
Attachment #8819051 - Attachment description: Settings - Search - Add@2x.png → Settings - Search - Add.png
Attachment #8819051 - Attachment filename: Settings - Search - Add@2x.png → Settings - Search - Add.png
Attached image Settings - Search.png
Search Settings Mockup
Attachment #8819049 - Attachment is obsolete: true
here are some helpful measurements needed to implement the mock-ups
master https://github.com/mozilla-mobile/firefox-ios/commit/c4bccd6fc3e90decc7e6e900d6aca227740d5d4f Thank you for all your work Pushkar! I can't wait to use this.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Depends on: 1334689
I suspect bug 1334689 is a crash triggered with this recently added code.
Depends on: 1334997
Depends on: 1335002
Depends on: 1334995
This feature it's not behind a feature flag. Are you planning to ship it in 7.0? Please note that there are still a few bugs open, one of them being a crash which is fairly easy to reproduce.
Flags: needinfo?(sleroux)
I think having it ship in beta is fine for now but we should make it a priority to add a feature flag to put this behind so we can turn it off if we don't feel comfortable shipping it in release.
Flags: needinfo?(sleroux)
See Also: → 1343860
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: