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

File actions for frontend #2214

Merged
merged 12 commits into from
Dec 15, 2024
Merged

File actions for frontend #2214

merged 12 commits into from
Dec 15, 2024

Conversation

Zokhoi
Copy link
Contributor

@Zokhoi Zokhoi commented Dec 15, 2024

Adds frontend UI for performing page file actions:

  • List
  • Upload
  • Delete
  • Edit
  • Move
  • Restore
  • Revision history
  • Rollback

@Zokhoi Zokhoi requested a review from emmiegit as a code owner December 15, 2024 11:19
{revisionItem.name}
</div>
<div class="revision-attribute mime">
{revisionItem.mime_hint.split(";")[0]}
Copy link
Member

Choose a reason for hiding this comment

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

I don't think MIMEs will always have a semicolon, and also, why can't we just show the whole MIME type to users?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I personally think the charset is kind of an unnecessary info, but we can go with showing the whole thing

Copy link
Member

Choose a reason for hiding this comment

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

My thinking is that people interested in MIME types are likely to be technical, and so then providing the whole string is more useful than not.

Copy link
Member

Choose a reason for hiding this comment

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

I am pretty sure there is a way to get a textual, more human-readable file type from a MIME. However I don't know if our current magic library provides it, nor what its internationalization status is.

Copy link
Member

Choose a reason for hiding this comment

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

So I just checked, the current crate we use, filemagic, doesn't do this. So adding a "human-readable file description" will need to be an extension added later if that's what we do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Wikidot provides the file type as a pretty rudimentary human readable string, for example it shows .png as "PNG image data" but .js as "No description"

@Zokhoi Zokhoi merged commit 14d95e9 into develop Dec 15, 2024
14 checks passed
@Zokhoi Zokhoi deleted the file-actions branch December 15, 2024 12:22
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.

2 participants