Skip to content

Conversation

@terrerox
Copy link
Contributor

@terrerox terrerox commented Jan 7, 2026

Description

Add a new "Auto-delete" column in the trash list that displays the number of days until an item is
permanently deleted. The column shows "In X day(s)" with a warning icon, and highlights items in red when
they have 2 days or less remaining.

Changes:

  • Add caducityDate field to DriveFileData and DriveFolderData types
  • Add "Auto-delete" translation key to English locale
  • Create skinSkeletonTrash for trash view loading state
  • Add auto-delete column header to trash list
  • Display auto-delete countdown with WarningCircle icon in list items
  • Calculate days until deletion from caducityDate field
  • Apply red text styling for urgent items (≤2 days remaining)

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

Additional Notes

  Add a new "Auto-delete" column in the trash list that displays the number of days until an item is
  permanently deleted. The column shows "In X day(s)" with a warning icon, and highlights items in red when
  they have 2 days or less remaining.

  Changes:
  - Add caducityDate field to DriveFileData and DriveFolderData types
  - Add "Auto-delete" translation key to English locale
  - Create skinSkeletonTrash for trash view loading state
  - Add auto-delete column header to trash list (non-orderable)
  - Display auto-delete countdown with WarningCircle icon in list items
  - Calculate days until deletion from caducityDate field
  - Apply red text styling for urgent items (≤2 days remaining)
@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jan 7, 2026

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: aa07b6e
Status: ✅  Deploy successful!
Preview URL: https://cff86de2.drive-web.pages.dev
Branch Preview URL: https://feature-automatic-trash-colu.drive-web.pages.dev

View logs

@terrerox terrerox self-assigned this Jan 7, 2026
Comment on lines 106 to 116
interface ListHeaderItem {
label: string;
width: string;
name: 'type' | 'name' | 'updatedAt' | 'size' | 'caducityDate';
orderable: boolean;
defaultDirection: 'ASC' | 'DESC';
buttonDataCy?: string;
textDataCy?: string;
}

const getListHeaders = (translate: (key: string) => string, isRecents: boolean, isTrash: boolean): ListHeaderItem[] => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can move this outside in order to keep it separately and make it easy to maintain. We could add it in a DriveExplorerList directory and add all components related with this DriveExplorerList

days: number,
translate: (key: string, options?: { count?: number }) => string,
): { text: string; isUrgent: boolean } => {
const isUrgent = days <= 2;
Copy link
Collaborator

Choose a reason for hiding this comment

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

why 2? Add it to a descriptive variable

};

const DriveExplorerListItem = ({ item }: DriveExplorerItemProps): JSX.Element => {
const getAutoDeleteDisplay = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that this function name does not reflect what does, maybe getAutoDeleteStatusInfo or something similar fits better

};

const DriveExplorerListItem = ({ item }: DriveExplorerItemProps): JSX.Element => {
const getAutoDeleteDisplay = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe we can add memoization for this function

@sonarqubecloud
Copy link

@terrerox terrerox requested a review from CandelR January 14, 2026 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants