Make WordPress Core

Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#41274 closed defect (bug) (fixed)

Improve discoverability of link URL in Image widget.

Reported by: stefanimhoff's profile stefanimhoff Owned by: westonruter's profile westonruter
Milestone: 4.9 Priority: normal
Severity: normal Version: 4.8
Component: Widgets Keywords: has-patch commit has-screenshots
Focuses: Cc:

Description

Hi,
I want to use the new Image-Widget from WordPress 4.8. I define a Link on the Image, but after safing every spacial character like .:/?# are striped from the URL.

The a href is also not inserted in the DOM around the Image nor Title.

Do you need further information?

Best Regards,

Stefan

Attachments (4)

image-url-field.png (140.7 KB) - added by westonruter 7 years ago.
41274.0.diff (6.9 KB) - added by westonruter 7 years ago.
https://github.com/xwp/wordpress-develop/pull/243
41274.1.diff (6.8 KB) - added by westonruter 7 years ago.
Δ https://github.com/xwp/wordpress-develop/pull/243/commits/0cb1dae
image-widget-url-field.png (781.9 KB) - added by westonruter 7 years ago.

Download all attachments as: .zip

Change History (23)

#1 @westonruter
7 years ago

  • Keywords reporter-feedback added

@stefanimhoff what tis the full value you are supplying in the URL field? Note that it expects an actual URL, so beginning with http:// or https://. It uses esc_url_raw() to sanitize the URL.

#2 @stefanimhoff
7 years ago

@westonruter One excample is http://www.ecocamping.net/

#3 @westonruter
7 years ago

@stefanimhoff I think you may be entering the URL in the incorrect field. See image-url-field.png.

#4 @stefanimhoff
7 years ago

  • Keywords reporter-feedback removed
  • Resolution set to invalid
  • Status changed from new to closed

Ohh, sorry. Seems to be a typical layer 8 Problem...

Thank yoe very much!

Best Regards, Stefan

#5 @netweb
7 years ago

  • Milestone Awaiting Review deleted

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


7 years ago

#7 @timmydcrawford
7 years ago

@stefanimhoff we are exploring some approaches to make the linking of images in the widget a bit more discoverable. If you have time I would love to have some feedback on the following designs being considered:

https://cloudup.com/cTX3XurZQBJ

The code to implement the third option is here if you are interested in testing it out: https://github.com/xwp/wordpress-develop/pull/243

#8 @westonruter
7 years ago

  • Milestone set to 4.9
  • Resolution invalid deleted
  • Status changed from closed to reopened

We can use this ticket for improving the usability.

#9 @stefanimhoff
7 years ago

It is a great idea improving the usability.

@timmydcrawford I personally prefer the fourth solution, because most time I want to set more options (Relationships and open in a new window...). I don't know, if I would use third proposal very often, because of the additional options...

In the end linking Images will be standard-stuff: Web is meant to be linked ;)

#10 @westonruter
7 years ago

  • Keywords has-patch added
  • Owner set to timmydcrawford
  • Status changed from reopened to reviewing

@timmydcrawford please add commit once you've confirmed 41274.0.diff.

#11 @westonruter
7 years ago

  • Summary changed from Links in Image Widget not working in WordPress 4.8 to Improve discoverability of link URL in Image widget.

#12 @timmydcrawford
7 years ago

41274.1.diff applies cleanly for me and tests out well. I think this is ready to land.

#13 @westonruter
7 years ago

  • Keywords commit added
  • Owner changed from timmydcrawford to westonruter
  • Status changed from reviewing to accepted

#14 @westonruter
7 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 41252:

Widgets: Expose link URL input field in Image widget to avoid having to open media modal to discover.

Props timmydcrawford, westonruter.
See #39993.
Fixes #41274.

#15 @westonruter
7 years ago

  • Keywords has-screenshots added

#16 @westonruter
7 years ago

In 42140:

Widgets: Style the Image Widget's link field as invalid when a bad URL is supplied.

Fixes issue where user may supply an invalid URL and be unable to save the widget on the Widgets admin screen without being told why.

Amends [41252].
See #41274.
Fixes #42488.

#17 @westonruter
7 years ago

In 42141:

Widgets: Style the Image Widget's link field as invalid when a bad URL is supplied.

Fixes issue where user may supply an invalid URL and be unable to save the widget on the Widgets admin screen without being told why.

Amends [41252].
See #41274.
Fixes #42488 for 4.9.

#18 @westonruter
7 years ago

In 42533:

Widgets: Allow relative/partial URLs in Image Widget's link field.

Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740.

#19 @westonruter
7 years ago

In 42534:

Widgets: Allow relative/partial URLs in Image Widget's link field.

Props audrasjb.
Amends [41252].
See #41274.
Fixes #42740 for 4.9 branch.

Note: See TracTickets for help on using tickets.