Problem/Motivation

Breadcrumbs on the comment edit and comment delete page includes 'comment-permalink' which is nuffy.

Proposed resolution

Build a proper title callback for comment canonical route
Display comment parent in breadcrumbs is any

Remaining tasks

Patch
Review

User interface changes

Change to breadcrumbs to

API changes

None

Beta phase evaluation

Reference: https://www.drupal.org/core/beta-changes
Issue category Bug because busted UX
Issue priority Normal because breadcrumbs are meh
Prioritized changes The main goal of this issue is usability. This is a prioritized change for the beta phase.
Disruption 3/5s of stuff-all

Comments

larowlan’s picture

Title: Breadcrumns for comment-editing are pants » Breadcrumbs for comment-editing are pants
dawehner’s picture

Isn't the problem "just" that we choose a bad title and not rely on the comment label by default?

larowlan’s picture

Issue tags: +Novice

Yes

hussainweb’s picture

Status: Active » Needs review
StatusFileSize
new1.39 KB

Initial attempt. Do you think this needs tests?

hussainweb’s picture

StatusFileSize
new21.51 KB

Here is a screenshot with the patch.

larowlan’s picture

Yes please to test, can be phpunit if preferred.
Also I think changing route title would also resolve this

idebr’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

Settings to 'Needs work' per #6

nemethf’s picture

Issue summary: View changes

The strange breadcrumb link is available on the comment delete confirmation page as well.

nemethf’s picture

Status: Needs work » Needs review
StatusFileSize
new3.24 KB
new2.38 KB

I added a plus condition for comment delete route on the same way as in #4. Additionally the patch contains 3 tests for breadcrumb on comment pages:

  • comment edit
  • comment delete confirm
  • comment reply
sarav.din33’s picture

Status: Needs review » Needs work
StatusFileSize
new67.38 KB
new59.88 KB
new61.96 KB

I have tested the following three scenarios,

Checking breadcrumb links,

on comment edit (refer: Comment-edit.png) -> Showed comment title as link.
comment edit

on comment delete confirm (refer: Delete-comment.png) -> Showed comment title as link.
delete comment

on comment reply (refer: Comment-reply.png) -> Showed node title as link instead of comment title.
comment reply

Comment edit, comment delete works fine. Comment reply page breadcrumb shows node title instead of comment title. Comment reply should show the previous comment thread title.

andypost’s picture

We need agreement on what to show in breadcrumbs

larowlan’s picture

I think that comment reply should show the commented entity title - which is what we're seeing here - thoughts?

andypost’s picture

My pov:
1) add - commented entity link
2) reply - commented entity link + parent comment subject (could be link with #comment-num but expensive)
3) edit - commented entity link + current comment subject (could be a link as well), as node edit does now
4) delete - commented entity link + current comment subject (could be link as well)

Summary
- always Home >> Commented entity title link
- depending on action: parent or itself

andypost’s picture

Title: Breadcrumbs for comment-editing are pants » Breadcrumbs for comment entity
Issue summary: View changes
Status: Needs work » Needs review
Issue tags: -Novice, -Needs tests, -Needs issue summary update
Parent issue: » #2371331: [META] Comment/Forum/History roadmap
StatusFileSize
new5.24 KB
new4.89 KB
new10.22 KB
new18.41 KB
new17.9 KB
new21.69 KB

Suppose this should be like that

Fix for edit/delete is introduce proper title callback
fix for reply is display parent comment subject

Updated summary

@larowlan Do we need to separate issue to display comment parent subject

Status: Needs review » Needs work

The last submitted patch, 14: 2398075-comment-breadcrumb-14.patch, failed testing.

andypost’s picture

Status: Needs work » Needs review
StatusFileSize
new4.33 KB
new5.08 KB

fix tests by moving them to entity test
PS patch needs cleanup

andypost’s picture

StatusFileSize
new7.28 KB
new6.44 KB

Patch for final review, the only question for me now:
- do we need to check at least "view" access to parent comment and commented entities before display in breadcrumbs?

larowlan’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community
StatusFileSize
new42.86 KB

looks heaps better to me
manual testing

Spoke with @andypost about access on irc - he confirmed that the page not found exception thrown in CommentController::getReplyForm is adequate w.r.t access - as route-level access applies for all of the routes on which the comment breadcrumb builder is displayed.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 3edf291 and pushed to 8.0.x. Thanks!

Thanks for adding the beta evaluation to issue summary.

  • alexpott committed 3edf291 on 8.0.x
    Issue #2398075 by andypost, sarav.din33, larowlan, nemethf, hussainweb:...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.