Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Search functionality #116

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Search functionality #116

wants to merge 5 commits into from

Conversation

tevelee
Copy link

@tevelee tevelee commented Jan 15, 2017

Introduction

The following changes introduce a basic search functionality in the tweaks UI as proposed in issue #115. Tweaks are searchable using a single search query on the category- and the collection lists as well.

Features

  • Tweaks can be filtered using a simple text query
  • Search is available on the top of the categories and collections lists as well
  • Searching filters the list of tweaks using case- and diactric insensitive match
  • The filtered list keeps the tweak hierarchy using sections
  • The search gets highlighted in the matching rows

Technical considerations for the reviewer

  • The list of changes are compatible with the supported minimum (iOS 6) APIs
  • In order to reduce code duplication and improve maintainability I introduced a helper class which is accessible from both view controllers. Its two methods handle model filtering and tweak selection as those are needed in both ViewControllers.
  • Since tweaks nor categories or collections support NSCopying, during the filtering I needed to create new collections (which are not part of the tweak store), and build a new list of these collections for the filtered list. This makes some FBTweaks be part of two collections at once.

Enhancements to consider

  • Fuzzy search
  • Introducing multiple search scopes (Searching on the categories list can filter only the visible list itself - as category scope - or filter the whole tweak repository - as a full scope - as it is currently implemented)
  • Search bar could be hidden by default so a pull-down gesture could reveal it
  • Reduce code duplication even more by moving cell creation into the helper utility class

@tevelee
Copy link
Author

tevelee commented Feb 13, 2017

Hi @grp @sgl0v @johntmcintosh @callumboddy,

Can somebody please review this feature?
Many thanks!

@tevelee
Copy link
Author

tevelee commented Feb 25, 2018

I believe this PR is still valid. Can somebody take a look, please?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants