WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10k stars 4.02k forks source link

Update URL popover #56381

Open jameskoster opened 7 months ago

jameskoster commented 7 months ago

It came up in https://github.com/WordPress/gutenberg/pull/56203 that the edit URL popover could use some attention. Here's a mockup that attempts to tidy things up a little:

URL

Changes

afercia commented 7 months ago

A few accessibility notes:

The input label is visually hidden (having both "URL" and "Permalink" seems unnecessary).

Okay, but "URL" now is a sort of 'visual label' while the input field would be labelled "Permalink". While that would work for blind screen reader users, it wouldn't be OK for sighted users who use screen readers or speech recognition software users. The visual labeling must match the actual labeling.

View page link is now an icon button.

Icon-only buttons should be avoided and only used when there is not enough space e.g. in the toolbars. In this popover, there is sufficient space to use standard buttons with visible text.

Also, please let's avoid to visually place buttons within input fields.

Added a / prefix to the input. The idea here is to make a visual connection to the full url without including it (as it could be very long).

I think it is important to keep the full URL visible. While the input field contains only the slug, the full URL must be visible somewhere as it always has been across the history of WordPress. I think this has been already discussed at length since the first implementation of the permalink UI in the Editor.

ohiawins commented 7 months ago

Hola, folks!

Looking at this ticket with @acirujano and we had some thoughts:

We found the popover in the WordPress Design Library and started working on the spacing of the elements, Permalink and View Post/Page. We felt these sections were not separated well enough to give us a visual understanding that they do two different things but are both functions under the URL. So our proposed new layout is below. Also in the backend and in the Figma file capitalization is not consistent so we addressed this issue as well.

High FIVES!! Ana and Ohia

acirujano commented 7 months ago

¡Hola!

This is the mockup that @ohiawins and I made. image

It's included on the Proposals page in the WordPress Design Library in Figma.

Ohia and Ana

acirujano commented 7 months ago

Another thing we can consider is improving the titles. Permalink could be Slug, since what the user enters is the slug. And View Post or View Page could be Permalink, which would also be the same title for pages and posts.

image

Ohia and Ana

afercia commented 7 months ago

Another thing we can consider is improving the titles. Permalink could be Slug, since what the user enters is the slug. And View Post or View Page could be Permalink

Personally, I like the idea of calling things for what they are 👍 The term slug has always been used in the Classic editor and in the taxonomies admin pages. I'd only suggest to name it URL Slug. In the Classic editor, that's the label used for the edit permalink slug field, even though the label is visually hidden:

Screenshot 2023-12-07 at 10 34 20

Also, in the Screen Options users can enable the Slug metabox, which appears below the post content area:

Screenshot 2023-12-07 at 10 24 09

Thats a +1 from me to use the term 'Slug'.

Regarding the 'external' and 'copy' icons, I find a little confusing the former is only a visual indication while the latter is actually a button. Visually, they look similar but they serve different purposes. I'd rather have the Copy button look like a button with visible text. I'd also recommend to bring in some consistency with the 'post publish panel', where:

Screenshot:

Screenshot 2023-12-07 at 10 49 33

acirujano commented 7 months ago

Thank you, Andrea, for providing the screenshots to ensure that the term "Slug" is appropriate. The "external link" icon serves not only as a visual indicator but also functions as the external link itself. Nevertheless, I agree with you that the button with the text "Copy" is clearer and more suitable for accessibility. Therefore, I think this would be a better proposal. I have placed the copy button below and not in line because the permalink is displayed in full and can be quite long.

image

What do you think of this new proposal?

ohiawins commented 7 months ago
acirujano commented 7 months ago

I have proposed this button size for consistency (see attached screenshot).

image

I think it's a good idea to use a more descriptive text, as you suggested, @ohiawins. Perhaps it might be even better to use "Copy Permalink" to maintain the same terminology. I am attaching a new proposal that also takes into account the 2px corner radius on the button.

image

What do you think? What would work better? The icon with a tooltip or the large button? And one more question: Is it necessary to include the option to copy the permalink?

afercia commented 6 months ago
  • In the first solution proposed with our beloved icons we did not include a screenshot that includes the tooltips. @afercia do you think having those would help and then we omit the button for copy?

To clarify what's best for accessibility and, in my opinion, for general usability:

I like the separated Copy button in the last screenshots. Maybe it doesn't need to be full width and I'm not sure it should be a primary button, but I like it ❤️

For reference, in https://github.com/WordPress/gutenberg/issues/56854 I'm going to propose to change the post-publish panel to use the label 'Permalink' instead of 'Post address' for consistency. Screenshot:

Screenshot 2023-12-13 at 08 58 59

afercia commented 6 months ago

Question for designers @WordPress/gutenberg-design

See screenshot below:

These two UIs have a few common concepts but use different terminology etc. Besides these inconsistencies, my specific question is about displaying the 'full URL' (also known as 'permalink'): Why in the URL popover it's a textual link and instead in the post-publish panel it's a readonly input field? Is there any good reason to make them different? I'd think it would be better for consistency to use the same pattern. I think we can add a 'Copy' button for both cases, whether it's a textual link or an input field.

URL popover settings panel and post address post publish

joedolson commented 2 months ago

From the accessibility bug scrub on 4/16/2024, we agreed that the design in @acirujano's Dec 8th comment has a lot of great characteristics: it's clear and consistent.

I agree with @afercia that I'm not sure the copy button needs to be full width or primary, but am fine with them as they are, regardless.

Improving consistency by labeling the link accurately throughout the UI would be good.

afercia commented 2 months ago

A few things have changed in the meantime and now the UI on trunk looks like in the screenshot below:

Screenshot 2024-04-17 at 12 57 04

A few notes: