Skip to content

Conversation

@susnux
Copy link
Contributor

@susnux susnux commented Mar 11, 2025

Summary

Regarding files integration of files_trashbin

  1. Refactor to make code better testable
  2. Fix deletion time fallback (JS Date vs unix timestamp for "deleted"-column)
  3. Correctly sort deletedBy and originalLocation columns to use natural sort like any other column
  4. correctly return null instead of void in empty trash action
  5. use constant instead of magic value for action ID
  6. add unit tests for every view and action (!)
  7. fix files: also enable delete action if trashbin is disabled

Checklist

@susnux susnux added this to the Nextcloud 32 milestone Mar 11, 2025
@susnux susnux requested review from a team and skjnldsv as code owners March 11, 2025 13:14
@susnux susnux requested review from nfebe and szaimen and removed request for a team March 11, 2025 13:14
Copy link
Member

@skjnldsv skjnldsv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!!!

@susnux susnux force-pushed the fix/files-trashbin-files-integration branch from a8480dd to 6e463df Compare March 11, 2025 13:23
susnux added 6 commits March 11, 2025 15:05
1. Refactor to make code better testable (move columns and view source to `files_views` folder)
2. Fix deletion time fallback (JS Date vs unix timestamp for
   "delted"-column)
3. Correctly sort `deletedBy` and `originalLocation` columns to use
   natural sort like any other column
4. Add unit tests for columns and views

Signed-off-by: Ferdinand Thiessen <[email protected]>
1. correctly return null instead of void in empty trash action
2. use constant instead of magic value for action ID
3. add unit tests for empty trash action
4. add unit tests for trashbin api

Signed-off-by: Ferdinand Thiessen <[email protected]>
1. do not rely on magic string but use constant ID for trashbin view
2. add unit tests for restore action

Signed-off-by: Ferdinand Thiessen <[email protected]>
Signed-off-by: Ferdinand Thiessen <[email protected]>
@susnux susnux force-pushed the fix/files-trashbin-files-integration branch from 6e463df to 07535e7 Compare March 11, 2025 14:05
@susnux susnux requested a review from provokateurin March 11, 2025 14:25
@susnux
Copy link
Contributor Author

susnux commented Mar 11, 2025

fix files: also enable delete action if trashbin is disabled

Seems to be a regression of #50077 cc @provokateurin

Copy link
Contributor

@szaimen szaimen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🐘

@susnux susnux merged commit a708005 into master Mar 11, 2025
121 checks passed
@susnux susnux deleted the fix/files-trashbin-files-integration branch March 11, 2025 14:43
@susnux
Copy link
Contributor Author

susnux commented Mar 11, 2025

Seems to be a regression of #50077 cc @provokateurin

confirmed - we need this in 31

@susnux
Copy link
Contributor Author

susnux commented Mar 11, 2025

/backport to stable31

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants