-
Notifications
You must be signed in to change notification settings - Fork 522
Hide non-functional Open Folder button in MediaView #976
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: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThe MediaViewControls component disables the "Open Folder" feature: the Changes
Sequence Diagram(s)(omitted — change is a UI element disablement and does not introduce new multi-component control flow) Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ Passed checks (5 passed)
✨ Finishing touches
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (3)
frontend/src/components/Media/MediaViewControls.tsx (3)
2-2: Remove the unusedFolderimport.Since the Open Folder button is now commented out, the
Foldericon import is no longer used and will likely trigger linter warnings.🔎 Suggested fix
-import { Info, Folder, Heart, Play, Pause, X } from 'lucide-react'; +import { Info, Heart, Play, Pause, X } from 'lucide-react';
4-14: Consider commenting out or removing the unusedonOpenFolderprop.Since the Open Folder button is now hidden, the
onOpenFolderprop declaration is unused. For consistency, consider either:
- Commenting it out in the interface alongside the button (preferred if re-enabling soon)
- Removing it entirely if the parent component can also be cleaned up
This helps avoid confusion and potential linter warnings.
🔎 Option 1: Comment out the prop (if re-enabling soon)
interface MediaViewControlsProps { showInfo: boolean; onToggleInfo: () => void; onToggleFavourite: () => void; - onOpenFolder: () => Promise<void>; + // onOpenFolder: () => Promise<void>; // TODO: Uncomment when Open Folder is re-enabled isFavourite: boolean; isSlideshowActive: boolean; onToggleSlideshow: () => void;🔎 Option 2: Remove the prop entirely
interface MediaViewControlsProps { showInfo: boolean; onToggleInfo: () => void; onToggleFavourite: () => void; - onOpenFolder: () => Promise<void>; isFavourite: boolean; isSlideshowActive: boolean; onToggleSlideshow: () => void;
16-26: Remove the unusedonOpenFolderfrom destructuring.Since
onOpenFolderis no longer used in the component (the button is commented out), it should be removed from the destructuring to avoid linter warnings and dead code.🔎 Suggested fix
export const MediaViewControls: React.FC<MediaViewControlsProps> = ({ showInfo, onToggleInfo, onToggleFavourite, - onOpenFolder, isFavourite, isSlideshowActive, onToggleSlideshow,
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
frontend/src/components/Media/MediaViewControls.tsx
🔇 Additional comments (1)
frontend/src/components/Media/MediaViewControls.tsx (1)
40-49: LGTM! Non-functional button properly hidden with clear TODO.The Open Folder button is correctly commented out using proper JSX syntax, and the TODO comment clearly explains the requirements for re-enabling it (implementing
revealItemInDirfrom@tauri-apps/plugin-opener). This effectively addresses issue #959 by hiding the non-functional button until the feature can be properly implemented.
@rahulharpal1603
Fixes #959
To Re-enable Later
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.