Skip to content

[PB-5660] feat: favorites page - #2038

Open
victor-ferro wants to merge 12 commits into
masterfrom
PB-5660-favorites-page
Open

[PB-5660] feat: favorites page#2038
victor-ferro wants to merge 12 commits into
masterfrom
PB-5660-favorites-page

Conversation

@victor-ferro

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

Copy link
Copy Markdown

Description

Adds a Favorites page that lists the user's favorite folders and files.

  • New route /favorites + sidenav entry (views.ts, paths.json, useSidenavNavigation)
  • src/views/Favorites/:
    • FavoritesView rendered through the existing DriveExplorer
    • fetchFavoriteFolders / fetchFavoriteFiles services on top of the new storage client endpoints
    • fetchFavoritesThunk populating the storage slice (new favorites file/folder state)
  • Translations for the new view in all locales (de, en, es, fr, it, ru, tw, zh)

Related Issues

Relates to PB-5660

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

  • yarn vitest run src/views/Favorites — 2 files, 8 tests passing (against linked SDK)
  • ESLint clean on all touched files

Additional Notes

  • ⚠️ Depends on unreleased @internxt/sdk changes (getFavoriteFolders / getFavoriteFiles on the new storage client). Developed against a yarn-linked local SDK; CI typecheck/tests will fail until the SDK version with these endpoints is published and bumped here.

Add a Favorites view listing favorite files and folders, backed by new
SDK endpoints (getFavoriteFolders/getFavoriteFiles), with its own
fetch services, Redux thunk, route, sidenav entry and translations.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: ef035c6
Status: ✅  Deploy successful!
Preview URL: https://537eb427.drive-web.pages.dev
Branch Preview URL: https://pb-5660-favorites-page.drive-web.pages.dev

View logs

victor-ferro and others added 5 commits July 13, 2026 15:29
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
… view

- hide top bar upload/create buttons, background context menu, shift+F
  shortcut and drag-and-drop in the favorites view
- keep state.favorites updated on item rename, deletion and thumbnail
  cleanup, mirroring the existing recents handling
@victor-ferro
victor-ferro marked this pull request as ready for review July 20, 2026 16:14
Comment on lines +390 to +398
const fetchItems = () => {
if (isTrash) {
getMoreTrashItems();
} else if (isFavorites) {
dispatch(fetchFavoritesThunk());
} else {
dispatch(fetchPaginatedFolderContentThunk(currentFolderId));
}
};

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 DriveExplorer component is already too large and contains a lot of logic for different views, we must avoid adding any more logic there. Separate the Favourites logic from the component

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done — the favorites logic has been moved out of DriveExplorer: state selection and fetching/reset now live in a useFavoritesPagination hook and the empty state in a FavoritesEmptyState component

Comment thread src/app/store/slices/storage/index.ts Outdated
(item: DriveItemData) => !itemsToDelete.find((i) => i.id === item.id && !!i.isFolder === !!item.isFolder),
);
state.favorites = state.favorites.filter(
(item: DriveItemData) => !itemsToDelete.find((i) => i.id === item.id && !!i.isFolder === !!item.isFolder),

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 sonar warnings

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done!

@victor-ferro victor-ferro self-assigned this Jul 24, 2026
@victor-ferro
victor-ferro requested a review from xabg2 as a code owner July 27, 2026 12:18
@sonarqubecloud

Copy link
Copy Markdown

@victor-ferro
victor-ferro requested a review from CandelR July 27, 2026 12:26

@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.

Reviewed. Waiting QA approval to merge

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