feat(ui): show hidden files count in status bar #65
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
This PR implements a feature to display the count of hidden files in the explorer status bar footer. When "Show Hidden Files" is enabled and hidden files are present, the status bar shows the count in the format "X items (Y hidden)".
Motivation
Currently, users cannot easily determine how many files in a folder are hidden files, even when "Show Hidden Files" is enabled. This information is useful for:
Changes
Core Functionality
update_explorer_footer_item_count()in UIWindow.js to count visible and hidden files separatelyshow_or_hide_files()in helpers.js to trigger footer count updates when toggling visibilityBug Fixes
Files Modified
src/gui/src/UI/UIWindow.js- Enhanced footer count logicsrc/gui/src/helpers.js- Added footer updates on toggle and rename operationssrc/gui/src/UI/UIItem.js- Auto-determine visibility based on filenamesrc/gui/src/UI/UIDesktop.js- Handle visibility updates on remote rename eventssrc/gui/src/i18n/translations/en.js- Added translation keyImplementation Details
Hidden files are identified by names starting with '.' (dot). The visibility state uses three CSS classes:
item-visible: Normal files (not hidden)item-revealed: Hidden files when "Show Hidden Files" is enabled (reduced opacity)item-hidden: Hidden files when "Show Hidden Files" is disabled (display: none)The count only displays when:
Testing Instructions
Test Case 1: Basic Hidden File Count Display
file1.txt,file2.txt.hidden1,.hidden2Test Case 2: Newly Created Hidden Files
.newhidden.newhiddenappears with reduced opacityTest Case 3: Renaming to/from Hidden
test.txt.test.txttest.txtTest Case 4: Toggle Updates Count Immediately