feat: fix Tree component to render custom tag children#12
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Supporting improvements: