chore(primary details): Demo updates#12581
Conversation
WalkthroughPrimary Detail demos reorganize toolbar placement, move data lists into drawer content bodies, add drawer sections for toolbar controls, and switch selected drawer layouts from static to inline rendering. ChangesPrimary Detail drawer layout
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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 |
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
`@packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx`:
- Around line 104-105: Move the ineffective alignItems prop from
ToolbarToggleGroup to the appropriate ToolbarGroup or ToolbarContent in all
three sites:
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx
lines 104-105,
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx
lines 104-105, and
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx
lines 103-104. Preserve the intended center alignment by applying it to the
component that handles alignment.
🪄 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: 6e4bc4cd-7b6e-458a-a383-8ba3242f7db5
📒 Files selected for processing (6)
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsxpackages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsxpackages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsxpackages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsxpackages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsxpackages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx
| const ToolbarItems = ( | ||
| <ToolbarToggleGroup toggleIcon={<RhUiFilterFillIcon />} breakpoint="xl" alignItems="center"> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Confirm whether ToolbarToggleGroup declares/handles alignItems
fd 'ToolbarToggleGroup' -e ts -e tsx | while read -r f; do
echo "== $f =="
rg -n 'alignItems' "$f" || echo " (no alignItems references)"
doneRepository: patternfly/patternfly-react
Length of output: 382
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '1,240p' packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx
printf '\n---\n'
rg -n "ToolbarToggleGroupProps|interface ToolbarToggleGroup|type ToolbarToggleGroup" packages/react-core/src/components/Toolbar -g '!**/*.test.*'Repository: patternfly/patternfly-react
Length of output: 8593
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "FILE: packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx"
sed -n '1,220p' packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx
echo
echo "FILE: packages/react-core/src/components/Toolbar/index.ts"
sed -n '1,220p' packages/react-core/src/components/Toolbar/index.ts 2>/dev/null || true
echo
echo "TYPE SEARCH"
rg -n "ToolbarToggleGroupProps|interface .*ToolbarToggleGroup|type .*ToolbarToggleGroup" packages/react-core/src/components/ToolbarRepository: patternfly/patternfly-react
Length of output: 7987
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n "ToolbarToggleGroupProps|interface .*ToolbarToggleGroup|type .*ToolbarToggleGroup" packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsx packages/react-core/src/components/ToolbarRepository: patternfly/patternfly-react
Length of output: 721
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "FILE: packages/react-core/src/components/Toolbar/ToolbarGroup.tsx"
sed -n '1,260p' packages/react-core/src/components/Toolbar/ToolbarGroup.tsx
echo
echo "ALIGNMENT USAGE IN TOOLBAR TOGGLE GROUP"
rg -n "\.\.\.props|alignItems|className=.*toolbar|toolbarGroup" packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsxRepository: patternfly/patternfly-react
Length of output: 8307
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '240,290p' packages/react-core/src/components/Toolbar/ToolbarToggleGroup.tsxRepository: patternfly/patternfly-react
Length of output: 2253
alignItems has no effect on ToolbarToggleGroup ToolbarToggleGroupProps inherits alignItems, but the component never reads it and forwards it to the wrapper <div>. These three demo sites won’t change alignment unless the prop is moved to ToolbarGroup/ToolbarContent or handled inside ToolbarToggleGroup.
📍 Affects 3 files
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx#L104-L105(this comment)packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx#L104-L105packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx#L103-L104
🤖 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
`@packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx`
around lines 104 - 105, Move the ineffective alignItems prop from
ToolbarToggleGroup to the appropriate ToolbarGroup or ToolbarContent in all
three sites:
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx
lines 104-105,
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx
lines 104-105, and
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx
lines 103-104. Preserve the intended center alignment by applying it to the
component that handles alignment.
Closes #12544
I updated the following:
Summary by CodeRabbit