Skip to content

[PB-5666] feat: favorites empty state - #2047

Open
victor-ferro wants to merge 10 commits into
PB-5663-favorite-indicatorfrom
PB-5666-favorites-empty-state
Open

[PB-5666] feat: favorites empty state#2047
victor-ferro wants to merge 10 commits into
PB-5663-favorite-indicatorfrom
PB-5666-favorites-empty-state

Conversation

@victor-ferro

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

Copy link
Copy Markdown

Description

  • Favorites empty state per design: solid blue star (text-primary, fill), title "No favorites yet" and body "Add files or folders to your favorites to access them faster" (copy updated in all 8 locales)
  • Bugfix: unfavoriting a selected item from /favorites (toolbar, context menu or row star) now also deselects it, since it leaves the listing; selection is untouched from any other view

Related Issues

Relates to PB-5666

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

  • 3 new unit tests in toggleFavoriteThunk.test.ts (deselects on favorites view; ignores unselected items; keeps selection elsewhere)
  • Manual testing: empty state on /favorites with no favorites, and selection cleared after unfavoriting from toolbar/context menu

Additional Notes

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4ac6aab
Status: ✅  Deploy successful!
Preview URL: https://1581375c.drive-web.pages.dev
Branch Preview URL: https://pb-5666-favorites-empty-stat.drive-web.pages.dev

View logs

…y-state

# Conflicts:
#	src/views/Favorites/store/toggleFavoriteThunk.test.ts
if (unfavoritedItems.length > 0 && navigationService.isCurrentPath('favorites')) {
const { selectedItems } = getState().storage;
const itemsToDeselect = unfavoritedItems.filter((item) =>
selectedItems.some((selected) => selected.id === item.id && selected.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.

In drive files or folders, better use the uuid unless the id is mapped as uuid

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!

Comment on lines +43 to +45
if (unfavoritedItems.length > 0 && navigationService.isCurrentPath('favorites')) {
const { selectedItems } = getState().storage;
const itemsToDeselect = unfavoritedItems.filter((item) =>

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.

Extract the deselection logic into a named function, as the current thunk combines two responsibilities, synchronising the favourites state and synchronising the selection without any visual or naming distinction

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!

…y-state

# Conflicts:
#	src/views/Favorites/store/toggleFavoriteThunk.test.ts
#	src/views/Favorites/store/toggleFavoriteThunk.ts
@victor-ferro victor-ferro self-assigned this Jul 24, 2026
@victor-ferro
victor-ferro requested a review from CandelR July 27, 2026 13:17
@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