Skip to content

Comments

Demonstrate treeview in relation formwidget#24

Open
damsfx wants to merge 1 commit intowintercms:mainfrom
damsfx:add-relation-fromwidget-treeview-display
Open

Demonstrate treeview in relation formwidget#24
damsfx wants to merge 1 commit intowintercms:mainfrom
damsfx:add-relation-fromwidget-treeview-display

Conversation

@damsfx
Copy link

@damsfx damsfx commented Feb 20, 2026

Related :

Summary by CodeRabbit

  • New Features
    • Added two new field options for displaying related items in a hierarchical tree view with quick selection and action capabilities.

@coderabbitai
Copy link

coderabbitai bot commented Feb 20, 2026

Walkthrough

Two new relation field definitions were added to the channel model configuration: related_treeview and related_custom_treeview. Both enable tree display capabilities with quickselect and quickTreeActions, with the second using a custom title attribute instead of the standard title for display.

Changes

Cohort / File(s) Summary
New Relation Fields
models/channel/fields.yaml
Added two tree-enabled relation field definitions: related_treeview (using select: title) and related_custom_treeview (using nameFrom: custom_title). Both support quickselect, displayTree, and quickTreeActions properties.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding a demonstration of treeview functionality in a relation formwidget, which matches the actual changes of adding two new tree-enabled relation fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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 and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@models/channel/fields.yaml`:
- Around line 22-40: The relation field definitions related_treeview and
related_custom_treeview use non-standard options (displayTree, quickTreeActions,
quickselect) which Winter CMS ignores; remove those options from these field
entries and enable tree rendering by configuring showTree: true in the
relation's form config (not as field-level options), replace quickTreeActions
with toolbarButtons for any tree action buttons, and if you need custom tree
behavior beyond showTree/toolbarButtons implement it in a plugin or custom
formwidget rather than adding unrecognized options to related_treeview or
related_custom_treeview.

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.

1 participant