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

The Copy button of the PostURL shouldn't be placed in the slug input #63700

Open
2 tasks done
afercia opened this issue Jul 18, 2024 · 3 comments · May be fixed by #63706
Open
2 tasks done

The Copy button of the PostURL shouldn't be placed in the slug input #63700

afercia opened this issue Jul 18, 2024 · 3 comments · May be fixed by #63706
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended

Comments

@afercia
Copy link
Contributor

afercia commented Jul 18, 2024

Description

Noticed while working on #61196 / #63669

In the PostURL popover, there is a Copy button that is visually placed within the slug input field. As such, it is visually associated with the slug value. Screenshot:

Screenshot 2024-07-18 at 13 07 48

As a user, I would expect the Copy button to copy the value that is inside the input field, because that's what the UI is showing me.

Instead, the Copy button actually copies the full permalink that is shown below the input field.

Following the example in the screenshot above:

  • The input field shows /my-post-title.
  • The copy button is labeled Copy and is visually associated with the input field.
  • Clicking the button copies the full permalink http://localhost:8889/my-post-title/ instead.

I'm not sure this is a good UI as it is potentially confusing for users. Also, it is inconsistent with other UIs where the Copy button actually copies the value shown in the input field.

Step-by-step reproduction instructions

See above.

Screenshots, screen recording, code snippet

No response

Environment info

No response

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
@afercia afercia added [Type] Bug An existing feature does not function as intended [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor labels Jul 18, 2024
@afercia
Copy link
Contributor Author

afercia commented Jul 19, 2024

In #57168 (comment) @SaxonF pointed out a few interesting considerations including:

A fairly standard pattern is more closely mapping copy icon to the actual value being copied, either within the input for example or just outside.

In this cas, 'the actual value being copied' isn't the one of the input. It's the full permalink shown below the input.

I'd appreciate some design feedback @WordPress/gutenberg-design

@richtabor
Copy link
Member

In this cas, 'the actual value being copied' isn't the one of the input. It's the full permalink shown below the input.

Yes, it's not ideal having the copy button copy the whole link, but next to the slug. This should be cleaned up. Maybe the copy icon to the right of the full URL. And a snack bar notification confirming the copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). Needs Design Feedback Needs general design feedback. [Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants