- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
feat: add FileManagerSelectionToolbar component with stories and tests (Issue #114) #144
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
        
          
                ...omponents/FileManager/components/FileManagerSelectionToolbar/FileManagerSelectionToolbar.tsx
              
                Outdated
          
            Show resolved
            Hide resolved
        
              
          
                src/components/FileManager/components/FileManagerSelectionToolbar/constants.ts
          
            Show resolved
            Hide resolved
        
      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.
Pull Request Overview
This PR introduces a new FileManagerSelectionToolbar component that displays a responsive toolbar when files are selected in the file manager. The toolbar shows selection status and provides contextual actions, automatically moving overflow actions into a dropdown menu when space is limited.
Key changes:
- Added 
FileManagerSelectionToolbarcomponent with responsive layout logic that dynamically adjusts visible actions based on container width - Implemented mobile detection utilities (
isSmallScreenfunction anduseIsMobileScreenhook) - Updated Storybook organization by moving FileManagerToolbar stories to a components subdirectory
 
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description | 
|---|---|
src/utils/mobile.ts | 
Added isSmallScreen utility function to detect viewports under 640px | 
src/hooks/use-is-tablet-screen.ts | 
Added useIsMobileScreen hook for reactive mobile screen detection | 
src/components/FileManager/components/FileManagerToolbar/DialFileManagerToolbar.stories.tsx | 
Updated story title path to include "components" subdirectory | 
src/components/FileManager/components/FileManagerSelectionToolbar/constants.tsx | 
Defined layout constants for gap spacing, button width, and padding | 
src/components/FileManager/components/FileManagerSelectionToolbar/FileManagerSelectionToolbar.tsx | 
Implemented main toolbar component with dynamic action visibility calculation | 
src/components/FileManager/components/FileManagerSelectionToolbar/FileManagerSelectionToolbar.stories.tsx | 
Created Storybook stories demonstrating toolbar with varying action counts | 
src/components/FileManager/components/FileManagerSelectionToolbar/FileManagerSelectionToolbar.spec.tsx | 
Added unit tests covering rendering, user interactions, and callback invocations | 
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description:
Add FileManagerSelectionToolbar component with stories and tests
Issues:
UI changes
Checklist:
fix:,feat:,feature:,chore:,hotfix:ore2e:. If contains breaking changes then the pull request name must start withfix!:,feat!:,feature!:,chore!:,hotfix!:ore2e!:.(Issue #<TICKET_ID>)(comma-separated list of issues)New Component Checklist:
e.g.
import { Button } from '@/components/Button/Buttoninstead ofimport { Button } from '../../Button/Button