[PB-5666] feat: favorites empty state - #2047
Open
victor-ferro wants to merge 10 commits into
Open
Conversation
Deploying drive-web with
|
| 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 |
…y-state # Conflicts: # src/views/Favorites/store/toggleFavoriteThunk.test.ts
CandelR
reviewed
Jul 21, 2026
| 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), |
Collaborator
There was a problem hiding this comment.
In drive files or folders, better use the uuid unless the id is mapped as uuid
Comment on lines
+43
to
+45
| if (unfavoritedItems.length > 0 && navigationService.isCurrentPath('favorites')) { | ||
| const { selectedItems } = getState().storage; | ||
| const itemsToDeselect = unfavoritedItems.filter((item) => |
Collaborator
There was a problem hiding this comment.
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
…y-state # Conflicts: # src/views/Favorites/store/toggleFavoriteThunk.test.ts # src/views/Favorites/store/toggleFavoriteThunk.ts
…y-state # Conflicts: # src/views/Drive/components/DriveExplorer/DriveExplorer.tsx
CandelR
approved these changes
Jul 27, 2026
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
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)/favorites(toolbar, context menu or row star) now also deselects it, since it leaves the listing; selection is untouched from any other viewRelated Issues
Relates to PB-5666
Related Pull Requests
Checklist
Testing Process
toggleFavoriteThunk.test.ts(deselects on favorites view; ignores unselected items; keeps selection elsewhere)/favoriteswith no favorites, and selection cleared after unfavoriting from toolbar/context menuAdditional Notes
renderEmptyState()already existed (PB-5660) using theEmptyDS component — this only aligns icon and copy with the acceptance criteria.toggleFavoriteThunk(single choke point for all three toggle surfaces), gated bynavigationService.isCurrentPath('favorites')and filtered to items actually selected.@internxt/sdkdependency as the rest of the stack.