Skip to content

Commit

Permalink
[feature/better-sidebar] Improved sidebar with account-wide search (#…
Browse files Browse the repository at this point in the history
…1320)

* - update SDK to include OCItem.removed tracking fixes
- AccountControllerSearchViewController: new view controller for global search that's accessible from a new top-level sidebar item
- AppDelegate, CreateDocumentAction, OpenInWebAction: register settings for OpenInWeb and CreateDocument so they turn up in the auto-generated MDM docs
- OCSavedSearch: add support for copying
- AccountController.Configuration: remove showQuickAccess and add new variables for new top-level items
- SavedSearchCell: add support for new side button that allows setting an action (used for "Add to sidebar")
- OCSavedSearch+Interactions: add support for new "Quick Access" search suggestions in AccountControllerSearchViewController
- SearchViewController: allow customizing whether cancel buttons are shown or navigation buttons should be hidden
- ClientItemViewController: refactor search suggestions list to allow expansion/modification by subclasses

* - update SDK to include version tracking change for KVO data source
- OCSavedSearch: add uuid and name to .dataItemVersion
- OCVault+SavedSearches: add method updateSavedSearch for updating existing saved searches (f.ex. with a different name)
- AccountController:
	- rename searchesFolder to globalSearch to signal the new position in the sidebar
	- present saved searches directly in the top level of the sidebar
	- add useFolderForSearches var to allow switching between a flat or folder-based presentation of saved searches in the sidebar	- cleanup code
- AccountControllerSearchViewController: remove added quick access searches from quick access list, remove entire Quick Access section if all quick access searches were added
- SavedSearchCell: use gear-badged folder instead of gear icon for saved searches in the sidebar
- CollectionViewController: preserve selection after non-animated snapshot updates
- OCSavedSearch+Interactions: add "Rename" action to saved search context menu
- ClientItemViewController: fix warning

* - update SDK to fix table creation issue

* - update SDK
- ShareExtensionViewController: auto-open first account if only one account has been created
- OCSidebarItem: new class encapsulating custom user sidebar items, conforming to OCDataItem and OCDataItemVersioning
- OCVault+SidebarItems: add user side bar item management
- AccountController:
	- add saved searches and user sidebar items to configuration
	- add user sidebar items integration
- BrowserNavigationBookmark+AccountController: add support for sidebar items, refine representationSideBarItemRefs to return more (fallback) references
- Action: fix comment an identifier typos
- CollectionViewController:
	- add new method for retrieving the most specific client context for an index path
	- use new method to provide correct client context for allowDropOperation and performDropOperation
- OCLocation+Interactions: add new method for customized access to .openItem()
- OCSidebarItem+Cell: adds a cell provider for custom user sidebar items
- OCSidebarItem+Interactions: selection, swipe, context menu, drop and navigation restore support for OCSidebarItems
- BrowserNavigationBookmark: add sidebarItem property, including archiving/unarchiving

* - CollectionViewController/CollectionViewSection: add ability to add a per-section item for section fallback drop interaction handling

* - AddToSidebarAction:
	- only show action if item hasn't already been added to the sidebar
	- add custom icon with plus badge
- RemoveFromSidebarAction:
	- new action
	- only show action if item has already been added to the sidebar
	- add custom icon with minus badge

---------

Co-authored-by: felix-schwarz <[email protected]>
  • Loading branch information
felix-schwarz and felix-schwarz authored Apr 11, 2024
1 parent 221fa07 commit f387e8b
Show file tree
Hide file tree
Showing 41 changed files with 1,772 additions and 294 deletions.
80 changes: 80 additions & 0 deletions doc/CONFIGURATION.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@
"description" : "Delete",
"value" : "com.owncloud.action.delete"
},
{
"description" : "Close Window",
"value" : "com.owncloud.action.discardscene"
},
{
"description" : "Duplicate",
"value" : "com.owncloud.action.duplicate"
Expand All @@ -65,6 +69,10 @@
"description" : "Open in",
"value" : "com.owncloud.action.openin"
},
{
"description" : "Open in a new Window",
"value" : "com.owncloud.action.openscene"
},
{
"description" : "Go to page",
"value" : "com.owncloud.action.pdfpage"
Expand Down Expand Up @@ -175,6 +183,10 @@
"description" : "Delete",
"value" : "com.owncloud.action.delete"
},
{
"description" : "Close Window",
"value" : "com.owncloud.action.discardscene"
},
{
"description" : "Duplicate",
"value" : "com.owncloud.action.duplicate"
Expand All @@ -199,6 +211,10 @@
"description" : "Open in",
"value" : "com.owncloud.action.openin"
},
{
"description" : "Open in a new Window",
"value" : "com.owncloud.action.openscene"
},
{
"description" : "Go to page",
"value" : "com.owncloud.action.pdfpage"
Expand Down Expand Up @@ -298,6 +314,38 @@
"status" : "advanced",
"type" : "stringArray"
},
{
"autoExpansion" : "none",
"category" : "Actions",
"categoryTag" : "actions",
"classIdentifier" : "action",
"className" : "ownCloudAppShared.Action",
"defaultValue" : "auto",
"description" : "Determines how to open a document in a web app.",
"flatIdentifier" : "action.open-in-web-app-mode",
"key" : "open-in-web-app-mode",
"label" : "Open In WebApp mode",
"possibleValues" : [
{
"description" : "Open using `in-app-with-default-browser-option`, unless the respective endpoint is not available - in which case `default-browser` is used instead. If no endpoint to open the document is available, an error message is shown.",
"value" : "auto"
},
{
"description" : "Open in default browser app. May require user to sign in.",
"value" : "default-browser"
},
{
"description" : "Open inline in an in-app browser.",
"value" : "in-app"
},
{
"description" : "Open inline in an in-app browser, but provide a button to open the document in the default browser (may require the user to sign in).",
"value" : "in-app-with-default-browser-option"
}
],
"status" : "advanced",
"type" : "string"
},
{
"autoExpansion" : "none",
"category" : "App",
Expand Down Expand Up @@ -1701,6 +1749,10 @@
"description" : "Extension with the identifier com.owncloud.action.delete.",
"value" : "com.owncloud.action.delete"
},
{
"description" : "Extension with the identifier com.owncloud.action.discardscene.",
"value" : "com.owncloud.action.discardscene"
},
{
"description" : "Extension with the identifier com.owncloud.action.duplicate.",
"value" : "com.owncloud.action.duplicate"
Expand Down Expand Up @@ -1729,6 +1781,10 @@
"description" : "Extension with the identifier com.owncloud.action.openin.",
"value" : "com.owncloud.action.openin"
},
{
"description" : "Extension with the identifier com.owncloud.action.openscene.",
"value" : "com.owncloud.action.openscene"
},
{
"description" : "Extension with the identifier com.owncloud.action.pdfpage.",
"value" : "com.owncloud.action.pdfpage"
Expand Down Expand Up @@ -1929,6 +1985,30 @@
"status" : "debugOnly",
"type" : "stringArray"
},
{
"autoExpansion" : "none",
"category" : "Connection",
"categoryTag" : "connection",
"classIdentifier" : "http",
"className" : "OCHTTPPipeline",
"defaultValue" : "json",
"description" : "If request and response logging is enabled, the format to use.",
"flatIdentifier" : "http.traffic-log-format",
"key" : "traffic-log-format",
"label" : "http.traffic-log-format",
"possibleValues" : [
{
"description" : "JSON",
"value" : "json"
},
{
"description" : "Plain text",
"value" : "plain"
}
],
"status" : "supported",
"type" : "string"
},
{
"autoExpansion" : "none",
"category" : "Connection",
Expand Down
62 changes: 62 additions & 0 deletions doc/configuration.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ tag::actions[]
! `com.owncloud.action.delete`
! Delete

! `com.owncloud.action.discardscene`
! Close Window

! `com.owncloud.action.duplicate`
! Duplicate

Expand All @@ -56,6 +59,9 @@ tag::actions[]
! `com.owncloud.action.openin`
! Open in

! `com.owncloud.action.openscene`
! Open in a new Window

! `com.owncloud.action.pdfpage`
! Go to page

Expand Down Expand Up @@ -139,6 +145,9 @@ action.create-document-mode
! `com.owncloud.action.delete`
! Delete

! `com.owncloud.action.discardscene`
! Close Window

! `com.owncloud.action.duplicate`
! Duplicate

Expand All @@ -157,6 +166,9 @@ action.create-document-mode
! `com.owncloud.action.openin`
! Open in

! `com.owncloud.action.openscene`
! Open in a new Window

! `com.owncloud.action.pdfpage`
! Go to page

Expand Down Expand Up @@ -233,6 +245,32 @@ action.create-document-mode

|advanced `candidate`

|**Open In WebApp mode** +
+
action.open-in-web-app-mode
|string
|`auto`
|Determines how to open a document in a web app.
[cols="1,1"]
!===
! Value
! Description
! `auto`
! Open using `in-app-with-default-browser-option`, unless the respective endpoint is not available - in which case `default-browser` is used instead. If no endpoint to open the document is available, an error message is shown.

! `default-browser`
! Open in default browser app. May require user to sign in.

! `in-app`
! Open inline in an in-app browser.

! `in-app-with-default-browser-option`
! Open inline in an in-app browser, but provide a button to open the document in the default browser (may require the user to sign in).

!===

|advanced `candidate`

|===
end::actions[]

Expand Down Expand Up @@ -713,6 +751,24 @@ tag::connection[]
|Enable or disable per-process, in-memory cookie storage.
|supported `candidate`

|http.traffic-log-format
|string
|`json`
|If request and response logging is enabled, the format to use.
[cols="1,1"]
!===
! Value
! Description
! `json`
! JSON

! `plain`
! Plain text

!===

|supported `candidate`

|http.user-agent
|string
|`ownCloudApp/{{app.version}} ({{app.part}}/{{app.build}}; {{os.name}}/{{os.version}}; {{device.model}})`
Expand Down Expand Up @@ -1045,6 +1101,9 @@ tag::extensions[]
! `com.owncloud.action.delete`
! Extension with the identifier com.owncloud.action.delete.

! `com.owncloud.action.discardscene`
! Extension with the identifier com.owncloud.action.discardscene.

! `com.owncloud.action.duplicate`
! Extension with the identifier com.owncloud.action.duplicate.

Expand All @@ -1066,6 +1125,9 @@ tag::extensions[]
! `com.owncloud.action.openin`
! Extension with the identifier com.owncloud.action.openin.

! `com.owncloud.action.openscene`
! Extension with the identifier com.owncloud.action.openscene.

! `com.owncloud.action.pdfpage`
! Extension with the identifier com.owncloud.action.pdfpage.

Expand Down
2 changes: 1 addition & 1 deletion ios-sdk
Submodule ios-sdk updated 28 files
+84 βˆ’0 ownCloudSDK.xcodeproj/project.pbxproj
+10 βˆ’0 ownCloudSDK/Connection/Capabilities/OCCapabilities.h
+59 βˆ’0 ownCloudSDK/Connection/Capabilities/OCCapabilities.m
+7 βˆ’0 ownCloudSDK/Data Sources/Sources/Array Backed/OCDataSourceArray.m
+2 βˆ’0 ownCloudSDK/Data Sources/Sources/KVO Backed/OCDataSourceKVO.m
+31 βˆ’0 ownCloudSDK/Password Policy/OCCapabilities+PasswordPolicy.h
+79 βˆ’0 ownCloudSDK/Password Policy/OCCapabilities+PasswordPolicy.m
+29 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy+Default.h
+38 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy+Default.m
+29 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy+Generator.h
+212 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy+Generator.m
+35 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy.h
+48 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicy.m
+37 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyReport.h
+65 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyReport.m
+34 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRule+StandardRules.h
+80 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRule+StandardRules.m
+33 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRule.h
+38 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRule.m
+34 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRuleByteLength.h
+93 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRuleByteLength.m
+39 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRuleCharacters.h
+148 βˆ’0 ownCloudSDK/Password Policy/OCPasswordPolicyRuleCharacters.m
+24 βˆ’0 ownCloudSDK/Resources/de.lproj/Localizable.strings
+24 βˆ’0 ownCloudSDK/Resources/en.lproj/Localizable.strings
+1 βˆ’1 ownCloudSDK/Vaults/Database/OCDatabase+Schemas.m
+10 βˆ’0 ownCloudSDK/ownCloudSDK.h
+396 βˆ’0 ownCloudSDKTests/PasswordPolicyTests.m
7 changes: 7 additions & 0 deletions ownCloud Share Extension/ShareExtensionViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,13 @@ class ShareExtensionViewController: EmbeddingViewController, Themeable {
// Show location picker
showLocationPicker()
}

// Log in to first account if there's only one
let bookmarks = OCBookmarkManager.shared.bookmarks

if bookmarks.count == 1, let onlyBookmark = bookmarks.first {
AccountConnectionPool.shared.connection(for: onlyBookmark)?.connect()
}
}
}

Expand Down
Loading

0 comments on commit f387e8b

Please sign in to comment.