Skip to content
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

Preview mobile dropdown and image size button #1066

Merged
merged 2 commits into from Aug 25, 2020

Conversation

ramiresviana
Copy link
Contributor

Preview mobile dropdown

The preview header do not have dropdown for mobile devices, which can cause issues with small screens. It should behave like the file listing header, with its own dropdown.

Preview image size button

Images in the preview have a fixed size of 1080px, causing bigger images to have a fraction of its size. Having a button for toggling the image size allows users to view the original image.

@o1egl
Copy link
Member

o1egl commented Aug 20, 2020

@ramiresviana awesome PR, thanks. One question. What do you mean under causing bigger images to have a fraction of its size. The resize for previews should keep image ratio and just resize it.
Ideally would be to track --disable-preview-resize param and display preview size button only if resizing is enabled.

@ramiresviana
Copy link
Contributor Author

@o1egl this happens when having a fixed size for the previews:

original res	 preview res	 preview percentage
1280x720	 1080x608	 84%
1920x1080	 1080x608	 56%
3840x2160	 1080x608	 28%
7980x4320	 1080x608	 14%

When the user has a 720p image, the preview will be 84% of the original resolution, since the loss of detail is just 16% the user do not need to download the original file.

Having a 8K image, the preview will be 14% of the original resolution, that is losing 86% of the original image, causing users to be forced to download the original file and use other application to view the image.

track --disable-preview-resize param and display preview size button only if resizing is enabled.

I will add the integration with --disable-preview-resize param.

@o1egl
Copy link
Member

o1egl commented Aug 20, 2020

@ramiresviana the idea behind this param was to display the image faster on the FE by reducing the size.

@ramiresviana
Copy link
Contributor Author

@o1egl the --disable-preview-resize param can partially achieve what i am proposing with the resize button, except by:

  • CLI parameters arent user friendly: running FileBrowser is easy and do not require configuration, cli features may be used only by advanced users.
  • Toggle buttons cover different scenarios: when using mobile data you probably want to save data by using resized previews. On a big size TV you probably want to see your photos on full size.

@ramiresviana
Copy link
Contributor Author

@o1egl added conditional for not displaying resize button if --disable-preview-resize is used.

@o1egl o1egl merged commit b9ede79 into filebrowser:master Aug 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants