Automattic / Automattic/jetpack

Block Editor Tools: revisit registration and directory structure

Open
#16,816 4 comments 1 reaction 0 assignees View on GitHub
[Focus] Blocks [Pri] Normal [Type] Janitorial
Dominant language
PHP
Stars
1.8k
Forks
898
Avg merge
1d 18h
Merged PRs (30d)
774

Description

Following-up from this comment and the conversation above:
https://github.com/Automattic/jetpack/pull/16746#issuecomment-672771493

> As we extend the type of editor tools we have in Jetpack (blocks, extended core blocks, sidebar plugins), I think it would be worth revisiting our directory structure in `/extensions`, as well as our registration tools.
>
> Maybe we could have `jetpack_register_block`, `jetpack_extend_block`, and `jetpack_register_plugin`, all handling plan gating behind the scenes, and have a matching directory structure like:
>
```
extensions
|
`- shared -- for utilties
- blocks -- for blocks created by Jetpack
- plugins -- for sidebar plugins like Social Previews, shortlinks, Publicize, ...
- extended-blocks -- for things like the VideoPress feature, the cover block extension, ...
```
>
> This is not a small refactor, but I think it would be worth it to avoid further confusion in future work, by all the teams that contribute blocks to Jetpack.

cc @getdave @marekhrabe @retrofox @pablinos

This feels even more relevant now that we're working on updating the Paid flows (#16611).

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing /extensions directory and the registration tools discussed in the linked pull-request comment. Determine how blocks, extended blocks, sidebar plugins, shared utilities, and plan gating are currently organized; done would mean an agreed directory structure and registration approach that avoids confusion for future Jetpack contributors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
frontend, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.