[7888] Add option to UI.xml to be able to set COMPACT view as the default in Create Content dialog#4901
[7888] Add option to UI.xml to be able to set COMPACT view as the default in Create Content dialog#4901jvega190 wants to merge 2 commits into
Conversation
…ault in Create Content dialog
WalkthroughAdds a ChangescreateContentCompactView config flag
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes 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)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install failed. For unrecoverable errors, disable the tool in CodeRabbit configuration. 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.
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 `@ui/app/src/components/ContentTypeManagement/components/SelectTypeView.tsx`:
- Line 40: The SelectTypeView component has an unused useSelection import that
will trigger lint failures. Remove the unused import from SelectTypeView and
keep the file imports limited to symbols actually referenced in the component,
using the SelectTypeView identifier to verify the cleanup.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 81e2d6b8-6151-4cc6-9a23-4f2faf59bce1
📒 Files selected for processing (4)
ui/app/src/components/ContentTypeManagement/components/SelectTypeView.tsxui/app/src/components/NewContentDialog/NewContentDialogContainer.tsxui/app/src/models/GlobalState.tsui/app/src/state/reducers/preview.ts
|
@coderabbitai can you check if everything looks good? Please give it a final review before I hand over for human review |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
echo "=== preview.ts reducer ==="
cat -n ui/app/src/state/reducers/preview.ts
echo ""
echo "=== GlobalState.ts (preview section) ==="
grep -n "createContentCompactView\|preview" ui/app/src/models/GlobalState.ts | head -40
echo ""
echo "=== NewContentDialogContainer.tsx ==="
cat -n ui/app/src/components/NewContentDialog/NewContentDialogContainer.tsx
echo ""
echo "=== SelectTypeView.tsx (relevant parts) ==="
cat -n ui/app/src/components/ContentTypeManagement/components/SelectTypeView.tsx
echo ""
echo "=== Check UI.xml for the new config attribute ==="
fd "UI.xml" . --exec grep -n "createContent\|initialCreateContent\|compact" {} +
echo ""
echo "=== Check how initialCompact is used elsewhere ==="
rg -n "initialCompact\|compact" ui/app/src/components/NewContentDialog/ -C 2
echo ""
echo "=== Check how initialCreateContentCompactView is used ==="
rg -n "initialCreateContentCompactView\|createContentCompactView" ui/app/src/
echo ""
echo "=== Check SelectTypeView props ==="
rg -n "SelectTypeViewProps\|initialCompact" ui/app/src/components/ContentTypeManagement/ -C 3Length of output: 44425
✅ What looks good
🔍 Minor observationNo Overall the code is correct, minimal, and consistent with the existing pattern for config-driven preview defaults. Ready for human review. 🐇 |
craftercms/craftercms#7888
Summary by CodeRabbit
New Features
Bug Fixes