Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses UI improvements for custom blocks (specifically group nodes) and standardizes the BatchNorm node type naming across the codebase. The changes span frontend UI adjustments for group block rendering and backend node metadata updates to align PyTorch and TensorFlow BatchNorm definitions with established conventions.
Changes:
- Fixed group block UI by adding CSS overrides for XYFlow's default group node styling
- Improved GroupBlockNode layout with better spacing, repositioned badges, and constrained port positioning (70-90% range instead of full height)
- Standardized BatchNorm node type from "batchnorm2d" to "batchnorm" in backend definitions, aligning with frontend implementation and cross-framework conventions
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| project/frontend/src/index.css | Added CSS rules to remove default styling from XYFlow group nodes (transparent background, no border/padding/shadow) |
| project/frontend/src/components/GroupBlockNode.tsx | Improved group block layout: adjusted spacing, repositioned badges below header, constrained handle positions to 70-90% vertical range, reduced icon size |
| project/block_manager/services/nodes/tensorflow/batchnorm2d.py | Updated node metadata: type "batchnorm2d" → "batchnorm", label "BatchNorm2D" → "Batch Normalization", color and icon updated for consistency |
| project/block_manager/services/nodes/pytorch/batchnorm2d.py | Updated node metadata: type "batchnorm2d" → "batchnorm", label "BatchNorm2D" → "Batch Normalization", description simplified, color changed from primary to accent |
| type="batchnorm", | ||
| label="Batch Normalization", |
There was a problem hiding this comment.
The node type is being changed from "batchnorm2d" to "batchnorm", but the validation logic in validation.py line 327 still includes both "batchnorm" and "batchnorm2d" in the required input check. Since the type is now "batchnorm", the reference to "batchnorm2d" in that list should be removed to avoid confusion. While this change doesn't break functionality (since "batchnorm" is already in the list), it creates technical debt by keeping a reference to a type that no longer exists.
| type="batchnorm", | ||
| label="Batch Normalization", |
There was a problem hiding this comment.
The node type is being changed from "batchnorm2d" to "batchnorm", but the validation logic in validation.py line 327 still includes both "batchnorm" and "batchnorm2d" in the required input check. Since the type is now "batchnorm", the reference to "batchnorm2d" in that list should be removed to avoid confusion. While this change doesn't break functionality (since "batchnorm" is already in the list), it creates technical debt by keeping a reference to a type that no longer exists.
No description provided.