Closed tobiasKaminsky closed 1 year ago
A widget kind shares a common name and description and can only have one entry per size family (but obviously the user can add the same widget multiple times and have different configurations for each). I think it makes sense to use a Intent configuration here and only have 'one widget kind' available and the user can then select which app content they want it to display. Also, since most dashboard widgets have a similar web UI afaik, it should be a pretty uniform experience.
Android: https://developer.android.com/guide/topics/appwidgets
The dashboard API is briefly described there: https://docs.nextcloud.com/server/latest/developer_manual/digging_deeper/dashboard.html#dashboard-api-for-clients
This API is OCS-only, yes.
Basically you can't really get a list of all the widgets but only those who implement the IAPIWidget
interface.
In the API request, you can specify the date of the last entry you already got for each widget to make sure you get only new entries/items.
The result is a JSON object indexed by the widget ID and which contains lists of items. Each item is an object with those keys:
There is no way to get information on the widgets right now. We could add that to the API as separate endpoint which would return a list of enabled widgets and their attributes like the icon, title and id. Warning, the icon is actually just a class. It would require some changes to be able to provide the icon content or a link in such API endpoint.
Design-wise on mobile, it’s probably best if we use a tab bar for the different widgets, and then a simple list view below for the contents of the widget? (It seems though that Material Design 3 e.g. doesn’t have the tab bar anymore, but then we could do it via cards, so it looks like the Dashboard on web.)
For Desktop it’s probably best to integrate with native desktop widget mechanisms?
I assumed it will be one dashboard-entry per widget, so e.g. you then have a widget for Talk and one for activity. Upon adding this to homescreen user can select which dashboard-source should be used.
@PVince81 please schedule server side part, as written by Julien.
tech ticket raised here: https://github.com/nextcloud/server/issues/31322
Check
API
Mobile
[ ] Android https://github.com/nextcloud/android/issues/10629
[ ] iOS https://github.com/nextcloud/ios/issues/2122
[ ] Server https://github.com/nextcloud/server/issues/31322