Fix rendering custom columns in file lists#60134
Open
Conversation
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
CustomElementRender is used to render both IFileActions and IColumns. However, the API to render both of them is different, and currently CustomElementRender passes the arguments expected by IFileAction. Fortunately those arguments are a superset of those expected by IColumn, so they can be adapted when a CustomElementRender is used to render an IColumn. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Member
Author
|
/compile / |
Member
Author
|
/backport to stable33 |
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #58233 , which is a regression introduced in #56743
CustomElementRenderis used to render bothIFileActionsandIColumns. In the past both expected the same arguments, but in @nextcloud/files 4 the arguments expected byIFileActionchanged (with a further adjustment in another beta). Therefore, now the API to render both of them is different, and currentlyCustomElementRenderpasses the arguments expected byIFileAction. Fortunately those arguments are a superset of those expected byIColumn, so they can be adapted when aCustomElementRenderis used to render anIColumn.Note that only E2E tests for the trashbin are included. Tests for the external storage file list were not added.
How to test (trashbin)
Result with this pull request
The original location is All files, deleted by is You and deletion date is few seconds ago
Result without this pull request
The original location and deleted by are Unknown, and deleted is A long time ago (in a galaxy f... sorry, today I had to :-P )
How to test (external storages)
Result with this pull request
The storage type is the right type and the scope is System
Result without this pull request
The storage type is Unknown and the scope is Personal