-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Allow uploading and setting attachment via Link UI #37260
base: trunk
Are you sure you want to change the base?
Conversation
Size Change: +345 B (0%) Total Size: 1.11 MB
ℹ️ View Unchanged
|
We don't always need to upload the file. We need access to the media library, which has all we need to upload. This could be directly in the link editor, but also needs to be in the button block. It may be best to just have a generic button that opens the media library in a fully functional state over the top of the page and allow us to manage our library however we need without having to leave our current page/post or have it all open in a new window. I would highly recommend looking through #8322 (#8322) and see all the ideas posted there, complete with mockups. |
My interpretation of @jasmussen's mockup is that it would work a lot like the Featured Image component does: clicking on it opens the media upload/library modal. I would suggest changing the wording to Edit: In fact, this comment from the original issue describes what I'm thinking of perfectly: #8322 (comment) |
What if it is already uploaded? Please make it easy to get to the full
madia manager. I had not thought of clicking the featured image. That a
much less hacky solution than what most people are doing by adding a file
block, managing the media, and deleting it.
I like the slider too, but it should have a "manage media" button and a way
to upload without the infernal drag and drop UI.
Thanks!
On Tue, Dec 21, 2021 at 12:18 AM Joen A. ***@***.***> wrote:
Yes, essentially the attachment icon would give access to the same type of
upload button as exists in the Featured image panel.
Another option is to have the popover use a sliding interface, which is
one we need separately for custom colors in the color popover. In that
light, clicking the Attachment button could slide right to reveal the
upload dropzone:
[image: URL dialogs]
<https://user-images.githubusercontent.com/1204802/146895167-706f1881-ec3a-4562-b658-e069b8cf13d2.png>
The theoretical benefit of this one is that we could list more than an
upload dropzone there, perhaps "link to people" or otherwise provide a
filtering interface for the URL dialog.
—
Reply to this email directly, view it on GitHub
<#37260 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAENKR2KQYWJ532IOPR67LDUSAZ3XANCNFSM5JW74KYQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
--
Tiny phone, fat fingers. please excuse my misspellings and brevity.
|
@buckmanhands see the above comment that @jasmussen was replying to. All such components in the UI already open the full media manager when clicked on. 😊 |
I like @jasmussen idea of using the attachment icon, but I agree with @buckmanhands that we could just open the Media Library instead of offering an option to upload the file directly (that would be handy, but it would add more noise to the UI). Here's my proposal combining some of the ideas of this thread and the related conversation: As you can see in the image, once a user attaches a picture (or another kind of document), we show a preview and display a different icon on the interface. If the user then edits the link, we offer a couple of options to either remove the image (and go back to the original link UI) or replace it (which will open the Media Library). Clicking the preview area would open the Media Library too. And as a pro/hidden feature, we could also offer the drag & drop functionality at any point of the flow: Note that I've moved the unlink bottom to the footer of the UI (as I originally proposed a while back) to distance it from the editing icon and have it always available, but we could keep it in its current position too. |
Description
Currently it isn't easily possible to link directly to a attachement (uploaded file). As described in #8322 there is a rather involved process to work around this but it's not ideal.
I appreciate this is very frustrating for users and thus I want to resolve it.
This PR explores adding a media upload area to the Link UI.
It is very much experimental and a WIP. It rather exposes some of the weakness of the
<LinkControl>
in handling asynchronicity and also the inflexibility of some of it's handling.After WP 5.9 ships I intend to try and find time to explore this. I'd value assistance from design folks (cc @jasmussen).
Tries to address #8322
Todo
How has this been tested?
Screenshots
Screen.Capture.on.2021-12-09.at.17-13-42.mov
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).