Conversation
|
Warning Review limit reached
Next review available in: 51 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
Moin! Hier kommt das Feld-Report zu den neuen Row-Klassen. WalkthroughDiese PR führt konfigurierbare optionale Row-Klassen für automatisch erzeugte Column-Wrapper ( ChangesRow-Klassen-Feature
Estimated code review effort: 3 (Moderate) | ~25 minutes Sequence Diagram(s)sequenceDiagram
participant Renderer as MFormFlexRepeaterRenderer
participant Helper as MFormGroupExtensionHelper
participant Modal as renderModalBlock
Renderer->>Helper: addColumnGroupExtensionItems(items)
Helper-->>Renderer: gruppierte Items
Renderer->>Renderer: extrahiere data-group-column-row-class / data-group-row-class
Renderer->>Renderer: extrahiere data-modal-row-class / data-group-row-class
Renderer->>Modal: renderModalBlock(rowClass)
Modal-->>Renderer: HTML mit row-Klasse
Related Issues: Keine Angaben in den bereitgestellten Daten. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✨ 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 |
|
@dpf-dd bitte testen |
There was a problem hiding this comment.
Pull request overview
This PR bumps MForm to 9.2.5 and aligns Row/Column and Modal wrapper rendering between the classic parser and the Flex-Repeater template renderer, eliminating the need for manual HTML row workarounds and adding opt-in CSS class hooks for generated row wrappers.
Changes:
- Flex-Repeater templates now apply the same auto column-grouping behavior as the classic parser (
addColumnElement()produces arowwrapper consistently). - Modal trigger wrapper output is standardized to
row form-groupin both render paths, with optional extra row classes. - New optional attributes to extend auto-generated row wrapper classes:
- Column auto-group row:
data-group-column-row-class(alias:data-group-row-class) - Modal row wrapper:
data-modal-row-class(alias:data-group-row-class) - Documentation + changelog updated accordingly.
- Column auto-group row:
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.yml | Version bump to 9.2.5. |
| lib/MForm/Parser/MFormParser.php | Classic parser: consumes new column-row-class attributes and merges them into the auto start-group-column wrapper class. |
| lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php | Flex renderer: adds column auto-grouping, aligns modal wrapper to row form-group, and supports optional row-class attributes for modal/column wrappers. |
| fragments/mform/mform_wrapper.php | Classic fragment: modal wrapper switched to row form-group and supports parsing optional modal/group row classes. |
| docs/05_wrapper.md | Documents new attributes and the unified row/column behavior. |
| CHANGELOG.md | Adds 9.2.5 release notes matching the described behavior changes. |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php (1)
82-104: 📐 Maintainability & Code Quality | 🔵 TrivialGleiches Muster wie in
MFormParser.php– dreifache Codeduplikation für Row-Class-Auflösung.Die Kombination aus
isset()+is_string()+trim()+ Alias-Merge fürdata-*-row-classtaucht praktisch identisch an vier Stellen auf: hier zweimal (Modal-Zweig, Column-Zweig), inMFormParser::openWrapperElement()und als Regex-Variante inmform_wrapper.php. Eine kleine statische Helper-Methode (z. B.resolveRowClass(array $attrs, string $primaryKey, string $aliasKey = 'data-group-row-class'): string) würde die Logik zentralisieren und künftige Inkonsistenzen zwischen den Layern vermeiden.Funktional ist der aktuelle Code aber korrekt.
Also applies to: 185-197, 547-555
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php` around lines 82 - 104, The row-class resolution logic is duplicated across the modal/column branches in MFormFlexRepeaterRenderer and matches the same pattern used elsewhere, so centralize it in a small helper such as resolveRowClass() to keep the data-modal-row-class/data-group-row-class merge and trim behavior consistent. Update the render flow to call that helper from the relevant render methods (including the modal block path) and reuse the same symbol names in MFormFlexRepeaterRenderer so future changes only need to be made once.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php`:
- Around line 185-197: The row attribute filtering in
MFormFlexRepeaterRenderer::render still leaves non-string values for
data-group-column-row-class and data-group-row-class inside $attrs, so they get
rendered on the row <div>. Update the attribute handling in the same block so
these keys are removed from $attrs regardless of value type, while only string
values are used to build $rowExtraClass; keep the change aligned with the
existing logic in renderAttributes() and the surrounding class assembly.
In `@lib/MForm/Parser/MFormParser.php`:
- Around line 307-318: The start-group-column handling in
MFormParser::parseAttributes leaves invalid values in $attributes when
data-group-column-row-class or data-group-row-class is present but not a string.
Update the start-group-column branch so both attributes are always unset after
inspection, regardless of type, while only string values are appended via
setClass(); this keeps parseAttributes from passing bad attributes through to
the start-group-column wrapper output in mform_wrapper.php.
---
Nitpick comments:
In `@lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php`:
- Around line 82-104: The row-class resolution logic is duplicated across the
modal/column branches in MFormFlexRepeaterRenderer and matches the same pattern
used elsewhere, so centralize it in a small helper such as resolveRowClass() to
keep the data-modal-row-class/data-group-row-class merge and trim behavior
consistent. Update the render flow to call that helper from the relevant render
methods (including the modal block path) and reuse the same symbol names in
MFormFlexRepeaterRenderer so future changes only need to be made once.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 5140a2bd-237f-40fc-973f-b25d6615b6fb
📒 Files selected for processing (6)
CHANGELOG.mddocs/05_wrapper.mdfragments/mform/mform_wrapper.phplib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.phplib/MForm/Parser/MFormParser.phppackage.yml
Version 9.2.5
Behoben
addColumnElement()wird jetzt in allen relevanten Renderpfaden konsistent inrow-Gruppen geführt. Damit ist kein manueller HTML-Workaround mitaddHtml('<div class="row">')mehr nötig.row form-group(klassischer Parser und Flex-Repeater), damitcol-*-Spalten erwartungsgemäß funktionieren.Neu
data-group-column-row-class(Alias:data-group-row-class) gesetzt werden.data-modal-row-class(Alias:data-group-row-class) möglich.Summary by CodeRabbit
Neue Funktionen
Behoben
form-groupausgegeben.