Skip to content

fix(theme): prevent entity page content clipping - #4713

Open
rohitkrai03 wants to merge 1 commit into
redhat-developer:mainfrom
rohitkrai03:codex/theme-entity-page-layout
Open

fix(theme): prevent entity page content clipping#4713
rohitkrai03 wants to merge 1 commit into
redhat-developer:mainfrom
rohitkrai03:codex/theme-entity-page-layout

Conversation

@rohitkrai03

Copy link
Copy Markdown
Contributor

Summary

  • Fix the RHDH entity-page main-content layout so longer pages can grow beyond the viewport.
  • Scope the flex layout override to BUI entity pages instead of relying on the previous broad main selector.
  • Add regression coverage for the updated layout values.
  • Include a patch changeset for the published theme package.

Validation

  • Focused theme package tests: 5 suites / 26 tests passed
  • yarn prettier:check passed
  • Changeset status passed

The workspace-wide theme TypeScript check still reports unrelated existing errors in plugins/bui-test/src/components/OtherExample.tsx.

Allow RHDH entity pages to grow beyond the viewport while preserving the existing layout behavior for other page types.
@rhdh-gh-app

rhdh-gh-app Bot commented Sep 11, 2026

Copy link
Copy Markdown

Changed Packages

Package Name Package Path Changeset Bump Current Version
@red-hat-developer-hub/backstage-plugin-theme workspaces/theme/plugins/theme patch v1.2.0

@rhdh-qodo-merge

Copy link
Copy Markdown

PR Summary by Qodo

Prevent BUI entity page content clipping

🐞 Bug fix 🧪 Tests ⚙️ Configuration changes 🕐 10-20 Minutes

Grey Divider

AI Description

• Allow long BUI entity pages to exceed viewport height without clipping.
• Limit flex sizing overrides to mains containing BUI Containers.
• Verify layout values and publish the theme fix as a patch.
Diagram

graph TD
  A["Sidebar page"] --> B["Desktop inset"] --> C["BUI main selector"] --> D["Flexible sizing"] --> E["Entity content"]
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Add an explicit entity-page marker
  • ➕ Provides a stable semantic selector instead of matching generated class names.
  • ➕ Could avoid relying on the CSS :has() selector.
  • ➖ Requires coordinated changes in the component rendering the entity page.
  • ➖ Expands the fix across packages and couples page markup to theme behavior.

Recommendation: Keep the PR’s scoped theme override because it fixes clipping without changing page producers or affecting non-BUI mains. An explicit data attribute would be more semantically stable, but only merits the broader integration work if the BUI page markup is directly controlled by this repository.

Files changed (3) +20 / -12

Bug fix (1) +9 / -9
createComponents.tsAllow BUI entity-page mains to grow beyond the viewport +9/-9

Allow BUI entity-page mains to grow beyond the viewport

• Scopes the flex-column override to mains containing BUI Containers. Replaces the restrictive maximum height with flexible sizing while retaining a viewport-based minimum height.

workspaces/theme/plugins/theme/src/utils/createComponents.ts

Tests (1) +5 / -3
createComponents.test.tsCover scoped BUI main sizing rules +5/-3

Cover scoped BUI main sizing rules

• Updates the regression test to assert the BUI Container-scoped selector and its flexible height, minimum-height, and maximum-height values.

workspaces/theme/plugins/theme/src/utils/createComponents.test.ts

Other (1) +6 / -0
entity-page-layout.mdPublish the entity-page layout fix as a patch +6/-0

Publish the entity-page layout fix as a patch

• Adds a patch changeset for the theme package describing the corrected entity-page growth behavior.

workspaces/theme/.changeset/entity-page-layout.md

@sonarqubecloud

Copy link
Copy Markdown

@rhdh-qodo-merge

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can switch off images and animations for a plain-text comment

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

@rhdh-qodo-merge

Copy link
Copy Markdown

Important

The /generate_labels command by Qodo is sunsetting on the 1st of October 2026 and will no longer be available. We recommend switching to the latest Qodo review capabilities. Learn more

@codecov

codecov Bot commented Sep 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 61.43%. Comparing base (079dd92) to head (2520b01).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4713   +/-   ##
=======================================
  Coverage   61.43%   61.43%           
=======================================
  Files        2634     2634           
  Lines      105354   105354           
  Branches    29501    29503    +2     
=======================================
  Hits        64728    64728           
  Misses      40086    40086           
  Partials      540      540           
Flag Coverage Δ *Carryforward flag
adoption-insights 84.77% <ø> (ø) Carriedforward from 079dd92
ai-integrations 78.80% <ø> (ø) Carriedforward from 079dd92
app-defaults 53.07% <ø> (ø) Carriedforward from 079dd92
augment 46.67% <ø> (ø) Carriedforward from 079dd92
boost 83.46% <ø> (ø) Carriedforward from 079dd92
bulk-import 73.12% <ø> (ø) Carriedforward from 079dd92
cost-management 13.35% <ø> (ø) Carriedforward from 079dd92
dcm 73.47% <ø> (ø) Carriedforward from 079dd92
e2e-adoption-insights 60.00% <ø> (ø) Carriedforward from 079dd92
e2e-extensions 62.31% <ø> (ø) Carriedforward from 079dd92
e2e-global-header 49.71% <ø> (ø) Carriedforward from 079dd92
e2e-homepage 61.11% <ø> (ø) Carriedforward from 079dd92
e2e-intelligent-assistant 46.09% <ø> (ø) Carriedforward from 079dd92
e2e-orchestrator 49.52% <ø> (ø) Carriedforward from 079dd92
e2e-orchestrator-plugin 49.51% <ø> (ø) Carriedforward from 079dd92
e2e-quickstart 55.21% <ø> (ø) Carriedforward from 079dd92
e2e-scorecard 50.05% <ø> (ø) Carriedforward from 079dd92
e2e-theme 16.36% <ø> (ø) Carriedforward from 079dd92
extensions 57.37% <ø> (ø) Carriedforward from 079dd92
global-floating-action-button 71.18% <ø> (ø) Carriedforward from 079dd92
global-header 67.88% <ø> (ø) Carriedforward from 079dd92
homepage 48.39% <ø> (ø) Carriedforward from 079dd92
install-dynamic-plugins 71.94% <ø> (ø) Carriedforward from 079dd92
intelligent-assistant 77.26% <ø> (ø) Carriedforward from 079dd92
konflux 91.98% <ø> (ø) Carriedforward from 079dd92
lightspeed 69.02% <ø> (ø) Carriedforward from 079dd92
mcp-integrations 84.46% <ø> (ø) Carriedforward from 079dd92
orchestrator 72.02% <ø> (ø) Carriedforward from 079dd92
quickstart 63.74% <ø> (ø) Carriedforward from 079dd92
sandbox 79.56% <ø> (ø) Carriedforward from 079dd92
scorecard 88.20% <ø> (ø) Carriedforward from 079dd92
theme 87.91% <ø> (ø)
translations 5.12% <ø> (ø) Carriedforward from 079dd92
x2a 52.32% <ø> (ø) Carriedforward from 079dd92

*This pull request uses carry forward flags. Click here to find out more.


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 079dd92...2520b01. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant