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

Link images in media + text #18139

Open
wants to merge 2 commits into
base: master
from

Conversation

@draganescu
Copy link
Contributor

draganescu commented Oct 28, 2019

Description

Adds a link functionality to images in the media + text block.
Closes: #15422

Screenshots

Screenshot 2019-11-01 at 15 59 41

How has this been tested?

Tested locally.

Types of changes

Copied the same functionality available in the image block.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
@draganescu draganescu force-pushed the add/link-to-media-text branch from caa6e63 to 9dcf7ed Nov 1, 2019
@draganescu draganescu changed the title Link media in media + text Link images in media + text Nov 1, 2019
@draganescu draganescu marked this pull request as ready for review Nov 1, 2019
@draganescu

This comment has been minimized.

Copy link
Contributor Author

draganescu commented Nov 1, 2019

@mapk @paaljoachim I effectively copied the stuff in the image block.
What should I remove, because everything there seems like a good idea?

@brezocordero

This comment has been minimized.

Copy link

brezocordero commented Nov 3, 2019

Tested it visually and it works as expected.
Gutenberg 6.8.0
Chrome Version 77.0.3865.120 (Official Build) (64-bit)

AddLinkToMediaText

@Dabalina

This comment has been minimized.

Copy link

Dabalina commented Nov 3, 2019

Tested on Chrome Version 78.0.3904.70 (Official Build) (64-bit) and Gutenberg 6.8.0

I was able to add the link to the image however the open in new tab is not working.

ezgif com-optimize

@mapk

This comment has been minimized.

Copy link
Contributor

mapk commented Nov 8, 2019

I just tested this as well and noticed a discrepancy between this link interaction and a text link interaction. Here's what I'm seeing.

The unlink interaction on a Media + Text block.

Screen Shot 2019-11-07 at 6 18 39 PM

The unlink interaction on a text link.

Screen Shot 2019-11-07 at 6 19 23 PM

It would be great to keep these interactions consistent.

@phpbits

This comment has been minimized.

Copy link

phpbits commented Nov 10, 2019

@draganescu I've added this feature on EditorsKit plugin as well. I've been asked by @paaljoachim to check this PR and here are my concerns:

  1. Would it be better to use Toggles on "rel" as well similar to EditorsKit?
  2. I've added option to assign link to whole block aside from the image. It's personal preference but I would love to hear your idea about his as well.
  3. What will be the impact of the upcoming Link interface?

Thanks a lot!

@paaljoachim

This comment has been minimized.

Copy link

paaljoachim commented Nov 10, 2019

Here is a link to a gif from EditorsKit: #15422 (comment)

@phpbits

This comment has been minimized.

Copy link

phpbits commented Nov 10, 2019

I just tested this as well and noticed a discrepancy between this link interaction and a text link interaction. Here's what I'm seeing.

The unlink interaction on a Media + Text block.

Screen Shot 2019-11-07 at 6 18 39 PM

The unlink interaction on a text link.

Screen Shot 2019-11-07 at 6 19 23 PM

It would be great to keep these interactions consistent.

I'm not sure if this is a good idea. What if I want to just edit the link? Having it as "Edit" instead of "Remove" will give much more control than doing the same process again when editing the link. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.