Updated: Comment #0

Problem/Motivation

Current list of issues #1847540-4: [META] Clean up comment module tests and decouple from node

There's a functions:
comment_int_to_alphadecimal(), comment_alphadecimal_to_int() - used only within Comment entity #2157703: Deprecate comment_int_to_alphadecimal() & comment_alphadecimal_to_int() in favour of methods in Number component
_comment_get_modes() - is not used at all #2157695: Remove unused _comment_get_modes()
comment_count_unpublished() - localtask title callback #2111357: Get rid of comment_count_unpublished() in favor of CommentStorage method
comment_num_new() - calculate a number of new comments for entity #2097123: Deprecate comment_num_new() in favour of method on CommentManager
comment_get_thread() - query a vomments thread #2156089: Remove comment_get_thread() in favour of method on CommentStorage
_comment_per_page() - used once in settings form, in comment field used only in instance settings form

comment_get_recent() - converted to view, outdated #2054993: Remove (untested, unused, broken) comment_get_recent()
comment_add() - creates comment add form, could be moved to CommentManager service to be re-used by any contrib

Proposed resolution

Find better place for helpers

Remaining tasks

Figure out usage
Create patch
Wait if needed for #731724: Convert comment settings into a field to make them work with CMI and non-node entities

User interface changes

no

API changes

probably

get consensus #1961548: [Policy, no patch] Decide how the module-specific services are made available as static methods (similar to \Drupal::$service())
#1847540: [META] Clean up comment module tests and decouple from node

conversions
#1978904: Convert comment_admin() to a Controller
#2157695: Remove unused _comment_get_modes()
#2157703: Deprecate comment_int_to_alphadecimal() & comment_alphadecimal_to_int() in favour of methods in Number component
#2111357: Get rid of comment_count_unpublished() in favor of CommentStorage method and #2318539: Move CommentStorage::getUnapprovedCount() to CommentManager Assigned to: roderik
#2097123: Deprecate comment_num_new() in favour of method on CommentManager Assigned to: roderik
#2156089: Remove comment_get_thread() in favour of method on CommentStorage Assigned to: roderik
#2054993: Remove (untested, unused, broken) comment_get_recent() & #1938062: Convert the recent_comments block to a view
#1986606: Convert the comments administration screen to a view
#1975962: Move comment_links() into CommentRenderController Assigned to: wim leers
#2054213: Deprecate comment_load_multiple() in favour of entity_load_multiple()
#2289989: Remove comment_add and inline final occurrence Assigned to: marcingy
#2318579: Remove comment_prepare_thread()

Comments

andypost’s picture

Issue summary: View changes

Updated issue summary.

andypost’s picture

Issue summary: View changes

Updated issue summary.

andypost’s picture

Title: Implement CommentManager service and clean-up helper functions » [meta] Implement CommentManager service and clean-up helper functions

better title

andypost’s picture

Issue summary: View changes

Updated issue summary.

andypost’s picture

Issue summary: View changes
roderik’s picture

Created #2262407: Deprecate comment_get_display_page/ordinal() which I think is also a child issue of this. Could you review if that's the case?

[ edit: hmz. Child vs. related. Proper bookkeeping after I know your idea about this? :) ]

marcingy’s picture

Issue summary: View changes
andypost’s picture

andypost’s picture

there's only few left:
- comment_preview() - could be done in #2188287: Split CommentManager in two
- comment_prepare_author() - no idea, used in preprocess
- comment_prepare_thread() - could be a method on comment entity
- comment_view_multiple() & comment_view() needs separate issue

roderik’s picture

Issue summary: View changes

Here's one of them...

andypost’s picture

Status: Active » Closed (duplicate)

Duplicate of #2371331: [META] Comment/Forum/History roadmap

@roderik mostly all issues in that meta.and #2188287: Split CommentManager in two better place to clean-up comment manager