Skip to content

Conversation

@fallmo
Copy link
Contributor

@fallmo fallmo commented Jan 4, 2026

Changes:

Summary by CodeRabbit

  • New Features
    • Login page now supports extended customization of the header brand image via additional image properties, enabling more control over image attributes and rendering.
    • Brand image is rendered conditionally to honor either a provided image source or explicit image properties for more predictable branding behavior.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link

coderabbitai bot commented Jan 4, 2026

Walkthrough

The LoginPage component now accepts an optional brandImgProps prop (typed as BrandProps) and renders the Brand element only when brandImgSrc or brandImgProps is provided; any brandImgProps are forwarded to Brand.

Changes

Cohort / File(s) Summary
LoginPage prop extension
packages/react-core/src/components/LoginPage/LoginPage.tsx
Added brandImgProps?: BrandProps to LoginPageProps; imported BrandProps; included brandImgProps in props destructuring; conditionally render <Brand ... /> only when brandImgSrc or brandImgProps exists and spread brandImgProps into Brand.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ 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 partially related to the changeset, covering the brand props passthrough aspect but not clearly emphasizing the optional Brand rendering.
Linked Issues check ✅ Passed The code changes fully address both linked issues: brandImgProps allows prop passage to Brand component [#11970], and conditional rendering prevents Brand creation when props are absent [#11984].
Out of Scope Changes check ✅ Passed All changes are directly scoped to address the two linked issues; no out-of-scope modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9059633 and 4ebbbdb.

📒 Files selected for processing (1)
  • packages/react-core/src/components/LoginPage/LoginPage.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/react-core/src/components/LoginPage/LoginPage.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Build, test & deploy

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

📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc46a52 and 9059633.

📒 Files selected for processing (1)
  • packages/react-core/src/components/LoginPage/LoginPage.tsx
🧰 Additional context used
🧬 Code graph analysis (1)
packages/react-core/src/components/LoginPage/LoginPage.tsx (1)
packages/react-core/src/components/Brand/Brand.tsx (2)
  • BrandProps (7-35)
  • Brand (37-82)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Build
  • GitHub Check: Build, test & deploy
🔇 Additional comments (3)
packages/react-core/src/components/LoginPage/LoginPage.tsx (3)

5-5: LGTM!

The BrandProps import is correctly added and necessary for the new brandImgProps prop type definition.


24-25: LGTM!

The new optional brandImgProps prop correctly enables consumers to pass additional Brand properties (e.g., width, height) through the LoginPage component, addressing issue #11970.


55-55: LGTM!

The prop destructuring correctly includes the new brandImgProps parameter.

@patternfly-build
Copy link
Collaborator

patternfly-build commented Jan 4, 2026

… without props

Signed-off-by: Mohamed Fall <ps.hackmaster@gmail.com>
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.

Bug - LoginPage - Brand is always created even if optional attributes empty Bug - LoginPage - Brand does not allow props passage down

2 participants