Skip to content
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

[feature/server-side-search] Add server-side search support #1419

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

Conversation

felix-schwarz
Copy link
Contributor

@felix-schwarz felix-schwarz commented Nov 2, 2024

Description

This PR adds server-side search support to the app.

TODO

  • add search scope backed by OCSearchResult
  • improve error and result handling in OCSearchResult
  • add KQL syntax generator to OCQueryCondition (similar to the SQL syntax generator)
  • handle offline state
  • possibly integrate/merge with account-wide search

Related Issue

SDK part: owncloud/ios-sdk#129

Screenshots (if appropriate):

Name only Contents only
Simulator Screenshot - iPhone 16 Pro Max - 2024-11-23 at 23 14 51 Simulator Screenshot - iPhone 16 Pro Max - 2024-11-23 at 23 14 56
Name/Contents choice popup Image files not containing ownCloud
Simulator Screenshot - iPhone 16 Pro Max - 2024-11-23 at 23 15 04 Simulator Screenshot - iPhone 16 Pro Max - 2024-11-23 at 23 16 05
Search Settings Without connection
Simulator Screenshot - iPhone 16 Pro Max - 2024-11-29 at 17 10 13 Bildschirmfoto 2024-11-30 um 16 23 45

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

- ProgressSummarizer: add support for new OCEventType .search
@felix-schwarz felix-schwarz self-assigned this Nov 2, 2024
@CLAassistant
Copy link

CLAassistant commented Nov 2, 2024

CLA assistant check
All committers have signed the CLA.

	- add CollectionViewCellStyle.showPathDetails property
	- add CollectionViewCellStyle.StyleOptionKey.showPathDetails
- OCItem+UniversalItemListCellContentProvider: add support for CollectionViewCellStyle.showPathDetails
- ServerSideSearchScope: add server-side search scope
- SearchScope: add convenience method to instantiate ServerSideSearchScope
- ClientItemViewController: add server-side search scope
@felix-schwarz felix-schwarz force-pushed the feature/server-side-search branch from 0843194 to 8ee4643 Compare November 7, 2024 21:17
felix-schwarz and others added 13 commits November 23, 2024 21:22
	- "fix" keyword "spreadsheet" translation by matching the type alias rather than matching its start
	- add keyword "archive" translating into the "x-office/presentation" type alias
- SearchScope: add support for specifying the searchable content and controlling the content to search (itemName, file contents)
- ItemSearchScope: add subclassing point for creation of ItemSearchSuggestionsViewController()
- ServerSideSearchScope:
	- make subclass of ItemSearchScope to simplify implementation
	- add support for OCKQLSearchedContent, allowing to select whether to search item name, content - or both
	- create adapted version of ItemSearchSuggestionsViewController() to omit size search suggestions (support in server unclear at the moment, waiting for clarification)
- ItemSearchSuggestionsViewController:
	- allow excluding suggestion categories
	- add support for OCKQLSearchedContent (SearchScope.supportedSearchedContent + .searchedContent), including a toggle
…le with popup to allow searching terms only in names, only in contents - or name + content

- ServerSideSearchScope: restore special cell style to also include path details
…ntiate them

- SearchScope:
	- add new class property "descriptor" to allow each scope to return its own descriptor
	- subclasses: refactor to add "descriptor" implementations, encapsulating everything into its SearchScopeDescriptor that's needed to use each scope respectively, allowing to integrate a search scope with the rest of the app with a single line in SearchScopeDescriptor.all
-SearchScope+Registry: extend SearchScope with:
	- a method to access available scopes based on context and cell style
	- a concept to allow users to pick a default scope and SearchedContent
- ClientViewController: make use of the SearchScope.availableScopes() based on SearchScopeDescriptor.all
…Search Settings

- SearchScope: add SearchScope.Identifier type
- SearchScopeDescriptor:
	- change identifier type to SearchScope.Identifier
	- change access rights
	- change .title to .localizedName
	- add .localizedDescription
- SearchScope+Registry: add class settings support, making a default scope configurable by MDM or through the user
- ClientItemViewController, SearchViewController: add support for default scope
- StaticTableViewRow: add icon support to multiple choice rows
- update CONFIGURATION.json
… message that server-side search is not available if there's no connection, advise to use Account scope instead then
	- check if server-side search and content-search are supported - and appear only then
	- resume/resend search requests if the connection comes (back) online
- update ios-sdk for more extensive server-side search capability information
…t - or name+content) and reuse it next time the scope is invoked, default to name+content
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants