Problem/Motivation

The page title for comment type edit form is just "Edit". This is pretty confusing because it doesn't contextualize the local tasks, but also leads into incorrect breadcrumbs on the subpages as reported in #2587415: Comment types UI confusing and inconsistent.

Proposed resolution

Change the page title to the current comment type.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Issue fork drupal-3374626

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

lauriii’s picture

Status: Active » Needs review
StatusFileSize
new2.1 KB
smustgrave’s picture

Status: Needs review » Needs work

Agree the title could be updated.

I checked content types and media types
Content types = Edit Article content type
Media type = Edit Audio

So can we use Edit [comment-type-name] or Edit [comment-type-name] comment type

dhirendra.mishra made their first commit to this issue’s fork.

lauriii’s picture

Status: Needs work » Needs review
Issue tags: -undefined +Field UX
StatusFileSize
new3.51 KB
new2.2 KB

We might be adjusting or getting rid of some of these title overrides in #3370946: Page title should contextualize the local navigation but agree that it makes sense to be consistent here. 👍

Status: Needs review » Needs work

The last submitted patch, 7: 3374626-7.patch, failed testing. View results

lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new3.65 KB
new1.58 KB

Couple small improvements after a self-review. 😇

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Title change looks good.

Edit Default comments comment type

longwave’s picture

Status: Reviewed & tested by the community » Needs work
+++ b/core/modules/comment/comment.routing.yml
@@ -135,7 +135,7 @@ entity.comment_type.edit_form:
+    _title_callback: '\Drupal\comment\Controller\CommentTypeController::commentTypeTitle'

I think this can use \Drupal\Core\Entity\Controller\EntityController::title then we don't need a custom controller or method.

longwave’s picture

Issue tags: +ddd2023
lauriii’s picture

Status: Needs work » Needs review
StatusFileSize
new2.66 KB
new1.35 KB

Makes sense 👍

penyaskito’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new21.97 KB

LGTM. Surprised this wasn't reported until 2023.

Static review looks good. Actually tested the patch, attached screenshot.

dhirendra.mishra’s picture

dhirendra.mishra’s picture

Please ignore #16 , Created by mistake

  • longwave committed 95dcdb3f on 11.x
    Issue #3374626 by lauriii, penyaskito, smustgrave, longwave: Comment...
longwave’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed 95dcdb3f58 to 11.x. Thanks!

Discussed with @lauriii at Drupal Dev Days and decided not to commit to 10.1.x as there is a new translatable string, it's a UI bug that has existed for a long time and it can wait for 10.2.x.

Status: Fixed » Closed (fixed)

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