Skip to content

feat:(PB-6297) preview public shared folder contents - #2052

Open
victor-ferro wants to merge 7 commits into
masterfrom
PB-6297-folder-link-preview
Open

feat:(PB-6297) preview public shared folder contents#2052
victor-ferro wants to merge 7 commits into
masterfrom
PB-6297-folder-link-preview

Conversation

@victor-ferro

@victor-ferro victor-ferro commented Jul 17, 2026

Copy link
Copy Markdown

Description

First part of PB-6297 (public shared folder preview). Until now, a public folder link only showed a card with the folder name and a Download button — the recipient had to download the whole folder as a zip without knowing its contents.

This PR adds a "View" button next to Download that opens a read-only listing of the shared folder contents, fetched without authentication:

  • usePublicSharedFolderContent (new hook): fetches folders first and then files per level via getPublicSharedFolderContent, handling pagination (30 items/page), per-level resource tokens (each response provides the token that authorizes listing the next level) and network credentials (returned by the files request, which carries the link code).
  • PublicSharedFolderContent (new): breadcrumbs, item selection, sorting, and navigation into subfolders. Exiting the preview returns to the classic card.
  • PublicSharedItemList (new): list UI for the items.
  • ShareFolderView: renders the new preview when the eye button is clicked.
  • ShareFileView: Phosphor icon imports renamed to their non-deprecated *Icon variants (no behavior change).

Scope note: this PR only lists contents. Image thumbnails and per-item download/preview come in two follow-up stacked PRs.

Related Issues

Relates to PB-6297.

Related Pull Requests

Stacked on top of this PR (will be opened next):

  • PB-6297-thumbnails — image thumbnails in the listing.
  • PB-6297-preview-download — per-item download and file preview.

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

  • Unit tests: yarn vitest run src/views/PublicShared/hooks/usePublicSharedFolderContent.test.ts (4 tests: initial folders→files fetch sequence, subfolder navigation with the parent level token + breadcrumb back-navigation, no-op navigation guards, and pagination).
  • yarn typecheck and yarn lint clean; full unit suite run by the pre-commit hook.
  • Manual: opened a public shared folder link (/sh/folder/:token/:code), clicked View, browsed root and subfolders, checked pagination on folders with 30+ items, breadcrumb navigation back to parent levels, and exit back to the download card. Verified with and without link password.

Additional Notes

@CandelR CandelR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Check sonnar and the layout whilst navigate, there are some odd jumps when the content stops loading

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 27, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e12aef
Status: ✅  Deploy successful!
Preview URL: https://35c2d482.drive-web.pages.dev
Branch Preview URL: https://pb-6297-folder-link-preview.drive-web.pages.dev

View logs

@victor-ferro
victor-ferro requested a review from CandelR July 27, 2026 17:16

@CandelR CandelR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The flickering persists when the loaded list is empty. There are also subfolders where, when navigating, the server returns a 500 error and it just keeps loading instead of displaying any kind of error message. I’ve attached a video, if you have any further questions, we can discuss them via DM

Screen.Recording.2026-07-28.at.10.56.05.mov

@victor-ferro
victor-ferro requested a review from CandelR July 28, 2026 12:59
@sonarqubecloud

Copy link
Copy Markdown

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.

2 participants