Automattic / Automattic/jetpack

Consolidate on server side rendering for Carousel and Related Posts

Open
#13,029 1 comment 0 reactions 0 assignees View on GitHub
[Block] Tiled Gallery [Feature] Related Posts [Focus] Blocks Enhancement
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Currently our related posts code has two totally different ways of rendering:

Front end:

https://github.com/Automattic/jetpack/blob/master/modules/related-posts/jetpack-related-posts.php#L1656

Back end (for Gutenberg blocks):

https://github.com/Automattic/jetpack/blob/master/modules/related-posts/jetpack-related-posts.php#L335

Same for carousel:

Front end:

https://github.com/Automattic/jetpack/blob/master/modules/carousel/jetpack-carousel.php#L230

Back end (for Gutenberg blocks):

https://github.com/Automattic/jetpack/blob/228097d229756d64d702efe1d1509a62a3f80035/extensions/blocks/tiled-gallery/tiled-gallery.php#L42

It is inefficient and brittle to have two ways of doing this. Let's pick one and consolidate. I propose back-end because it is more cache-friendly and higher performance.

Contributor guide

Open the contributing guide

Research direction

Compare the front-end and back-end rendering paths in modules/related-posts/jetpack-related-posts.php at the referenced lines, and the carousel paths in modules/carousel/jetpack-carousel.php and extensions/blocks/tiled-gallery/tiled-gallery.php. Determine how both Related Posts and Carousel can use one server-side rendering approach; done means the duplicated rendering paths are consolidated without losing Gutenberg block support.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
backend, web-dev
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.