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

Activity feed: Text file preview #463

Closed
martastain opened this issue May 24, 2024 · 0 comments · Fixed by #467
Closed

Activity feed: Text file preview #463

martastain opened this issue May 24, 2024 · 0 comments · Fixed by #467
Assignees
Labels
type: feature Adding something new and exciting to the product

Comments

@martastain
Copy link
Member

Story

A user adds a text file attachment to a comment. It could be plain text, code snippet, markdown text, JSON or similar.
Their colleague wants to quickly check it out, possibly copy the text or a part of it, but they need to download the file, open it in the desktop editor, and view it there while opening it in the browser directly (possibly with syntax hl for common formats like JSON or markdown) would be more comfortable.

Problems

Discord suffers from a similar issue - when you paste a large chunk of text, it allows you to download it, but not preview it, so it slowly pollutes your download folder and it is messy.

Proposal

We already use a code editor with syntax highlighting in settings.

import CodeEditor from '@uiw/react-textarea-code-editor'

We could utilize it to display text file previews in read-only preview popover similar we use for image previews. With an option to download the file if necessary. Preview should allow text selection to copy the content, so it is necessary to disallow click-to-close.

@martastain martastain added the type: feature Adding something new and exciting to the product label May 24, 2024
@Innders Innders linked a pull request May 27, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature Adding something new and exciting to the product
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants