Skip to content

Conversation

lethemanh
Copy link
Contributor

Change:

  • Paste action is disabled in Recent and Sharing.
  • Check correct source folder of the files when moving.

Copy link

bundlemon bot commented Oct 9, 2025

BundleMon

Files updated (6)
Status Path Size Limits
public/static/js/public.(hash).js
110.17KB (+1.34KB +1.23%) -
static/js/main.(hash).js
146.43KB (+1.33KB +0.92%) -
public/static/js/cozy.(hash).js
727.75KB (+1.12KB +0.15%) -
static/js/cozy.(hash).js
870.82KB (+635B +0.07%) -
services/qualificationMigration.js
282.45KB (+145B +0.05%) -
services/dacc.js
262.26KB (+128B +0.05%) -
Unchanged files (15)
Status Path Size Limits
static/js/(chunkId).(hash).js
958.28KB -
public/static/js/(chunkId).(hash).js
870.09KB -
(hash).js
336.11KB -
public/(hash).js
336.11KB -
public/static/js/lib-react.(hash).js
39.24KB -
static/js/lib-react.(hash).js
39.24KB -
public/static/css/cozy.(hash).css
33.38KB -
static/css/cozy.(hash).css
33.38KB -
public/static/js/lib-router.(hash).js
21.86KB -
static/js/lib-router.(hash).js
21.86KB -
static/css/main.(hash).css
16.77KB -
public/static/css/public.(hash).css
6.46KB -
manifest.webapp
2.96KB -
index.html
689B -
assets/manifest.json
185B -

Total files change +4.67KB +0.09%

Groups updated (1)
Status Path Size Limits
**/*.js
6.75MB (+6.34KB +0.09%) -
Unchanged groups (2)
Status Path Size Limits
**/*.{png,svg,ico}
2.17MB -
**/*.css
129.68KB -

Final result: ✅

View report in BundleMon website ➡️


Current branch size history | Target branch size history

@rezk2ll rezk2ll changed the title fix: Adjust validations of cop cut by shortcuts 🐛 fix: Adjust validations of copy cut by shortcuts 🐛 Oct 9, 2025
Copy link
Contributor

@JF-Cozy JF-Cozy left a comment

Choose a reason for hiding this comment

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

I feel we could separate things in at least 2 commits... ? 🤔

timestamp: null,
cutItemIds: new Set(),
sourceFolderId: null,
sourceFolderIds: new Set(),
Copy link
Contributor

Choose a reason for hiding this comment

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

why using a Set instead of a classic Array? We used to get array with xxxxxYyyyyIds name func. I don't say we must not, just that the API between Array and Set are not the same so...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, sourceFolderIds refers to the file’s dir_id.
When I copy or cut multiple files from the same folder, those files share the same dir_id, which causes duplicate IDs => that’s why I use a Set to remove duplicates.

As for why I store multiple IDs: in views like Recent or Sharings, users can select files from different folders, so keeping multiple folder IDs helps check whether the user is pasting into one of the original source folders.

if (parentFolderIds.includes(SHARED_DRIVES_DIR_ID)) {
showAlert({
message: t('alert.cannot_move_shared_drive'),
severity: 'info'
Copy link
Contributor

Choose a reason for hiding this comment

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

we don't use info much with alert, is it ok with Swann?


useKeyboardShortcuts({
canPaste: hasClipboardData,
canPaste: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe we should set canPast as false by default in useKeyboardShortcuts ? So no need to specify here (just remove it)

const parentFolderIds = selectedItems.map(item => item.dir_id)
if (parentFolderIds.includes(SHARED_DRIVES_DIR_ID)) {
showAlert({
message: t('alert.cannot_move_shared_drive'),
Copy link
Contributor

Choose a reason for hiding this comment

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

this is not a move operation, a copy one

@lethemanh lethemanh force-pushed the adjust-validations-of-copy-cut-by-shortcuts branch 2 times, most recently from d1e2ee3 to 383fffb Compare October 9, 2025 09:12
@lethemanh lethemanh requested review from JF-Cozy and rezk2ll October 9, 2025 09:12
@lethemanh lethemanh force-pushed the adjust-validations-of-copy-cut-by-shortcuts branch from 383fffb to d04bef9 Compare October 13, 2025 06:43
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.

3 participants