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

Copilot AI 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
File Description
web/app/themes/wordpress-starter-template/webpack.config.js Builds theme assets + per-block bundles; copies block metadata/templates; adds dependency extraction + BrowserSync.
web/app/themes/wordpress-starter-template/tsconfig.json Updates TS target/module settings and scopes compilation to assets/ + blocks/.
web/app/themes/wordpress-starter-template/theme.json Adds custom design tokens for the sample digital clock block.
web/app/themes/wordpress-starter-template/style.css Updates theme header to require PHP 8.5.
web/app/themes/wordpress-starter-template/src/ThemeOptions.php Adds a Settings API–driven Theme Options admin page and sanitization.
web/app/themes/wordpress-starter-template/readme.txt Updates documented PHP requirement to 8.5.
web/app/themes/wordpress-starter-template/postcss.config.js Removes PostCSS/Tailwind configuration.
web/app/themes/wordpress-starter-template/package.json Updates scripts/deps for new webpack/blocks toolchain; removes Tailwind/jQuery-era deps.
web/app/themes/wordpress-starter-template/functions.php Adds theme autoloader, registers built blocks, switches to WP asset metadata for enqueues (no jQuery).
web/app/themes/wordpress-starter-template/eslint.config.mjs Expands linting to TSX; removes tailwind/postcss config targeting.
web/app/themes/wordpress-starter-template/blocks/digital-clock/view.ts Adds Alpine-based frontend behavior for the sample block.
web/app/themes/wordpress-starter-template/blocks/digital-clock/time.ts Adds shared time formatting utility for editor + frontend.
web/app/themes/wordpress-starter-template/blocks/digital-clock/style.css Adds block styling based on theme.json custom tokens + WP presets.
web/app/themes/wordpress-starter-template/blocks/digital-clock/render.php Adds server-side render template for frontend markup/time.
web/app/themes/wordpress-starter-template/blocks/digital-clock/index.tsx Adds React editor implementation and block registration.
web/app/themes/wordpress-starter-template/blocks/digital-clock/block.json Declares block metadata and links built editor/style/view assets.
web/app/themes/wordpress-starter-template/assets/wordpress.d.ts Adds minimal TS declarations for @wordpress/block-editor usage.
web/app/themes/wordpress-starter-template/assets/main.tsx Removes old entrypoint (Tailwind import + HMR stub).
web/app/themes/wordpress-starter-template/assets/main.ts Adds new entrypoint that boots Alpine and imports theme CSS.
web/app/themes/wordpress-starter-template/assets/main.css Replaces Tailwind import with placeholder theme stylesheet.
web/app/themes/wordpress-starter-template/assets/global.d.ts Declares window.Alpine typing for TS.
Dockerfile Pins PHP 8.5 image; installs composer binary into the WP image.
docker-compose.yml Runs composer service from project Dockerfile so composer uses the same PHP version.
composer.lock Updates lockfile after dependency removals/updates.
composer.json Requires PHP >=8.5; removes Carbon Fields and custom directory installer.
.gitignore Stops ignoring /web/app/vendor (no longer used for Carbon Fields install path).
.devcontainer/Dockerfile Removes devcontainer setup.
.devcontainer/docker-compose.yml Removes devcontainer compose setup.
.devcontainer/devcontainer.json Removes devcontainer configuration.
.devcontainer/config/php.ini Removes devcontainer PHP ini.
.devcontainer/config/nginx.conf Removes devcontainer nginx config.
.devcontainer/.gitignore Removes devcontainer gitignore.
.devcontainer/.env.example Removes 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 free to 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