Make WordPress Core

Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#52353 closed enhancement (fixed)

Comments list's link should point to an actual article

Reported by: trejder's profile trejder Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.7
Component: Comments Keywords: has-screenshots
Focuses: administration Cc:

Description

Scope: Page that you see after clicking "Approve it" in an email informing you that you have a new comment to be approved. The view of (all | to be approved) comments for given post.

Actual behaviour: Main (large-font) link with article title points into edit mode of titled article and opens up Block editor (Gutenberg).

Expected behaviour: Main link with should point to an actual article in the web page or blog. And a small-font additional link below main title should point to an editor.

Proposed look / behaviour:

https://i.imgur.com/MVPpknZ.jpg

Judgement: In my opinion, in most cases after you approve or respond to some comment, you want to see an actual article in your blog, not to go to edit mode of it. Most comments are just comments. The number of comments pointing to some mistate in text (that would require you to go to edit mode) is very low IMHO.

As a blog network owner of 18 blogs it drives me crazy that I don't have a quick link to main article in comment approval view. That I have a pointless and never used huge link pointing to editor instead. And that I have to jiggle with small date-like links under "Submitted on" column to get to actual page.

Attachments (12)

52353.diff (1.0 KB) - added by audrasjb 4 years ago.
Capture d’écran 2021-01-24 à 14.30.31.png (334.4 KB) - added by audrasjb 4 years ago.
Testing 52353.diff
testing-52353-in-localized.JPG (61.9 KB) - added by vladytimy 4 years ago.
I tested 52353.diff too and it works! PS: In localized version it introduces a new string.
52353.in-response-to.png (5.8 KB) - added by SergeyBiryukov 4 years ago.
52353.2.diff (604 bytes) - added by SergeyBiryukov 4 years ago.
52353.2.png (10.3 KB) - added by SergeyBiryukov 4 years ago.
52353.2.CPT.JPG (20.9 KB) - added by vladytimy 4 years ago.
Testing 52353.2.diff with Custom Post Type comment
52353.2.on_mobile.JPG (22.7 KB) - added by vladytimy 4 years ago.
52353.2.diff on mobile with custom post type
52353.3.diff (610 bytes) - added by vladytimy 4 years ago.
Adds a line break
52353.3.on_mobile.JPG (22.1 KB) - added by vladytimy 4 years ago.
Testing 52353.3.diff with Custom Post Type on mobile
52353.3_on_desktop.JPG (45.4 KB) - added by vladytimy 4 years ago.
52353.3.diff on desktop
52353.4.diff (614 bytes) - added by lukecarbis 3 years ago.
Same as third patch, but with numbered placeholders.

Download all attachments as: .zip

Change History (32)

#1 @audrasjb
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 5.7
  • Version changed from 5.6 to trunk

Hi @trejder, thank you for opening this ticket.

It totally makes sense to me. Let's see what we can do before 5.7 beta 1.

@audrasjb
4 years ago

@vladytimy
4 years ago

I tested 52353.diff too and it works! PS: In localized version it introduces a new string.

#2 @audrasjb
4 years ago

  • Keywords has-patch has-screenshots added; needs-patch removed

Thanks for testing @vladytimy!

#3 @trejder
4 years ago

Thank you @audrasjb and @vladytimy for an ultra fast response to this ticket!

I browsed some other tickets and some of them have like 5 years waiting, so I wasn't expecting to get this done before 2025! :> Thanks again!

#4 @ayeshrajans
4 years ago

Totally voting in favor of this change, and the patch from @audrasjb does it well!
Just a thought - if we were to rename the "Edit this post" to just "Edit", I think we can reuse existing "Edit" labels.

#5 @trejder
4 years ago

Reusing "Edit" label sounds like a great idea. However, I have some doubts, if this "tiny" single-word link wouldn't "get lost" visually under huge (big font) and usually long (post title) line above?

#6 @vladytimy
4 years ago

Replying to ayeshrajans:

if we were to rename the "Edit this post" to just "Edit", I think we can reuse existing "Edit" labels.

I thought about this as well, but because:

  • on this page we have both posts & comments links
  • maybe some users use the link in the title to edit the post, so they instantly have to see that something has changed
  • we have to avoid any kind of confusion

my vote goes to "Edit this post"

I don't think introducing a new string at this stage is a problem.

Last edited 4 years ago by vladytimy (previous) (diff)

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


4 years ago

#8 @SergeyBiryukov
4 years ago

  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing

Thanks for the patch! I have a few concerns with the current iteration:

  • It doesn't seem to follow any of the existing design patterns in core. Generally, post titles in the in the admin link to the Edit Post screen. For links to the post on the front end, there is typically a "View Post" link.
  • It does not account for custom post types. Instead of using one of existing post type labels, it adds a new string, which cannot be customized.

I would suggest following the pattern from the "In response to" column on the Comments screen:

  • The post title there links to the Edit Post screen.
  • Next to the title, there is a "View Post" link with a view_item post type label.

See 52353.2.diff and 52353.2.png.

@vladytimy
4 years ago

Testing 52353.2.diff with Custom Post Type comment

#9 @hellofromTonya
4 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 5.7 to 5.8

5.7 Beta 1 is happening shortly. Ran out of time to get this ticket into the release. Punting to 5.8.

If any maintainer or committer feels this can be resolved in time, or wishes to assume ownership during a specific cycle, feel free to update the milestone accordingly.

Also marking needs-patch to address Sergey's feedback.

#10 @SergeyBiryukov
4 years ago

  • Keywords has-patch needs-design-feedback added; needs-patch removed

I have already proposed a patch :) Would like some design feedback though.

#11 @trejder
4 years ago

The design look great. Thank you. My only concern is, if "View [post type]" shouldn't be force-placed in second line, i.e. directly under "Comments on" (as proposed in initial report of this feature)?

Because in certain scenarios (certain screen resolution, certain post's title length) it might break in the middle of this two-word phase (3+ word, if post type has a long name) and produce not quite very good looking feeling of having "View" in first line (directly after title) and "[post type]" in second line.

@vladytimy
4 years ago

52353.2.diff on mobile with custom post type

@vladytimy
4 years ago

Adds a line break

@vladytimy
4 years ago

Testing 52353.3.diff with Custom Post Type on mobile

@vladytimy
4 years ago

52353.3.diff on desktop

#12 @vladytimy
4 years ago

I agree with Sergey's approach, considering custom post types and existing design pattern.
However, I only now realized that there is already a view_item link in wp-admin-bar-view (see 52353.3_on_desktop.JPG ) and I don't know how we feel about duplicate links.

On the other hand, the link in the admin bar is missing on mobile view (see 52353.3.on_mobile.JPG ) and we might consider showing this on mobile only.

This ticket was mentioned in Slack in #design by chaion07. View the logs.


4 years ago

#14 @chaion07
4 years ago

  • Keywords needs-design-feedback removed

Removing the label

Version 0, edited 4 years ago by chaion07 (next)

#15 @paaljoachim
4 years ago

I am not sure what design can say about the above suggestions.
Comments on "Post title" (clicking Post title leads to the edit screen) and then having a View post beside it or on the line below sounds like a good idea. If the post title is long the View post link would move to the line below seems like a natural thing to do.

#16 follow-up: @Hareesh Pillai
4 years ago

  • Keywords needs-refresh added; has-patch removed

In the attached patch, I believe

<br /><a href="%s">%s</a>

should be

<br /><a href="%1$s">%2$s</a>

This ticket was mentioned in Slack in #core by lukecarbis. View the logs.


3 years ago

@lukecarbis
3 years ago

Same as third patch, but with numbered placeholders.

#18 in reply to: ↑ 16 @SergeyBiryukov
3 years ago

  • Keywords needs-refresh removed

Replying to Hareesh Pillai:

In the attached patch, I believe

<br /><a href="%s">%s</a>

should be

<br /><a href="%1$s">%2$s</a>

Thanks! Just noting that using numbered placeholders in practice only matters for translatable strings (so that translators could change the order where it makes sense to do so), otherwise there is roughly the same amount of both <a href="%1$s">%2$s</a> and <a href="%s">%s</a> instances in core. That said, there is a line using numbered placeholders right above, so that would indeed be more consistent.

Replying to trejder:

The design look great. Thank you. My only concern is, if "View [post type]" shouldn't be force-placed in second line, i.e. directly under "Comments on" (as proposed in initial report of this feature)?

Because in certain scenarios (certain screen resolution, certain post's title length) it might break in the middle of this two-word phase (3+ word, if post type has a long name) and produce not quite very good looking feeling of having "View" in first line (directly after title) and "[post type]" in second line.

Thanks! I went back and forth about including a line break as suggested in 52353.3.diff, but I think it looks better with the "View Post" link next to the title. To address the concern of keeping the link on one line, we can use the existing .comments-view-item-link CSS class, which adds display: inline-block.

#19 @SergeyBiryukov
3 years ago

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

In 50999:

Comments: Include a "View Post" link on the Comments screen for a single post.

This makes it easier to view the post on the front end of the site when moderating comments, without having to open the editor first.

Props trejder, audrasjb, vladytimy, lukecarbis, ayeshrajans, chaion07, paaljoachim, hareesh-pillai, SergeyBiryukov.
Fixes #52353.

This ticket was mentioned in Slack in #core by sergey. View the logs.


3 years ago

Note: See TracTickets for help on using tickets.