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

Editor: Link preview overflows with long strings and only shows postname #62414

Open
hrkhal opened this issue Jun 7, 2024 · 6 comments · May be fixed by #62541
Open

Editor: Link preview overflows with long strings and only shows postname #62414

hrkhal opened this issue Jun 7, 2024 · 6 comments · May be fixed by #62541
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended

Comments

@hrkhal
Copy link

hrkhal commented Jun 7, 2024

Description

The Link Preview in the unified publishing details overflows when long strings are present in the post name and it does not show the full url path.

Enterprise users would expect to see the full url path in the preview at a glance. Displaying the full path would better align with what was in 6.4 and what our users expect.

Screenshot 2024-06-07 at 13 34 18

Step-by-step reproduction instructions

  1. Go to permalink settings and set a custom structure of /%year%/%monthnum%/%day%/%postname%-%post_id%/
  2. Create a new post, give it a post name of /helloworldhelloworldhelloworld
  3. Observe that a) the link preview does not wrap and b) that the preview is only the post name

I would expect the link preview to a) wrap long strings and b) display /2024/06/07/helloworldhelloworldhelloworld-1

Screenshots, screen recording, code snippet

Screenshot 2024-06-07 at 13 23 03

Environment info

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@hrkhal hrkhal added the [Type] Bug An existing feature does not function as intended label Jun 7, 2024
@jordesign jordesign added the [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) label Jun 11, 2024
@Anuj-Rathore24
Copy link

Hey @hrkhal,

In my opinion, the purpose of the link button in the post publish panel should be to display only the title of the post, rather than the entire permalink. The full link can be accessed through the dialog box that appears upon clicking the link button, making it redundant to display it initially.

Screenshot 2024-06-13 at 3 10 45 PM

@hrkhal
Copy link
Author

hrkhal commented Jun 13, 2024

@Anuj-Rathore24 Appreciate the fix for line wrapping.

It is not redundant to reduce the number of clicks to ascertain information that used to be available in 6.4 without the need for any user interaction.

@tharsheblows tharsheblows linked a pull request Jun 13, 2024 that will close this issue
@github-actions github-actions bot added the [Status] In Progress Tracking issues with work in progress label Jun 13, 2024
@tharsheblows
Copy link
Contributor

@Anuj-Rathore24 @hrkhal Ack, I was working on this too and opened a PR. I hope between the two of us it gets sorted 😊

There are some updates to make things a bit clearer about what you can edit and where in the PR I did as I found the description in the edit link dialog a bit imprecise.

@annezazu
Copy link
Contributor

Wanted to note I can replicate this with 6.6.1:

Screen.Recording.2024-08-20.at.12.30.09.PM.mov

Another one to possibly consider for a point release cc @vcanales

@vcanales
Copy link
Member

@annezazu I was unable to reproduce this in 6.6.1.
After some digging, I found that the text wrapping problem in the inspector was introduced in Gutenberg 18.5 and fixed in 18.7 by this PR, which was a part of the 6.6 release.

The display of the full URL isn't fit for a point release, as I don't think it can be considered a regression; the URL hasn't been shown since 6.4.

The problem in the video looks different from the one reported in this issue and is reproducible in 6.5:

url-overflow-publish.mov

I've added a new issue for this behavior — #64730

@t-hamano
Copy link
Contributor

Regarding the link button in the inspector, it's also discussed in #61196, including whether its label and popover content are appropriate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended
Projects
None yet
7 participants