Feature: Tabs 9.1 (ID-frei, modern/vertikal) + Form Builder + Repeater-Demos - #424
Conversation
|
Warning Rate limit exceeded
You’ve run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
WalkthroughMoin — Release 9.1.0: Tabs auf ID‑freies Rendering umgestellt (data‑Attribute), neue Tab‑Attribute (icon/style/layout) und Layout‑Varianten (modern, vertical) hinzugefügt; Form‑Builder erweitert (Model, UI, Codegen, Palette‑Suche), JS‑Tab‑Logik ersetzt Bootstrap, Demos, Lokalisierung und Docs aktualisiert. ChangesTab-System-Refactoring und Form‑Builder Erweiterungen
Estimated code review effort🎯 4 (Complex) | ⏱️ ~75 minutes Possibly related issues
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Pull request overview
Dieses PR erweitert MForm auf Version 9.1 mit einer ID-freien Tab-Implementierung, optionalen Tab-Varianten (modern/vertikal + Icons), Form-Builder-Support sowie neuen Demo-Modulen und aktualisierter Dokumentation.
Changes:
- Tabs: ID-freies Rendering + JS-Handling (scoped pro
.mform-tabs), inkl. Fixes für verschachtelte/Repeater-Kontexte. - Neue Tab-Optionen:
tab-icon,tab-style=modern,tab-layout=vertical(PHP-Parsing + Styles + Form Builder). - Demos & Doku: neue Demo-Module, Changelog/What’s New/Wrapper-/Repeater-/API-Doku ergänzt.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| pages/module/wrapper/tabs_modern_vertical/input.inc | Neues Demo-Input für moderne/vertikale Tabs inkl. Icons |
| pages/module/wrapper/tabs_modern_vertical/output.inc | Neues Demo-Output für Tabs modern/vertikal |
| pages/module/repeater/tabs_repeater_tabs/input.inc | Neues Demo-Input für verschachtelte Tabs + Repeater + Tabs |
| pages/module/repeater/tabs_repeater_tabs/output.inc | Neues Demo-Output (Debug-Ausgabe) für verschachtelte Tabs/Reapeater |
| pages/formbuilder.php | UI im Visual Form Builder um Tab-Icon/Style/Layout erweitert |
| package.yml | Versionsbump auf 9.1.0 |
| lib/MForm/Parser/MFormParser.php | Tab-Wrapper: Klassen für modern/vertikal aus data-group-* ableiten; Attribute bereinigen |
| lib/MForm/MFormElements.php | addTabElement() mappt tab-style/tab-layout auf data-group-tab-* |
| lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php | ID-freies Tab-Markup im Repeater + Auto-Grouping für addTabElement() |
| lang/en_gb.lang | Neue Demo-Labels (EN) |
| lang/de_de.lang | Neue Demo-Labels (DE) |
| fragments/mform/mform_wrapper.php | Tab-Markup auf ID-frei umgestellt + Wrapper-Klassen ausgegeben |
| docs/13_api_reference.md | API-Referenz um Tab-Optionen/Builder-Hinweis ergänzt |
| docs/07_repeater.md | Repeater-Doku für ID-freie Tabs + Auto-Grouping ergänzt |
| docs/05_wrapper.md | Wrapper-Doku um modern/vertical Tabs ergänzt |
| docs/00_whats_new.md | “Update 9.1” Abschnitt ergänzt |
| CHANGELOG.md | Changelog-Eintrag für 9.1.0 ergänzt |
| assets/repeater.js | Repeater-Tab-Handling auf ID-freie Tabs umgestellt (scoped) |
| assets/mform.js | Globales Tab-Handling auf ID-freie Tabs umgestellt (scoped) |
| assets/js/formbuilder.js | Form Builder: Tab-Props erweitert + Code-Emission für Tab-Optionen + Tabs nesting erlaubt |
| assets/css/mform.css | Styles für mform-tabs--modern und mform-tabs--vertical inkl. Dark-Mode-Variablen |
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php (1)
216-224:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winMoin:
aria-selectedwird für aktive Tabs nicht korrekt gesetzt.Bei einem voraktivierten Tab bleibt in Line 223
aria-selectedtrotzdemfalse. Das liefert Screenreadern einen falschen Zustand.Diff-Vorschlag
foreach ($tabsMeta as $idx => $meta) { $tabIcon = isset($meta['attrs']['tab-icon']) ? '<i class="rex-icon ' . htmlspecialchars((string) $meta['attrs']['tab-icon'], ENT_QUOTES) . '"></i> ' : ''; + $isActive = isset($meta['attrs']['data-group-open-tab']) && true === $meta['attrs']['data-group-open-tab']; $navClass = trim( ((isset($meta['attrs']['nav-class'])) ? (string) $meta['attrs']['nav-class'] . ' ' : '') . ((isset($meta['attrs']['pull-right']) && true === $meta['attrs']['pull-right']) ? 'pull-right ' : '') - . ((isset($meta['attrs']['data-group-open-tab']) && true === $meta['attrs']['data-group-open-tab']) ? 'active' : ''), + . ($isActive ? 'active' : ''), ); $navHtml .= sprintf( - '<li role="presentation" class="%s" data-tab-nav-item="%d"><a href="#" role="tab" aria-selected="false" data-mform-tab-toggle="1" data-tab-item="%d">%s%s</a></li>', + '<li role="presentation" class="%s" data-tab-nav-item="%d"><a href="#" role="tab" aria-selected="%s" data-mform-tab-toggle="1" data-tab-item="%d">%s%s</a></li>', htmlspecialchars($navClass, ENT_QUOTES), $idx, + $isActive ? 'true' : 'false', $idx, $tabIcon, $meta['label'], // Label ist Entwickler-HTML🤖 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 216 - 224, The aria-selected attribute is always hardcoded to "false" in the sprintf that renders the tab link; change it to reflect the active state by computing a boolean (based on meta['attrs']['data-group-open-tab'] or the $navClass 'active' presence) and pass "true" when the tab is active and "false" otherwise so the sprintf call that uses $navClass, $tabIcon and data-tab-item also receives the correct aria-selected value.
🤖 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 `@docs/05_wrapper.md`:
- Around line 229-233: The example call to addCheckboxField is using the label
in the wrong parameter (it treats ['label' => 'Aktiv'] as the options argument);
update the example so the second argument is the options array (empty or
containing checkbox-specific options) and the third argument is the attributes
array containing the label — i.e. adjust the addCheckboxField invocation to pass
options and attributes separately so the label ends up in the attributes
parameter rather than the options parameter.
In `@docs/07_repeater.md`:
- Around line 302-304: The documentation example uses the wrong method name:
change the call on the MForm::factory() chain from addTextareaField('text', ...)
to the correct addTextAreaField('text', ...) so the example matches the real
API; verify the surrounding addTabElement('Meta', MForm::factory()... ) snippet
and update only the method name to addTextAreaField to avoid copy/paste errors.
In `@fragments/mform/mform_wrapper.php`:
- Line 45: The aria-selected attribute is hardcoded to "false" in the tab
markup; update the rendering in mform_wrapper.php to compute aria-selected
dynamically (e.g. inspect $this->getVar('class') for an "active" token or use an
existing active flag) and output aria-selected="true" when the tab is active and
"false" otherwise; locate the echo that uses $this->getVar('class'),
$this->getVar('value') and $this->getVar('label') and replace the static
aria-selected with the computed value so the anchor reflects the actual active
state.
---
Outside diff comments:
In `@lib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.php`:
- Around line 216-224: The aria-selected attribute is always hardcoded to
"false" in the sprintf that renders the tab link; change it to reflect the
active state by computing a boolean (based on
meta['attrs']['data-group-open-tab'] or the $navClass 'active' presence) and
pass "true" when the tab is active and "false" otherwise so the sprintf call
that uses $navClass, $tabIcon and data-tab-item also receives the correct
aria-selected value.
🪄 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: 9b1381a3-e1a0-4d1e-ada8-6d4c2531e114
📒 Files selected for processing (21)
CHANGELOG.mdassets/css/mform.cssassets/js/formbuilder.jsassets/mform.jsassets/repeater.jsdocs/00_whats_new.mddocs/05_wrapper.mddocs/07_repeater.mddocs/13_api_reference.mdfragments/mform/mform_wrapper.phplang/de_de.langlang/en_gb.langlib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.phplib/MForm/MFormElements.phplib/MForm/Parser/MFormParser.phppackage.ymlpages/formbuilder.phppages/module/repeater/tabs_repeater_tabs/input.incpages/module/repeater/tabs_repeater_tabs/output.incpages/module/wrapper/tabs_modern_vertical/input.incpages/module/wrapper/tabs_modern_vertical/output.inc
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@assets/css/formbuilder.css`:
- Line 520: Remove the deprecated CSS property word-break: break-word from the
.mform-fb__colorswatch-help and .mform-fb__colorswatch-help code rules and
replace it with the already supported overflow-wrap: anywhere (or ensure
overflow-wrap: anywhere is present) to maintain the same wrapping behavior; also
scan and update the other occurrences noted (.list-widget.css at the selector
around line ~140 and .flex-repeater.css around line ~551) to keep the project
lint-clean.
🪄 Autofix (Beta)
❌ Autofix failed (check again to retry)
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: e3e135cc-4179-4198-bc77-6ad598d6e6a8
📒 Files selected for processing (11)
CHANGELOG.mdassets/css/formbuilder.cssassets/js/formbuilder.jsassets/mform.jsassets/repeater.jsdocs/05_wrapper.mddocs/07_repeater.mdfragments/mform/mform_wrapper.phplib/MForm/FlexRepeater/MFormFlexRepeaterRenderer.phplib/MForm/Parser/MFormParser.phppages/formbuilder.php
✅ Files skipped from review due to trivial changes (3)
- CHANGELOG.md
- docs/05_wrapper.md
- docs/07_repeater.md
|
Note Autofix is a beta feature. Expect some limitations and changes as we gather feedback and continue to improve it. Autofix skipped. No unresolved CodeRabbit review comments with fix instructions found. |
Zusammenfassung
Dieses PR bringt die 9.1-Tab-Erweiterungen inklusive Demos und Form-Builder-Support:
tab-icon,tab-style=modern,tab-layout=verticalEnthaltene Änderungen
fullim Block-Text)addTabElement()-Tabs im Repeater, falls keine explizite Tab-Gruppe definiert istTests
node --check assets/js/formbuilder.jsnode --check assets/mform.jsnode --check assets/repeater.jsrexstan:analyze redaxo/src/addons/mform-> OKHinweise
mainwurde zuvor per Revert bereinigt; diese Änderungen liegen bewusst nur auf der Feature-Branch.Summary by CodeRabbit
New Features
modern-Stil, vertikales Layout mit Mobile-Fallback, Tab-Icons und ID-freies Tab-RenderingBug Fixes
active-Klasse behobenDocumentation
Nachträge