-
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
Show "rich" meta data about remote URL when adding URLs as links #31466
Comments
@javierarce I think this could be a really nice enhancement. I wonder would you be able to help with the Design UX here? |
ref #27762 |
@getdave I love the idea! I'll help you with the design. |
Screen.Capture.on.2021-05-04.at.16-49-16.movHere's an example of use fetching details for the link preview to provide a richer experience. Obviously, it has some glitches, but essentially you see the I'm experimenting in #31464 |
Ok, here's the first iteration of this feature's design. This is the basic add flow where the user searches for an item and we show a list of results. If the text happens to be an URL, we fetch the metadata and render a card (at this point, I wonder if it would be OK to fetch the metadata when the search term doesn't begin with The most notable changes I'm introducing are:
Here are a table with the possible variations depending on what kind of data is available: I'm a bit unsure about the This Figma prototype lets you play with the different types of cards. Screen.Recording.2021-05-05.at.17.46.27.mov |
@javierarce This is really great - thanks so much for this work and insight. I like the way the different card options allow for a progressively enhanced approach with increasing levels of fidelity. This is very important as it's not guaranteed that we can fetch metadata in every case. For a v1 I'm going to propose we go with I'll start by enhancing the existing REST API endpoint and then try to pull some of that work into #31464 which is a PoC PR which already does some of what you are planning here. |
That's perfect! |
I'm currently working on improving the endpoint parsing capabilities in #31763 |
What problem does this address?
Currently when adding a link in the editor, you see a series of results based on whatever you type into the search field.
These are different depending on what text you enter and the component tries to "intelligently" discern whether you are:
When you enter a direct URL such as
www.wordpress.org
(note thewww.
is required) then the UI simply displays a single result which is a facsimile of what you entered:This is ok, but it could be better and provide better visual confirmation.
What is your proposed solution?
I'm proposing we make both:
...a little "richer" by enhancing them with meta data from the remote URL such as:
<title>
tag contents.<meta name="description" />
tag.Here's an example of that
Screen.Capture.on.2021-05-04.at.15-38-05.mov
This would provide a visual confirmation to the user that they have entered a valid URL and that it is the one they are expecting.
Also here is a screenshot showing where we have opportunity to make the selected link details richer:
...for example of how this could look here is what Google Docs shows:
I see this purely as a progressive enhancement - ie: if we cannot enhance the given entry then we simply display the experience as it is now. However, if we do manage to get data then we can enhance the search result.
We already have the REST API endpoint to get the data (I'm currently working on making it return more data) so it's about wiring things together and getting a good UX design.
Todo
The text was updated successfully, but these errors were encountered: