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

feat: new file preview #516

Merged
merged 6 commits into from
Sep 20, 2023
Merged

feat: new file preview #516

merged 6 commits into from
Sep 20, 2023

Conversation

tomicvladan
Copy link
Collaborator

File preview reimplemented. Now it supports text files as well.

Copy link
Collaborator

@IgorShadurin IgorShadurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When checking the preview, I came across the fact that when opening previews for .html/.pdf files in the preview window, the files are still downloaded. I believe that downloading can be disabled for unsupported file types.
wdyt?

}
}

setContent(text);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would recommend only outputting a few lines or kb of text. If the size is large, mobile users may have problems.

@tomicvladan
Copy link
Collaborator Author

Good point. I didn't pay attention that files were still being downloaded even if cannot be previewed.

Copy link
Collaborator

@IgorShadurin IgorShadurin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feels quite responsive now!
There is a suggestion to not show an error for an unsupported file type. An error is something that doesn't go according to plan. However, an unsupported format is normal and the error can be hidden.

(optional) Without error, the distance between the file name and its size can be increased to improve display. But if the distance between the elements is no less than between other elements, then you can leave it that way.

File type that not supported
Screenshot 2023-09-20 at 12 07 50

If hide error message for not supported types
Screenshot 2023-09-20 at 12 12 26

If increase distance between elements
Screenshot 2023-09-20 at 12 14 40

@tfius tfius merged commit afdcfb2 into development Sep 20, 2023
@tfius tfius deleted the feat/file-preview branch September 20, 2023 12:02
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.

3 participants