Skip to content

Conversation

@vonloxx
Copy link
Collaborator

@vonloxx vonloxx commented Jan 23, 2026

The Tree component now properly renders child nodes for custom tags instead of only passing attributes. This enables custom tag handlers to receive and render nested content.

Changes:

  • Render child nodes before passing to CustomTag component
  • Add block prop to CustomTag for access to block data
  • Use trim() for robust whitespace handling in innerBlocks detection
  • Remove outdated self-closing elements comment

Supporting improvements:

  • Migrate to React 19 automatic JSX runtime
  • Update WordPress parser dependency to v5.38.0
  • Add comprehensive block render test suite (30+ tests)
  • Remove redundant parser tests

The Tree component now properly renders child nodes for custom tags instead of only passing attributes. This enables custom tag handlers to receive and render nested content.

Changes:
- Render child nodes before passing to CustomTag component
- Add block prop to CustomTag for access to block data
- Use trim() for robust whitespace handling in innerBlocks detection
- Remove outdated self-closing elements comment

Supporting improvements:
- Migrate to React 19 automatic JSX runtime
- Update WordPress parser dependency to v5.38.0
- Add comprehensive block render test suite (30+ tests)
- Remove redundant parser tests
- Add GitHub Actions CI workflow (.github/workflows/ci.yml)
  - Runs on Node 18.x and 20.x
  - Lints, builds, and tests on push and pull requests
- Add ESLint flat config (eslint.config.js)
  - Configured for ES modules and JSX
  - Includes globals for test suite
- Add npm scripts: lint and lint:fix
- Add "type": "module" to package.json
- Add ESLint dependencies: @eslint/js, eslint, eslint-plugin-react
- Add eslint-disable comments for JSX dynamic components
- Update Babel preset-env to not transpile modules (modules: false)
- Add .js file extensions to all import paths for ESM compatibility
- Update build test script to run 'npm run build' before 'node --test'

This allows the package to work properly as an ES module with explicit file extensions required by Node.js ESM resolution. All 30 block rendering tests now pass.
- Project overview and features
- Installation instructions
- Basic and advanced usage examples
- Custom block and tag handlers
- Complete API documentation
- Supported core blocks list
- Development guide (build, test, lint)
- CI/CD information
- Browser support and metadata
@vonloxx vonloxx merged commit 90024ea into main Jan 23, 2026
1 check passed
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