Problem/Motivation

Part of #3524379: [meta] Remove usage of history module from comment module

Steps to reproduce

Proposed resolution

Move comment/drupal.comment-new-indicator and comment/drupal.node-new-comments-link libraries to history module.

Move usage of these libraries to history module by decorating CommentLinkBuilder service and implementing hook_ENTITY_TYPE_view for comment entities in history module

Update tests

Deprecate the old libraries.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Issue fork drupal-3542540

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

mstrelan created an issue. See original summary.

mstrelan’s picture

Status: Active » Needs review

We could possibly move the usage of these to history.module at the same time, it's a bit odd the way it is, but potentially makes it easier to review.

smustgrave’s picture

Status: Needs review » Needs work

Could we go ahead and move it? MR is line change is pretty manageable so adding more won't be difficult. Just seems goal is to untangle history from comment.

mstrelan’s picture

Issue summary: View changes
Status: Needs work » Needs review

Ok I've moved everywhere the libraries were attached, and associated code. This makes a much larger diff stat, but it has to be either piecemeal like before or all together. A lot of the larger diff stat is for the duplicated test for the decorated service. Can't really avoid that either without losing test coverage. Could probably refactor the tests a bit but not much point since it's moving to contrib and it's easier to review if it doesn't change.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

mstrelan’s picture

Status: Needs work » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

nicxvan’s picture

Took a quick look, looks mostly right. Another test conflict likely from the attribute conversion.

mstrelan’s picture

Status: Needs work » Needs review

Resolved merge conflict due to annotations to attributes conversion in tests. Updated the new test class to also use attributes.

smustgrave’s picture

Does the .libraries need a different deprecated format?

mstrelan’s picture

@smustgrave I don't think so, I followed the Asset Libraries section of How to deprecate.

smustgrave’s picture

Status: Needs review » Needs work

That's my mistake I think I was getting crossed on another ticket for route deprecations. But think deprecations have to be removed in 12 right. If the plan is to remove history in D12.

smustgrave’s picture

@mstrelan you're probably good to self RTBC after that as the rest seems like good deprecations.

mstrelan’s picture

Status: Needs work » Reviewed & tested by the community

Updated to 12.0.0 and RTBC as per #14.

needs-review-queue-bot’s picture

Status: Reviewed & tested by the community » Needs work
StatusFileSize
new91 bytes

The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

smustgrave’s picture

Status: Needs work » Reviewed & tested by the community

Fixed conflict in CommentNewIndicatorTest

  • catch committed f9193e88 on 11.x
    Issue #3542540 by mstrelan, smustgrave: Deprecate comment libraries and...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 11.x, thanks!

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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