feat(gui): display total size of selected files in explorer footer #66
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.
Summary
Adds cumulative file size display to the explorer footer when files are selected. Users can now see at a glance how much storage space their selected files occupy, improving the file management experience.
Problem
The explorer footer currently shows only the count of selected items (e.g., "3 items selected") but provides no information about the total size of those files. Users need to:
This makes it difficult to quickly assess disk space usage when managing multiple files, especially when deciding what to delete, move, or download.
User Impact
Without size information, users cannot easily:
Solution
Enhanced the
update_explorer_footer_selected_items_count()function to calculate and display the total size of selected files alongside the item count.Changes Made
File:
src/gui/src/UI/UIWindow.jsdata-sizeattribute from each item elementparseInt()with fallback to 0)window.byte_format()utilitytotal_size > 0(gracefully handles folders)File:
src/gui/dist/bundle.min.jsImplementation Details
The solution leverages existing infrastructure:
data-sizeattributes (in bytes)window.byte_format()utility handles human-readable formatting (B, KB, MB, GB, TB)update_explorer_footer_selected_items_count()Display format:
"X items selected • YY.YY MB"Testing
Manual Testing Completed
Verified functionality across all selection methods:
Edge Cases Tested
|| 0fallbackAcceptance Criteria