Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Feature request: Option to add a file for download e.g pdf #74

Closed
garethworld opened this issue Aug 15, 2022 · 6 comments
Closed

Feature request: Option to add a file for download e.g pdf #74

garethworld opened this issue Aug 15, 2022 · 6 comments
Assignees
Labels
enhancement 🔝 New feature or request

Comments

@garethworld
Copy link

It would be really useful to be able to add a file to create a download link.

@gearsdigital gearsdigital added the enhancement 🔝 New feature or request label Aug 15, 2022
@gearsdigital gearsdigital self-assigned this Aug 15, 2022
@gearsdigital
Copy link
Owner

That is actually a really good idea. I'll have look on that!

Thank your very much for reaching out @garethworld

@gearsdigital
Copy link
Owner

gearsdigital commented Aug 16, 2022

@garethworld I had some time to let this sink in a bit. While I really like the idea, I'm uncertain that this makes sense from a usability perspective:

  1. Some of the current interface elements aren't useful for files (e.g. anchor). What should I do? Ignore? Disable?
  2. I need probably new interface elements so that a user can decide if he want to add a download attribute.
  3. The download attribute has some restrictins itself. Chrome 65+ and Firefox supporting only same-origin download links.
  4. How do I distinguish between Pages and Files in the dropdown?

One thing that came into my mind, was to provide a "File" Dialog in the Writer Toolbar:

toolbar

This aligns not only with the Kirby default textareas, where "Files" is a sperated icon (and Dialog) but provides also a clear responsibility. Furthermore a User doesn't need to learn a new interface. Anyhow, extending the Writer-Toolbar is possible but not in an easy way 🙊

There exists a Plugin called oh-hi-mark by @rasteiner where he solved this issue but to be honest, I really fear the maintence effort if something changes in the core.

I could extend this or create an additional plugin which is part of enhanced-toolbar-link-dialog. I could also provide a new one wich is based on oh-hi-mark. But than you have to download, install and maintain an additional plugin (probably two)...

So it is complicated... But maybe I overthink this a bit. 😂

@garethworld
Copy link
Author

I think you are spot on with a separate button, much cleaner and easier to understand.

@rasteiner
Copy link

my 2 cents: "oh-hi-mark" was intended only to add to a discussion.
Its a hack that was less hacky than the plugin it was based on: https://github.com/johannschopplich/kirby-writer-marks which at the time required the user to patch the kirby core.

Johann later rewrote his plugin and made it even less hacky than mine, so if you're considering to use one, it should probably be his.

@gearsdigital
Copy link
Owner

Thanks @rasteiner!

@garethworld Yes, it is. Still not sure about if (and how) I'm going to implement this. I'll let you know.

@purplespider
Copy link

This would be my ideal Kirby link dialog:

The fields would change based on the selected "Link type".

(Mockup based on the link dialog from the Markdown plugin, where it alrady has the radio buttons for "type". I have added the "Page" (plus dropdown) and "File" options).

Repository owner locked and limited conversation to collaborators Apr 14, 2023
@gearsdigital gearsdigital converted this issue into discussion #86 Apr 14, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement 🔝 New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants