Skip to content

9.2.5#439

Closed
skerbis wants to merge 3 commits into
mainfrom
row-fix
Closed

9.2.5#439
skerbis wants to merge 3 commits into
mainfrom
row-fix

Conversation

@skerbis

@skerbis skerbis commented Jul 3, 2026

Copy link
Copy Markdown
Member

Version 9.2.5

Behoben

  • Row/Column-Grundverhalten vereinheitlicht (klassischer Parser + Flex-Repeater) - addColumnElement() wird jetzt in allen relevanten Renderpfaden konsistent in row-Gruppen geführt. Damit ist kein manueller HTML-Workaround mit addHtml('<div class="row">') mehr nötig.
  • Modal-Wrapper auf Bootstrap-Row ausgerichtet - Der Modal-Button-Wrapper rendert jetzt konsistent als row form-group (klassischer Parser und Flex-Repeater), damit col-*-Spalten erwartungsgemäß funktionieren.

Neu

  • Optionale Row-Klassen für Auto-Column-Gruppen - Für automatisch erzeugte Column-Row-Wrapper können jetzt zusätzliche Klassen per data-group-column-row-class (Alias: data-group-row-class) gesetzt werden.
  • Optionale Row-Klassen für Modal-Wrapper - Zusätzliche Klassen für den Modal-Row-Wrapper sind jetzt per data-modal-row-class (Alias: data-group-row-class) möglich.

Summary by CodeRabbit

  • Neue Funktionen

    • Optionale Row-Klassen für automatisch erzeugte Column- und Modal-Wrapper sind jetzt konfigurierbar.
    • Die neuen Einstellungen lassen sich über passende Attribute anpassen und bieten mehr Kontrolle über das Layout.
  • Behoben

    • Row/Column-Verhalten wurde zwischen verschiedenen Renderpfaden vereinheitlicht.
    • Modal-Wrapper werden jetzt konsistenter als Bootstrap-Row mit form-group ausgegeben.
    • Die Dokumentation wurde um Hinweise und Beispiele zu den neuen Layout-Optionen ergänzt.

@skerbis skerbis requested review from Copilot and removed request for Copilot July 3, 2026 13:05
@coderabbitai

coderabbitai Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@skerbis, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 51 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 39d92bdf-c86a-4a7b-8114-648255746ab6

📥 Commits

Reviewing files that changed from the base of the PR and between 34616a1 and 0f9ebe1.

📒 Files selected for processing (3)
  • lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php
  • lib/MForm/Migration/MBlockToRepeaterConverter.php
  • lib/MForm/Parser/MFormParser.php

Moin! Hier kommt das Feld-Report zu den neuen Row-Klassen.

Walkthrough

Diese PR führt konfigurierbare optionale Row-Klassen für automatisch erzeugte Column-Wrapper (data-group-column-row-class) und Modal-Wrapper (data-modal-row-class, jeweils mit Alias data-group-row-class) ein, in klassischem Parser, Flex-Repeater-Renderer und Modal-Fragment, ergänzt um Doku, Changelog und Versionsbump auf 9.2.5.

Changes

Row-Klassen-Feature

Layer / File(s) Summary
Klassischer Parser: Row-Klasse für start-group-column
lib/MForm/Parser/MFormParser.php
openWrapperElement hängt data-group-column-row-class/data-group-row-class an die Element-Klasse und entfernt die Attribute danach.
Flex-Repeater: Auto-Gruppierung und Row-Klassen
lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php
renderTemplate gruppiert Items über addColumnGroupExtensionItems, berechnet Row-Klassen für start-group-column und modal und übergibt sie an das um $rowClass erweiterte renderModalBlock.
Modal-Wrapper-Fragment: row form-group
fragments/mform/mform_wrapper.php
Der modal-Case parst die Row-Klassen-Attribute und rendert den Wrapper neu als row form-group mfr-modal-wrapper.
Doku, Changelog und Versionsbump
docs/05_wrapper.md, CHANGELOG.md, package.yml
Dokumentation und Beispiel für addModalElement() aktualisiert, Changelog-Eintrag für 9.2.5 ergänzt, Paketversion angehoben.

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
Loading

Related Issues: Keine Angaben in den bereitgestellten Daten.
Related PRs: Keine Angaben in den bereitgestellten Daten.
Suggested labels: enhancement, documentation
Suggested reviewers: Keine Angaben in den bereitgestellten Daten.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Title check ❓ Inconclusive Der Titel ist nur die Versionsnummer und beschreibt die Änderungen nicht ausreichend. Verwende einen kurzen, aussagekräftigen Titel, z. B. „Version 9.2.5: Row-/Column- und Modal-Wrapper vereinheitlichen“.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch row-fix

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skerbis

skerbis commented Jul 3, 2026

Copy link
Copy Markdown
Member Author

@dpf-dd bitte testen

Copilot AI review requested due to automatic review settings July 3, 2026 13:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a row wrapper consistently).
  • Modal trigger wrapper output is standardized to row form-group in 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.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php (1)

82-104: 📐 Maintainability & Code Quality | 🔵 Trivial

Gleiches Muster wie in MFormParser.php – dreifache Codeduplikation für Row-Class-Auflösung.

Die Kombination aus isset() + is_string() + trim() + Alias-Merge für data-*-row-class taucht praktisch identisch an vier Stellen auf: hier zweimal (Modal-Zweig, Column-Zweig), in MFormParser::openWrapperElement() und als Regex-Variante in mform_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

📥 Commits

Reviewing files that changed from the base of the PR and between 39f99b4 and 34616a1.

📒 Files selected for processing (6)
  • CHANGELOG.md
  • docs/05_wrapper.md
  • fragments/mform/mform_wrapper.php
  • lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php
  • lib/MForm/Parser/MFormParser.php
  • package.yml

Comment thread lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php
Comment thread lib/MForm/Parser/MFormParser.php
@skerbis skerbis closed this Jul 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants