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

LinkControl: Remove tools controls from initial state #50886

Closed
richtabor opened this issue May 23, 2023 · 5 comments
Closed

LinkControl: Remove tools controls from initial state #50886

richtabor opened this issue May 23, 2023 · 5 comments
Labels
[Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) [Package] Block editor /packages/block-editor

Comments

@richtabor
Copy link
Member

richtabor commented May 23, 2023

Part of #50891

The link settings, cancel, and apply "tools" (block-editor-link-control__tools) should only available when a link has been applied—not before. Let's remove these controls and have them only render if a link is added to the control.

Current Proposed
CleanShot 2023-05-23 at 12 29 17 CleanShot 2023-05-23 at 12 30 20
@richtabor richtabor added [Package] Components /packages/components [Feature] Link Editing Link components (LinkControl, URLInput) and integrations (RichText link formatting) labels May 23, 2023
@richtabor richtabor mentioned this issue May 23, 2023
13 tasks
@getdave
Copy link
Contributor

getdave commented May 25, 2023

This suggestion feels right when yuo consider the UX as a whole as outlined in #50891.

My only concern remains that this may make it difficult for users of assistive technology to dismiss the popover (we cannot rely on Esc as many users won't know about this convention).

I'm not suggesting we retain Apply/Cancel but rather we consider

  • adding a dedicated close X
  • work with a11y team to see if a visually hidden Close button might be an appropriate compromise

@richtabor
Copy link
Member Author

My only concern remains that this may make it difficult for users of assistive technology to dismiss the popover (we cannot rely on Esc as many users won't know about this convention).

I'm fairly confident there's not a dedicated close action on any other popover, and I don't think LinkControl should be treated any differently. Also, ESC does work within the popovers throughout the editor — so I would think the convention would be realized.

@richtabor
Copy link
Member Author

richtabor commented May 25, 2023

retain Apply/Cancel

I do think it's good to keep Apply and Cancel actions within the context of editing a link #50890 — as it affords understanding to whether or not link changes have been saved, or discarded.

@getdave
Copy link
Contributor

getdave commented May 26, 2023

Good to know we've considered this and accounted for the tradeoffs 👍

@richtabor richtabor added the Needs Dev Ready for, and needs developer efforts label May 30, 2023
@richtabor
Copy link
Member Author

This was done as part of #51712

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) [Package] Block editor /packages/block-editor
Projects
Development

No branches or pull requests

4 participants