Skip to content

chore(primary details): Demo updates#12581

Open
andrew-ronaldson wants to merge 1 commit into
patternfly:mainfrom
andrew-ronaldson:primary-details
Open

chore(primary details): Demo updates#12581
andrew-ronaldson wants to merge 1 commit into
patternfly:mainfrom
andrew-ronaldson:primary-details

Conversation

@andrew-ronaldson

@andrew-ronaldson andrew-ronaldson commented Jul 21, 2026

Copy link
Copy Markdown
Collaborator

Closes #12544

I updated the following:

  • Inline drawers examples
  • Alert icons use status colours.
  • workspace toast alert drops pf-m-inline class so it appears floating.

Summary by CodeRabbit

  • Enhancements
    • Improved Primary Detail drawer layouts across several examples.
    • Toolbars now appear within the drawer interface with clearer alignment, spacing, and separators.
    • Updated inline drawer behavior for more consistent content presentation.
    • Refined filtering and toggle controls for improved visual alignment.

@coderabbitai

coderabbitai Bot commented Jul 21, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Primary 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.

Changes

Primary Detail drawer layout

Layer / File(s) Summary
Toolbar composition updates
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx
Toolbar toggle groups and filter groups now use direct centered alignment, with updated toolbar item assembly and imports.
Drawer content and toolbar sections
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx, packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx
Drawer content now renders the data list separately, while toolbar and divider elements are placed in DrawerSection with updated inset, padding, and alignment props.
Inline drawer variants
packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx
The drawer changes from static to inline rendering while retaining its expanded-state handling.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

Possibly related PRs

Suggested reviewers: tlabaj, rebeccaalpert, thatblindgeye, nicolethoen

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and correctly points to Primary Details demo changes, though it is broad.
Linked Issues check ✅ Passed The changes update Primary Details React demos as requested by linked issue #12544.
Out of Scope Changes check ✅ Passed The modified files are all demo updates within the Primary Details pattern and show no unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot 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.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7519afe and 325a4e0.

📒 Files selected for processing (6)
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailCardView.tsx
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailContentPadding.tsx
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailDataListInCard.tsx
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailFullPage.tsx
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailInlineModifier.tsx
  • packages/react-core/src/demos/examples/PrimaryDetail/PrimaryDetailSimpleListInCard.tsx

Comment on lines +104 to +105
const ToolbarItems = (
<ToolbarToggleGroup toggleIcon={<RhUiFilterFillIcon />} breakpoint="xl" alignItems="center">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 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)"
done

Repository: 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/Toolbar

Repository: 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/Toolbar

Repository: 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.tsx

Repository: 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.tsx

Repository: 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-L105
  • packages/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.

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.

Patterns: Primary details react demo updates

1 participant