-
Notifications
You must be signed in to change notification settings - Fork 33
[PB-5671]: Add folder size and file count to item details dialog #1811
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
base: feature/automatic-trash-column-date
Are you sure you want to change the base?
[PB-5671]: Add folder size and file count to item details dialog #1811
Conversation
Deploying drive-web with
|
| Latest commit: |
2de2431
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://e14cad8f.drive-web.pages.dev |
| Branch Preview URL: | https://feature-folder-details.drive-web.pages.dev |
| ); | ||
| }; | ||
|
|
||
| async function getFolderStatsOrUndefined( |
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.
🙃 not add the return types at the function name, for that we have types :)
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.
I changed the approach, but I still need to return undefined if the item is not a folder. That way, Promise.all won’t trigger a request for it.
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.
he means that this function name should be just getFolderStats instead of getFolderStatsOrUndefined @terrerox
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.
You're right, my bad 😅. I fixed it
| return newStorageService.getFolderStats(itemUuid).catch(() => undefined); | ||
| } | ||
|
|
||
| function calculateItemSize(item: DriveItemDetails, folderStats: FolderStatsResponse | undefined): string | 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.
nit: remember to use arrow functions
| "fileCount_one": "{{count}} файл", | ||
| "fileCount_few": "{{count}} файла", | ||
| "fileCount_many": "{{count}} файлов", | ||
| "fileCount_other": "{{count}} файлов", | ||
| "fileCountMoreThan1000": "Более 1000 файлов" |
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.
remove unused translations
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.
They are actually used, Russian uses 4 plural forms:
- _one: for numbers ending in 1 (except 11): 1 файл, 21 файл, 101 файл
- _few: for numbers ending in 2-4 (except 12-14): 2 файла, 3 файла, 22 файла
- _many: for numbers ending in 0, 5-9, and 11-14: 5 файлов, 11 файлов, 100 файлов
- _other: fallback for any other cases
i18next will dynamically choose it according the count value
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.
ah, good to know 💯
… ItemDetailsDialog
|



Description
Related Issues
Related Pull Requests
Checklist
Testing Process
Additional Notes