Fix recurring amount fields clipped in membership edit sidebar#350
Fix recurring amount fields clipped in membership edit sidebar#350superdav42 merged 1 commit intomainfrom
Conversation
The three fields (amount, duration, duration unit) were all on one row in a ~238px sidebar, causing the duration number input to be nearly invisible. Switch to a two-row wrapped flex layout: amount on the first row, duration number and unit on the second row. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
📝 WalkthroughWalkthroughA single file receives CSS class adjustments to the membership pricing form. The recurring amount group container gains flex-wrap support, and sub-field wrapper classes are updated to modify spacing and width behavior for improved layout control. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
inc/admin-pages/class-membership-edit-admin-page.php (1)
664-664: Optional: make flex behavior explicit on the group container.
wu-flex-wraponly works if the container is alreadydisplay:flex. If that default ever changes in the form renderer, wrapping would silently stop working.♻️ Suggested hardening
- 'classes' => 'wu-flex-wrap', + 'classes' => 'wu-flex wu-flex-wrap',🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@inc/admin-pages/class-membership-edit-admin-page.php` at line 664, The group container currently only has the 'wu-flex-wrap' class which assumes the element is already display:flex; update the classes for that container (the array entry with key 'classes' in class-membership-edit-admin-page.php) to explicitly enable flex by adding the appropriate display class (e.g., 'wu-flex' or 'wu-flex-row') alongside 'wu-flex-wrap' so wrapping cannot break if defaults change; ensure both classes are present in the 'classes' value for the same container.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@inc/admin-pages/class-membership-edit-admin-page.php`:
- Line 664: The group container currently only has the 'wu-flex-wrap' class
which assumes the element is already display:flex; update the classes for that
container (the array entry with key 'classes' in
class-membership-edit-admin-page.php) to explicitly enable flex by adding the
appropriate display class (e.g., 'wu-flex' or 'wu-flex-row') alongside
'wu-flex-wrap' so wrapping cannot break if defaults change; ensure both classes
are present in the 'classes' value for the same container.
🔨 Build Complete - Ready for Testing!📦 Download Build Artifact (Recommended)Download the zip build, upload to WordPress and test:
🌐 Test in WordPress Playground (Very Experimental)Click the link below to instantly test this PR in your browser - no installation needed! Login credentials: |
Summary
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit