-
Notifications
You must be signed in to change notification settings - Fork 69
Feat: Highlight new items #3508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
BundleMonFiles updated (6)
Unchanged files (15)
Total files change +2.92KB +0.06% Groups updated (1)
Unchanged groups (2)
Final result: ✅ View report in BundleMon website ➡️ |
0bfbb04
to
9981ef6
Compare
6104b29
to
a743fca
Compare
a743fca
to
bfa164a
Compare
We have two issues:
![]()
![]() you can switch to the selected attribute instead here: |
d41e9a8
to
8660c0c
Compare
68234a5
to
4214f1c
Compare
They have been fixed |
4214f1c
to
4597ee5
Compare
event.preventDefault() | ||
|
||
if (disabled || isRenaming) return | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better to check the flag inside the clearHighlightedItems() function istead of wrapping it with an if each time you call it .
Inside that function if the flag is enabled simply return
src/hooks/useOnLongPress/helpers.js
Outdated
} | ||
|
||
if (flag('drive.highlight-new-items.enabled')) { | ||
clearHighlightedItems() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, flag inside
)} | ||
{canUpload && !isUploadDisabled && ( | ||
<> | ||
<NewItemHighlightProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
either conditionally wrap the child elements with this provider using the flag or inside the provider make sure to perform nothing with the flag is disabled
showAlert, | ||
displayedFolder?.driveId | ||
displayedFolder?.driveId, | ||
flag('drive.highlight-new-items.enabled') ? addItems : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing, check the flag inside the additems function not outside because it's easy to miss and you will repeat this if sometimes .
You already missed it above
src/modules/filelist/AddFolder.jsx
Outdated
afterSubmit={handleAfterSubmit} | ||
afterAbort={handleAfterAbort} | ||
addItems={ | ||
flag('drive.highlight-new-items.enabled') ? addItems : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same, flag inside the function
src/modules/upload/Dropzone.jsx
Outdated
}, | ||
displayedFolder.driveId | ||
displayedFolder.driveId, | ||
flag('drive.highlight-new-items.enabled') ? addItems : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same thing
src/modules/upload/DropzoneDnD.jsx
Outdated
}, | ||
displayedFolder.driveId | ||
displayedFolder.driveId, | ||
flag('drive.highlight-new-items.enabled') ? addItems : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
src/modules/upload/UploadButton.jsx
Outdated
}, | ||
displayedFolder.driveId | ||
displayedFolder.driveId, | ||
flag('drive.highlight-new-items.enabled') ? addItems : undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
} | ||
}, [currentFolderId, isDesktop]) | ||
|
||
if (flag('drive.highlight-new-items.enabled')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same
test/components/AppLike.jsx
Outdated
</BreakpointsProvider> | ||
</ViewSwitcherContextProvider> | ||
</SelectionProvider> | ||
<NewItemHighlightProvider> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment as above
a036730
to
5056d2a
Compare
- New items are added to a list when a new upload is in progress. - cozy-ui check if the item rendered is part of the list Use UploadProvider : - Add the function addNewItem in parameters when using old redux thunk actions - Clear the newItems list when : - Dragging items - Selecting an item - Passing from a folder to another test: correct the tests because we're using a uploadProvider fix(AddMenuContent): wrap UploadItem with UploadProvider for context fix(AddFolder): integrate UploadContext to handle the highlight of new folders fix(UploadProvider): optimize functions with useCallback Prevents functions from changing on every render. This avoids infinite loops and crashes style: correct the lint resolve conflict chore: Upgrade cozy-ui to 130.5.0 ⬆️ fix: Resolve comments in PR 🎨 fix: Resolve incorrect mocking module :✅ feat: Apply highlight new items into grid view :spakles: feat: Add feature flag ✨ chore: Upgrade version of cozy-ui to 130.7.0 ⬆️ feat: Clear highlighted items when using long press ✨ style: Change the way apply feature flag 🎨 fix: Resolve failed test cases 🐛
5056d2a
to
c3c57d5
Compare
Hello
Objectif : Highligh new items when they're uploaded.
Why : Because when there are too many elements on the window we can lose them depending on the way the folder is sorted.
Demonstration :
Capture vidéo du 2025-09-25 12-39-59.webm
Now we're using a provider. I'm not familiar with it so feel free to add your recommandations.
And yes it work with a folderId undefined.
Yes when selecting just after an upload, all the file are selected. The bug is already reported and under investigation.
Ps: All the changed reguarding the lint are under the style commit normally.
Flag:
drive.highlight-new-items.enabled