Center the labels in the variant table#17577
Conversation
WalkthroughThe pull request introduces visual enhancements to the Sylius Admin Bundle's product variant grid. Specifically, the changes center the content of the Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/Sylius/Bundle/AdminBundle/templates/product_variant/grid/field/inventory.html.twig (1)
1-10: LGTM! Consider adding a test attribute for consistency.The centering implementation looks good and maintains all existing functionality. The template properly handles all inventory states (tracked/untracked) while improving visual alignment.
Consider adding a test attribute to the wrapper div for consistency with other elements:
-<div class="text-center"> +<div class="text-center" {{ sylius_test_html_attribute('inventory-wrapper') }}>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Sylius/Bundle/AdminBundle/Resources/config/grids/product_variant.yml(1 hunks)src/Sylius/Bundle/AdminBundle/templates/product_variant/grid/field/inventory.html.twig(1 hunks)
🔇 Additional comments (1)
src/Sylius/Bundle/AdminBundle/Resources/config/grids/product_variant.yml (1)
28-29: LGTM! Verify visual consistency across all browsers.
The text-center class has been consistently applied to the enabled, inventory, and position columns, which aligns with the PR objective. The implementation maintains all existing grid functionality while improving visual presentation.
Let's verify if there are any other grid columns that might benefit from similar alignment:
Also applies to: 36-37, 45-46
✅ Verification successful
Based on the search results, I can see that text-center alignment is consistently used across various grid configurations for similar types of columns. The changes in the product variant grid align with this pattern, particularly for columns showing statuses, counts, and positions.
LGTM! The text-center alignment follows established patterns.
The text-center class has been applied consistently with other grids in the system where similar column types exist:
- Shipping state columns use text-center (shipment.yml)
- Date columns use text-center (payment.yml, shipment.yml)
- Status columns use text-center (product_review.yml)
- Position columns use text-center (product_option.yml, shipping_method.yml)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Search for other grid field definitions that might need alignment
rg --type yaml "type: twig" "src/Sylius/Bundle/AdminBundle/Resources/config/grids/" -A 5 -B 2
Length of output: 65630
Bunnyshell Preview Environment deletedAvailable commands:
|
Summary by CodeRabbit
New Features
enabled,inventory, andpositionfields in the product variant grid by centering the content.Bug Fixes