#31467 closed enhancement (fixed)
Images should default to not linking
Reported by: | melchoyce | Owned by: | wonderboymusic |
---|---|---|---|
Milestone: | 4.4 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | make-flow has-patch |
Focuses: | ui | Cc: |
Description
For the reasons discussed in this Slack conversation: https://wordpress.slack.com/archives/core-flow/p1424973816000003
In conversation with developers and users there is a general feeling of frustration about the default "link to" for images and image galleries being set to Attachment Page. Users generally don't understand what this is and few theme developers bother to build a template for it — @mor10
I would LOVE if the default link for images was none. That confuses my students every time. They add a picture and have no idea why it's linking to the Attachment page and what an attachment page even is. I think linking should take action, not unlinking — @liljimmi
same here. also there is an issue where i see people naming an image and a post the exact same slug and this shows the attachment page of the image instead of the post they were expecting. — @andrea_r
I agree — changing the default to not link is the expected behavior for the vast majority of people. Let's turn off linking by default.
Attachments (4)
Change History (36)
This ticket was mentioned in Slack in #core-flow by melchoyce. View the logs.
10 years ago
@
10 years ago
Sets image_default_link_type to none on install. Removed "selected" from file option field and added it to none.
#5
@
10 years ago
I couldn't figure out how to bump "None" up to the first option on the drop-down because of all the conditionals, but this sets none as the default after a new install.
#6
@
10 years ago
- Keywords has-patch needs-testing added
My patch bumps the "None" up to the top of the dropdown if the file in question is an image, fixing this for existing installs.
#7
@
10 years ago
- Keywords has-patch needs-testing removed
Agreed. Linking to the attachment page (as well as linking to bare images) results in confusion. It's particularly cumbersome on mobile devices. As mentioned in the chat, we should consider baking something along the line's of wp.com/Jetpack's Carousel into core. We should be able to swipe through galleries on mobile out of the box. Access to full-width images should be straightforward. Diving in and out of attachment pages or bare images is not a good experience. This ticket seems a good step 1.
#8
@
10 years ago
also there is an issue where i see people naming an image and a post the exact same slug and this shows the attachment page of the image instead of the post they were expecting.
Related: #24612
#9
@
10 years ago
Suggest taking a look at the image_default_link_type
option. There's more than meets the eye here. :)
#10
@
10 years ago
I don't disagree with the ticket and agree with @ryan that it's a great first step. But perhaps we should look at the bigger picture (pun intended!).
I posted on the Make Flow blog about support for a new option (and perhaps default) entirely.
https://make.wordpress.org/flow/2015/02/26/core-support-for-wordpress-images-to-open-in-a-modal-window/
This ticket was mentioned in Slack in #core-flow by drew. View the logs.
10 years ago
#12
@
10 years ago
- Keywords needs-patch added
- Owner set to janhenckens
- Status changed from new to assigned
See comment:9 for a suggestion on how to approach a new patch.
@
10 years ago
Sets image_default_link_type to none on install. Removed "selected" from file option field and added it to none. Puts "none" in first place in the dropdown, making it the default for images. Introduces new filter to allow override of image_default_link_type.
This ticket was mentioned in Slack in #feature-imageflow by mor10. View the logs.
10 years ago
#15
@
10 years ago
- Keywords has-patch added; needs-patch removed
@eherman24: I think introducing the new filter falls out of scope of this ticket.
#17
@
10 years ago
There's also a reference to image_default_link_type in wp-admin/includes/media.php.
wp-admin/includes/media.php 1182: 'html' => image_link_input_fields($post, get_option('image_default_link_type')),
Link To in the Image Details modal may also need to be reordered to put None at the top.
Is the image_default_link_type option exposed in UI anywhere?
In the image modals, the last Size used is remembered. Should the last Link To used also be remembered?
This ticket was mentioned in Slack in #core by johnbillion. View the logs.
10 years ago
#19
@
10 years ago
- Keywords needs-patch added; has-patch removed
- Milestone changed from 4.2 to Future Release
Patch needs updating to incorporate the image details modal as per Ryan's comment.
#20
@
10 years ago
- Keywords has-patch added; needs-patch removed
The latest patch still includes the filter which is out of scope. Basically comment:9 and comment:17 sort of outline the pitfalls of this UI change because there's an option and a user setting in play and we have to make sure we don't change an existing expectation. Punting to a future release.
#22
@
9 years ago
Whoops, I lost track of this one! I'll add a new patch that includes @ryan's remark and report back here.
#23
@
9 years ago
- Keywords needs-refresh added
- Milestone changed from Future Release to 4.4
- Owner janhenckens deleted
This ticket was mentioned in Slack in #design by melchoyce. View the logs.
9 years ago
#26
@
9 years ago
- Keywords good-first-bug needs-refresh removed
31467.diff makes this work - the user setting will override the default prop. Not sure why these were switched previously
#27
follow-up:
↓ 28
@
9 years ago
Looking at 31467.diff, there is no point in doing
getUserSetting( 'align', 'none' ) || defaultProps.align
getUserSetting()
takes two args: the setting's name and default value. If it's not set, it will return the default value, and defaultProps.align
can never be reached.
If we still want to use defaultProps.align
as default value, can do:
getUserSetting( 'align', defaultProps.align ) || 'none'
(the || 'none'
bit ensures we have a setting in case defaultProps.align
is not set.)
#28
in reply to:
↑ 27
@
9 years ago
Replying to azaozz:
If we still want to use
defaultProps.align
as default value, can do:
getUserSetting( 'align', defaultProps.align ) || 'none'(the
|| 'none'
bit ensures we have a setting in casedefaultProps.align
is not set.)
Yeah, that makes sense
Yes, yes, yes. That would be fabulous.