You can add a review, opinion, greeting, etc. comment type but not change the "Add new comment" text

Created on 5 August 2015, over 9 years ago
Updated 5 May 2023, over 1 year ago

Problem/Motivation

Follow-up to #2228763: Create a comment-type config entity and use that as comment bundles, require selection in field settings form β†’ . At the moment the comment form heading always says "Add new comment" on the form. If you have a specific comment type like "Greeting" you probably want it to say "Write greeting" instead.

Proposed resolution

Provide settings on the comment type config entity, similar to "Submission form settings" for content types where you can configure the form heading (defaults to "Add new comment"). The "Comments" label is taken from and can already be modified in the field settings.

Remaining tasks

Adopt the existing patch from #25 based on comments from #41:

  • needs hook_update_n() implementation to update all existing comment types
  • get rid of entity loading in preprocess
  • $this-t() should be used in forms
  • there's no reason for empty() check for default_value

User interface changes

New setting on the field.

API changes

Likely none. Config schema is expanded.

Data model changes

Config is expanded.

πŸ“Œ Task
Status

Needs work

Version

10.1 ✨

Component
CommentΒ  β†’

Last updated 12 days ago

Created by

πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024