Skip to content

feat: various repo maintenance tasks done - #287

Open
joaquimds wants to merge 2 commits into
mainfrom
feat/repo-clean-2026-06-11
Open

feat: various repo maintenance tasks done#287
joaquimds wants to merge 2 commits into
mainfrom
feat/repo-clean-2026-06-11

Conversation

@joaquimds

Copy link
Copy Markdown
Member
  • Upgrade PHP to 8.5
  • Remove tailwind (not used for WordPress block themes)
  • Remove jquery dependency
  • Include sample WordPress block
  • Remove Carbon Fields (no longer required, flakey dependency)
  • Include sample theme options page

- Upgrade PHP to 8.5
- Remove tailwind (not used for WordPress block themes)
- Remove jquery dependency
- Include sample WordPress block
- Remove Carbon Fields (no longer required, flakey dependency)
- Include sample theme options page

CopilotAI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the starter template’s tooling and theme implementation by upgrading the PHP baseline, simplifying the front-end toolchain, and adding a reference block + theme options page aligned with modern WordPress block themes.

Changes:

  • Upgraded baseline requirements to PHP 8.5 and aligned local Docker/composer tooling accordingly.
  • Reworked theme asset pipeline: removed Tailwind/PostCSS + jQuery dependency, added WordPress dependency extraction, block build outputs, and BrowserSync dev proxy.
  • Added a sample “Digital Clock” block (editor React + frontend Alpine) and a sample Settings API–based Theme Options page.

Reviewed changes

Copilot reviewed 29 out of 35 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
web/app/themes/wordpress-starter-template/webpack.config.jsBuilds theme assets + per-block bundles; copies block metadata/templates; adds dependency extraction + BrowserSync.
web/app/themes/wordpress-starter-template/tsconfig.jsonUpdates TS target/module settings and scopes compilation to assets/ + blocks/.
web/app/themes/wordpress-starter-template/theme.jsonAdds custom design tokens for the sample digital clock block.
web/app/themes/wordpress-starter-template/style.cssUpdates theme header to require PHP 8.5.
web/app/themes/wordpress-starter-template/src/ThemeOptions.phpAdds a Settings API–driven Theme Options admin page and sanitization.
web/app/themes/wordpress-starter-template/readme.txtUpdates documented PHP requirement to 8.5.
web/app/themes/wordpress-starter-template/postcss.config.jsRemoves PostCSS/Tailwind configuration.
web/app/themes/wordpress-starter-template/package.jsonUpdates scripts/deps for new webpack/blocks toolchain; removes Tailwind/jQuery-era deps.
web/app/themes/wordpress-starter-template/functions.phpAdds theme autoloader, registers built blocks, switches to WP asset metadata for enqueues (no jQuery).
web/app/themes/wordpress-starter-template/eslint.config.mjsExpands linting to TSX; removes tailwind/postcss config targeting.
web/app/themes/wordpress-starter-template/blocks/digital-clock/view.tsAdds Alpine-based frontend behavior for the sample block.
web/app/themes/wordpress-starter-template/blocks/digital-clock/time.tsAdds shared time formatting utility for editor + frontend.
web/app/themes/wordpress-starter-template/blocks/digital-clock/style.cssAdds block styling based on theme.json custom tokens + WP presets.
web/app/themes/wordpress-starter-template/blocks/digital-clock/render.phpAdds server-side render template for frontend markup/time.
web/app/themes/wordpress-starter-template/blocks/digital-clock/index.tsxAdds React editor implementation and block registration.
web/app/themes/wordpress-starter-template/blocks/digital-clock/block.jsonDeclares block metadata and links built editor/style/view assets.
web/app/themes/wordpress-starter-template/assets/wordpress.d.tsAdds minimal TS declarations for @wordpress/block-editor usage.
web/app/themes/wordpress-starter-template/assets/main.tsxRemoves old entrypoint (Tailwind import + HMR stub).
web/app/themes/wordpress-starter-template/assets/main.tsAdds new entrypoint that boots Alpine and imports theme CSS.
web/app/themes/wordpress-starter-template/assets/main.cssReplaces Tailwind import with placeholder theme stylesheet.
web/app/themes/wordpress-starter-template/assets/global.d.tsDeclares window.Alpine typing for TS.
DockerfilePins PHP 8.5 image; installs composer binary into the WP image.
docker-compose.ymlRuns composer service from project Dockerfile so composer uses the same PHP version.
composer.lockUpdates lockfile after dependency removals/updates.
composer.jsonRequires PHP >=8.5; removes Carbon Fields and custom directory installer.
.gitignoreStops ignoring /web/app/vendor (no longer used for Carbon Fields install path).
.devcontainer/DockerfileRemoves devcontainer setup.
.devcontainer/docker-compose.ymlRemoves devcontainer compose setup.
.devcontainer/devcontainer.jsonRemoves devcontainer configuration.
.devcontainer/config/php.iniRemoves devcontainer PHP ini.
.devcontainer/config/nginx.confRemoves devcontainer nginx config.
.devcontainer/.gitignoreRemoves devcontainer gitignore.
.devcontainer/.env.exampleRemoves devcontainer env example.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


wp_enqueue_style('theme-custom-style', $fileRoot . '/main.css', [], $VERSION, 'all');
wp_enqueue_script('theme-custom-script', $fileRoot . '/main.js', ['jquery'], $VERSION, true);
wp_enqueue_style('theme-main', get_theme_file_uri('build/main.css'), [], filemtime(get_theme_file_path('build/main.css')));
Comment on lines +31 to +36
public static function get(string $name, $default = '')
{
$options = get_option(self::OPTION, []);

return $options[$name] ?? $default;
}
Comment on lines +17 to +26
const blocksDir = path.resolve(__dirname, "blocks");
const blockEntries = {};
for (const block of fs.readdirSync(blocksDir)) {
for (const file of ["index.tsx", "view.ts"]) {
const entryFile = path.join(blocksDir, block, file);
if (fs.existsSync(entryFile)) {
blockEntries[`${block}/${path.parse(file).name}`] = entryFile;
}
}
}
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@joaquimds