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

Support for favorites #1228

Open
PVince81 opened this issue Jul 9, 2020 · 14 comments
Open

Support for favorites #1228

PVince81 opened this issue Jul 9, 2020 · 14 comments
Labels
Category:Enhancement Add new functionality Category:Technical Technical ehancements Status:Housekeeping

Comments

@PVince81
Copy link
Contributor

PVince81 commented Jul 9, 2020

Add support for favorite APIs in ocis.

Currently in OCIS the favorites information is already stored in the storage arbitrary metadata.
We should also implement the Webdav API (I believe it was a REPORT endpoint) for retrieving all favorites across all storages. This will require implementing some lookup cache to avoid having to traverse all storage trees to find the favorites.

@butonic @pmaier1 FYI

@PVince81
Copy link
Contributor Author

PVince81 commented Jul 9, 2020

In #354 we'll add a capability, so we'll need to enable it once favorites are fully implemented.

  • implement REPORT API for populating the UI list under the "Favorites" section
  • enable capability
  • enable tests

@butonic butonic transferred this issue from owncloud/ocis-reva Jan 18, 2021
@refs refs added Type:Bug Category:Technical Technical ehancements labels Jan 18, 2021
@settings settings bot removed the p3-medium label Apr 7, 2021
@pascalwengerter
Copy link
Contributor

@individual-it can we close #724 and #1263 in favor of this issue (which provides the context of communicating favorites inside the capabilities)? We're hiding it on the frontend right now (based on capabilities) and I guess the tests for it are in expected failures?

@kulmann
Copy link
Member

kulmann commented Aug 26, 2021

In #354 we'll add a capability, so we'll need to enable it once favorites are fully implemented.

  • implement REPORT API for populating the UI list under the "Favorites" section
  • enable capability
  • enable tests

This still reflects the current state. I enabled the files.favorites capability in oCIS last week (locally). The following happens:

  • I can add and remove files to/from favorites, state gets persisted and loaded correctly (at least with oCIS storage driver)
  • the REPORT request for listing all favorites is not implemented, so the Favorites view doesn't work.

The list stated by Vincent is still valid. REPORT request for favorites needs to be implemented.

@pascalwengerter
Copy link
Contributor

@C0rby what's the current status here? :)

@butonic
Copy link
Member

butonic commented May 2, 2022

  • use search to provide lookup for favorites?
  • needs to add favorite to index
  • option 1: use a custom favorites manager
  • option 2: use events
    • hmm favorites would be a separate per user index, not a per space index because favorites cross space boundaries and the 'favorite flag' is per user ... not per file
  • option 3: add to expected failures for now

@individual-it
Copy link
Member

@micbar
Copy link
Contributor

micbar commented May 3, 2022

@butonic
Copy link
Member

butonic commented Jun 13, 2022

favorites REPORT was implemented in cs3org/reva#2086

  • add persistence layer other than in memory

@michl19 michl19 added Category:Enhancement Add new functionality and removed Type:Bug labels Jul 18, 2022
@diocas
Copy link

diocas commented Mar 9, 2023

This ticket is still open but I suppose the functionality has been provided so it could be closed?

But I just found out that there's a conflict between the REPORT used by the favorites and the REPORT used by the new search functionality... If web requests favorites, the backend fails with missing search-files tag.

Do you want me to open a new ticket or we follow here?

@micbar
Copy link
Contributor

micbar commented Mar 9, 2023

The REPORT for ocis is not yet implemented. In reva, we have the Favorites Manager. There are currently two implementations: cbox(mysql) and memory. For ocis we need a new persistent implementation.

@fschade FYI

@fschade
Copy link
Contributor

fschade commented Jun 4, 2024

Please open again if the ticket is still relevant

@fschade fschade closed this as completed Jun 4, 2024
@kulmann
Copy link
Member

kulmann commented Jun 4, 2024

Yes, still relevant. We want to have the favorites feature in oCIS. The web UI has everything we need already done from the oc10 implementation. The oCIS backend also already has everything we need (favorites state in file metadata, REPORT webdav request for listing favorites), but it only has an in memory implementation for storing the favorites index. The favorites index needs to be persisted.

@kulmann kulmann reopened this Jun 4, 2024
@fschade
Copy link
Contributor

fschade commented Jun 4, 2024

thanks, i add the housekeeping label for the moment, then we can discuss those older issues and plan hot to proceed.
SRY for closing, but we have to start somewhere :)

@saw-jan
Copy link
Member

saw-jan commented Aug 12, 2024

Currently when enabling favorites (FRONTEND_ENABLE_FAVORITES=true), then request returns 400 Bad Request

curl -XREPORT https://localhost:9200/remote.php/dav/files/admin
-d'<oc:filter-files xmlns:d="DAV:" xmlns:oc="http://owncloud.org/ns">
  <d:prop>
    <oc:permissions/>
    ...
  </d:prop>
  <oc:filter-rules>
    <oc:favorite>1</oc:favorite>
  </oc:filter-rules>
</oc:filter-files>'
-uadmin:admin -vk
400 Bad Request

<?xml version="1.0" encoding="UTF-8"?>
<d:error xmlns:d="DAV" xmlns:s="http://sabredav.org/ns">
	<s:exception>Sabre\DAV\Exception\BadRequest</s:exception>
	<s:message>missing search-files tag</s:message>
</d:error>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category:Enhancement Add new functionality Category:Technical Technical ehancements Status:Housekeeping
Projects
None yet
Development

No branches or pull requests