-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[ui] Add list view in gallery #2975
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: develop
Are you sure you want to change the base?
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2975 +/- ##
========================================
Coverage 79.80% 79.80%
========================================
Files 64 64
Lines 8674 8674
========================================
Hits 6922 6922
Misses 1752 1752 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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 adds a list view option to the image gallery, allowing users to switch between grid (thumbnail) and list layout modes for viewing images. The implementation refactors the gallery layout into separate, dynamically-loaded view components (ImageGridView and ImageListView) while updating the ImageDelegate to support both display modes.
Changes:
- Refactored image gallery layouts into separate ImageGridView and ImageListView components with dynamic loading via QML Loader
- Modified ImageDelegate to support both grid and list layout modes using conditional component loading
- Enhanced SearchBar with Escape key handling to hide the search bar and improved visibility toggling
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| meshroom/ui/qml/ImageGallery/qmldir | Registers the new ImageGridView and ImageListView components |
| meshroom/ui/qml/ImageGallery/ImageGridView.qml | New grid view component extracted from main ImageGallery |
| meshroom/ui/qml/ImageGallery/ImageListView.qml | New list view component with vertical layout for images |
| meshroom/ui/qml/ImageGallery/ImageGallery.qml | Refactored to use dynamic loader for switching between views, added layout mode toggle |
| meshroom/ui/qml/ImageGallery/ImageDelegate.qml | Updated to support both grid and list layouts with conditional rendering |
| meshroom/ui/qml/Controls/SearchBar.qml | Added Escape key handler and improved visibility toggling |
| meshroom/ui/qml/WorkspaceView.qml | Removed invalid QML syntax line |
| meshroom/core/init.py | Split logging statement into two separate calls for better formatting |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Timer { | ||
| id: scrollTimer | ||
| interval: 50 // Small delay to ensure layout is complete |
Copilot
AI
Jan 14, 2026
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.
The magic number 50 for the timer interval lacks context. Consider adding a comment explaining why this delay is necessary, or define it as a named constant like layoutInitializationDelay for better maintainability.
| Timer { | |
| id: scrollTimer | |
| interval: 50 // Small delay to ensure layout is complete | |
| // Delay (in ms) used to ensure the layout is fully initialized before updating | |
| // the current index and attempting to scroll to the selected item. | |
| readonly property int layoutInitializationDelay: 50 | |
| Timer { | |
| id: scrollTimer | |
| interval: layoutInitializationDelay |
| width: layoutMode === ImageGallery.LayoutModes.Thumbnail ? | ||
| (layoutLoader.item ? layoutLoader.item.cellWidth : 160) : | ||
| (layoutLoader.item ? layoutLoader.item.width : 400) |
Copilot
AI
Jan 14, 2026
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.
The fallback width value of 400 appears to be a magic number without clear justification. Consider defining this as a named constant (e.g., defaultListViewWidth) or using a more contextual value based on the parent's width to ensure proper layout even before the loader completes initialization.
7c7e410 to
577c407
Compare
1ac22ed to
059075a
Compare
What does this PR do ?
It adds a list view to the image gallery :

Changes in the code
ImageGridViewandImageListView. They are dynamically loaded through QML components with a loader depending on the layout modeNotes for the review