-
Notifications
You must be signed in to change notification settings - Fork 146
Add thumbnail mode option #1341
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: master
Are you sure you want to change the base?
Conversation
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.
When I set this to Show for local and network files, it makes folders on an SFTP mount load slightly slower, but it's not showing thumbnails for images in the SFTP mount (e.g. screenshots of the same format that have thumbnails shown locally). Watching the network activity in System Monitor, it doesn't look like it's receiving enough data to really be trying to thumbnail everything in the SFTP mount's folders when it's enabled.
Also, I'm wondering if the "always show" and "never show" should be on opposite ends, with "show on local only" between them, since that would be the logical spectrum. The only reason to have "show on local only" on one end is because it's the default. That's a @pop-os/ux question.
|
I just had network thumbnails start working after leaving the setting on that for a while. Investigating what I did to trigger it. |
|
@maria-komarova Would "file preview" not be ambiguous with the spacebar gallery previewer? I did notice that if I have this set to I'm observing thumbnails not working on the network mount again after turning them to |
Maybe. But I can't yet think of a better way to describe the thumbnails. And thumbnails could be understood as an icon as well as a render so also ambiguous. |
|
It's fine if we stick with "Show file thumbnails" and a dropdown at the end of the list item. Maybe I'm overthinking that one. |
|
Merriam-Webster and Wikipedia both indicate the word "thumbnail" is specifically a miniature representation of an image, and the word "thumbnail" also exists outside of the computing world in art contexts. I think there's less chance of getting thumbnails mixed up with non-thumbnail icons (which are just called icons) than the file previews terminology, personally. |
|
Yes, I checked the definitions as well. Let's go with "Show file thumbnails" followed by a dropdown. |
|
Cool, I'll change the setting to a dropdown, and look into the SFTP issue. |

Issues addressed
This PR attempts to address the following issues:
It is also a replacement for this unmerged PR:
User interface changes
This PR adds an option for the user to configure how they would like to generate thumbnails:
The default is the current behavior, where thumbnails are generated only for local files. The user will also be able to choose to generate thumbnails for remote files, or to generate no thumbnails.
Technical details
This PR replaces #1224 with a setting that controls both the option to always generate thumbnails, as well as the option to never generate them. I think it makes sense to have both of these options combined into a single setting, and sets up possibility of adding more complex options in the future.
In order to make this change, I've modified the existing behaviour which preloads the
thumbnail_optproperty for anItemstruct with aSome(ItemThumbnail::NotImage)value to prevent the thumbnail from being generated. Instead, I now include a newitem_locationproperty which keeps track of whether the item is local, remote, or in the trash. This allows the decision on whether or not to generate a thumbnail to be made within the Tab, avoiding the need to pass the newthumbnail_modevalue all the way through the file scanning process.I've also added a new method
item.allow_generate_thumbnailto collect all the logic for whether or not a thumbnail should be generated in a single place, so it should be easier to expand this logic in the future.A new message
tab::Message::ThumbConfighas been added to the Tab, to enable changes to this setting to be immediately propagated to open tabs.