You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developer_manual/app_publishing_maintenance/app_upgrade_guide/upgrade_to_33.rst
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,38 @@ Upgrade to Nextcloud 33
5
5
Front-end changes
6
6
-----------------
7
7
8
+
Files API
9
+
^^^^^^^^^
10
+
11
+
Breaking changes in the Files API package
12
+
"""""""""""""""""""""""""""""""""""""""""
13
+
14
+
The ``nextcloud/files`` library was updated to version v4.0.0 in Server.
15
+
This release includes breaking API changes, so you’ll need to update your code in time for Server 33.
16
+
17
+
To improve developer experience, we’ve expanded the context object passed to file actions.
18
+
It now includes additional fields such as the current folder and the current file list.
19
+
Function signatures have also changed: Action handlers now use destructured parameters instead of positional array arguments.
20
+
21
+
You can find the full changelog and migration details in the repository: `nextcloud-files (4.0.0 beta) <https://github.com/nextcloud-libraries/nextcloud-files>`_.
22
+
23
+
Sidebar
24
+
"""""""
25
+
26
+
The files API was changed in this release to use the Node API (available since Nextcloud 27) instead of the legacy ``FileInfo`` API.
27
+
For this the way to register sidebar tabs and actions has changed.
28
+
The ``OCA.Files.Sidebar`` API was removed and replaced with a new sidebar API available from the `@nextcloud/files <https://www.npmjs.com/package/@nextcloud/files>`_ package.
29
+
30
+
To register sidebar tabs you now have to use the new API which is based on web components,
31
+
for more details please refer to the changelog of the ``@nextcloud/files`` package.
32
+
33
+
If you used the Files sidebar within your app you have to now use your own sidebar using the ``NcAppSidebar`` component from the `@nextcloud/vue <https://www.npmjs.com/package/@nextcloud/vue>`_ package.
34
+
35
+
Otherwise if you already use your own sidebar implementation in your app but rely on the Viewer app to open the sidebar using the ``OCA.Files.Sidebar`` API,
36
+
you now have to listen to the ``viewer:sidebar:open`` event-bus event from the Viewer app to open your sidebar.
37
+
So enable the **open sidebar** action within the viewer you have to set ``enabledSidebar``
38
+
when opening the viewer to allow opening the sidebar from within the viewer and listen for the mentioned event.
39
+
8
40
Added APIs
9
41
^^^^^^^^^^
10
42
@@ -42,6 +74,10 @@ Removed APIs
42
74
- To replace ``OC.getPort`` use ``window.location.port``.
43
75
- To replace ``OC.getProtocol`` use ``window.location.protocol``.
44
76
77
+
- The ``OCA.Files.Sidebar`` API is removed.
78
+
This was the last API using the legacy ``FileInfo`` API.
79
+
It is now replaced with the new Node based sidebar API available from the `@nextcloud/files <https://www.npmjs.com/package/@nextcloud/files>`_ package.
80
+
45
81
- The ``OCA.Sharing.ExternalLinkActions`` API was deprecated in Nextcloud 23 and is now removed.
46
82
It was replaced with ``OCA.Sharing.ExternalShareAction`` which now have a proper API by using ``registerSidebarAction`` from `@nextcloud/sharing <https://www.npmjs.com/package/@nextcloud/sharing>`_ instead.
0 commit comments