Skip to content

fix(ui): standardize PageLayoutV1 padding and height across app modes - #31268

Merged
karanh37 merged 13 commits into
mainfrom
fix/page-layout-v1-ai-mode-standard
Aug 10, 2026
Merged

karanh37 merged 13 commits into
mainfrom
fix/page-layout-v1-ai-mode-standard

Conversation

@karanh37

Copy link
Copy Markdown
Contributor

Describe your changes

PageLayoutV1 had no standard for padding/height across the two app modes (classic vs AI). Pages hand-rolled variant={isAiMode ? 'compact' : 'default'} ternaries, hardcoded chrome offsets (calc(100vh - 64px), calc(100vh - 16px)), and passed mainContainerClassName values that existed only as keys for a runtime-injected <style> tag. Pages wrapped by withPageLayout could never opt into compact padding at all, which forced shell-level CSS overrides downstream.

This PR makes PageLayoutV1 itself the standard:

  • Mode-aware variant: when no variant is passed, AI mode resolves to compact (uniform 8px padding via tw:p-2), classic resolves to default (20px horizontal gutter via p-x-box). An explicit variant prop always wins. This covers every page, including the ~30 withPageLayout pages that could not pass a variant.
  • Var-based fullHeight: fullHeight now sizes with calc(100vh - var(--ant-navbar-height)) instead of a hardcoded 64px. The shell owns the offset: classic :root already sets --ant-navbar-height; embedding shells (e.g. Collate AI content pane) set their own value once instead of fighting per page.
  • Static full-height CSS: the FullHeightWrapper runtime-injected <style> (keyed on mainContainerClassName) is replaced by equivalent static rules in page-layout.less scoped to .full-height-wrapper .page-layout-v1-center. All existing fullHeight pages passed a class name, so behavior is unchanged; future pages no longer need a dummy class.
  • Call-site cleanup: removed the now-redundant isAiMode variant ternaries (6 pages) and hardcoded AI heights in WorkflowsPage / WorkflowBuilder / LearningResourcesPage.

Type of change

  • Improvement

Checklist

  • I have read the CONTRIBUTING document.
  • I have added tests around the new logic (variant resolution in AI mode, explicit-variant override; jest 12/12 green).
  • ESLint + Prettier + organize-imports run on all changed files (0 errors).

🤖 Generated with Claude Code

- PageLayoutV1 now resolves its variant from the app mode: AI mode defaults
  to compact (uniform 8px padding), classic keeps the 20px gutter. An
  explicit variant prop still wins.
- fullHeight uses calc(100vh - var(--ant-navbar-height)) instead of a
  hardcoded 64px, so shells control the chrome offset with one CSS variable.
- Replace FullHeightWrapper's runtime-injected <style> with static rules in
  page-layout.less; mainContainerClassName is no longer needed as a style key.
- Drop per-page isAiMode variant ternaries and hardcoded AI-mode heights
  (WorkflowsPage 100vh-16px, LearningResourcesPage 100vh-64px) that the
  component now covers.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI lite review requested due to automatic review settings August 10, 2026 08:41
@karanh37
karanh37 requested a review from a team as a code owner August 10, 2026 08:41
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR centralizes “classic vs AI mode” layout behavior inside PageLayoutV1, making padding/variant resolution and full-height sizing consistent across the UI and removing per-page CSS/height workarounds.

Changes:

  • Make PageLayoutV1 resolve variant automatically based on app mode when variant isn’t explicitly provided (AI → compact, classic → default).
  • Replace the runtime-injected full-height <style> mechanism with static page-layout.less rules scoped under .full-height-wrapper.
  • Clean up call sites by removing redundant isAiMode ? ... variant ternaries and hardcoded viewport height calculations; add/adjust Jest coverage for the new variant resolution behavior.

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less Adds static .full-height-wrapper rules to replace runtime-injected fullHeight styling.
openmetadata-ui/src/main/resources/ui/src/pages/WorkflowDefinitions/WorkflowsPage/WorkflowsPage.tsx Removes AI-mode hardcoded height and redundant explicit variant; relies on PageLayoutV1 defaults.
openmetadata-ui/src/main/resources/ui/src/pages/WorkflowDefinitions/WorkflowBuilder/WorkflowBuilder.tsx Removes per-page fullHeight height/overflow overrides and redundant explicit variant.
openmetadata-ui/src/main/resources/ui/src/pages/TagPage/TagPage.tsx Removes redundant variant ternary; uses mode defaulting in PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/pages/OntologyExplorerPage/OntologyExplorerPage.tsx Removes redundant variant ternary; uses mode defaulting in PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/pages/MetricsPage/MetricListPage/MetricListPage.tsx Removes redundant variant ternary; uses mode defaulting in PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/pages/LearningResourcesPage/LearningResourcesPage.tsx Removes hardcoded fullHeight viewport offset/overflow styles; relies on PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/pages/ColumnBulkOperations/ColumnBulkOperations.component.tsx Removes redundant variant ternary; uses mode defaulting in PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx Implements mode-aware variant resolution, var-based fullHeight sizing, and removes runtime style injection.
openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.test.tsx Adds tests for AI-mode default variant + explicit override; updates fullHeight expectations given CSS var behavior in jsdom.
openmetadata-ui/src/main/resources/ui/src/components/DomainListing/DomainListPage.tsx Removes wrapper-level variant ternary so the layout standard is owned by PageLayoutV1.
openmetadata-ui/src/main/resources/ui/src/components/DataProduct/DataProductListPage.tsx Removes wrapper-level variant ternary so the layout standard is owned by PageLayoutV1.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Without a fallback the calc() invalidates in shells that never define the
variable, dropping the height rule entirely while overflow:hidden remains.
64px matches the previous hardcoded offset.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 10, 2026 08:48
temp.css :root sets --ant-navbar-height: 80px; the fallback should match
it, not the old 64px hardcode.

Co-Authored-By: Claude Fable 5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Suppressed comments (2)

openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less:25

  • The comment describing fullHeight mode doesn’t match the actual implementation: the height is set inline in PageLayoutV1 using calc(100vh - var(--ant-navbar-height, 64px)) (with a 64px fallback), while this LESS block only handles the flex/overflow chain. Updating the comment will prevent future confusion when debugging layout issues across shells.
// fullHeight mode: the page container is pinned to the viewport
// (100vh - var(--ant-navbar-height)) and the center column becomes a
// flex chain so the last content row absorbs the remaining height.

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.test.tsx:105

  • The test comment references calc(100vh - var(--ant-navbar-height)), but the component now uses calc(100vh - var(--ant-navbar-height, 64px)). Aligning the comment with the actual style string makes the test rationale clearer.
    // jsdom's CSSOM drops `calc(100vh - var(--ant-navbar-height))`, so the
    // height itself can't be read back here; the wrapper + overflow are the
    // observable fullHeight effects.

Copilot AI review requested due to automatic review settings August 10, 2026 08:53

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 12 changed files in this pull request and generated no new comments.

Suppressed comments (2)

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.test.tsx:107

  • This test currently asserts overflow: hidden as a “fullHeight effect”, but overflow: hidden is always applied via pageContainerStyles, so the assertion doesn’t validate the new behavior. Consider asserting only the wrapper (or renaming the test accordingly) to keep the test meaningful.
    // jsdom's CSSOM drops `calc(100vh - var(--ant-navbar-height))`, so the
    // height itself can't be read back here; the wrapper + overflow are the
    // observable fullHeight effects.
    expect(container.querySelector('.full-height-wrapper')).toBeInTheDocument();
    expect(pageLayout).toHaveStyle({ overflow: 'hidden' });

openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less:27

  • The new fullHeight behavior relies on --ant-navbar-height having a fallback (as added in PageLayoutV1), but .page-layout-v1-vertical-scroll still uses var(--ant-navbar-height) via @om-navbar-height with no fallback. That means in shells that don’t define the CSS var, the scroll container height rule becomes invalid even though the outer Row height now has a fallback, leading to inconsistent sizing.
// fullHeight mode: the page container is pinned to the viewport
// (100vh - var(--ant-navbar-height)) and the center column becomes a
// flex chain so the last content row absorbs the remaining height.
.full-height-wrapper {
  .page-layout-v1-center.page-layout-v1-vertical-scroll {

@github-actions

github-actions Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 66%
66.23% (78205/118071) 50.24% (47234/94007) 51.44% (14226/27652)

content-height-with-resizable-panel was overridden per page with ad-hoc
calcs (SSO: -48px+16px and -200px across two files, four :has(#page-alert)
!important variants; Explore: bespoke quick-filters math). The base class
now computes

  height: calc(100vh - var(--ant-navbar-height, 80px)
               - var(--content-panel-offset, 20px)
               - var(--page-alert-offset, 0px))

and pages set --content-panel-offset instead of redeclaring height. The
sticky #page-alert 78px is subtracted once globally via a
.page-layout-v1-center:has(#page-alert) rule instead of per-page
!important overrides. The .settings-sso card follows the same pattern.

Co-Authored-By: Claude Fable 5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 17 out of 17 changed files in this pull request and generated no new comments.

Suppressed comments (2)

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:54

  • The PR description states classic mode should default to a 20px horizontal gutter via p-x-box, but PageLayoutV1 now uses tw:px-4 (16px) for the default variant and the tests assert 16px. Please align either the implementation/tests back to p-x-box or update the PR description/acceptance criteria so the intended default gutter size is unambiguous.
  // `compact` (uniform 8px) is for pages whose header is a HeaderShell —
  // the calling component decides. Everything else gets the default 16px
  // horizontal gutter.
  const paddingClassName = variant === 'compact' ? 'tw:p-2' : 'tw:px-4';

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:47

  • The PR description says PageLayoutV1 should resolve a default variant based on app mode (AI => compact, classic => default) so withPageLayout pages can opt into compact padding without passing a prop. In the current implementation variant still defaults to 'default' and PageLayoutV1 does not consult useIsAiMode, so wrapped pages will continue to render with the classic padding in AI mode unless every call site passes variant explicitly.

This issue also appears on line 51 of the same file.

  leftPanelWidth = 230,
  rightPanelWidth = 284,
  mainContainerClassName = '',
  fullHeight = false,
  variant = 'default',

Introduce a single CSS variable for 'viewport minus shell chrome'
(--om-page-height = calc(100vh - var(--ant-navbar-height)), defined in
temp.css :root). It resolves lazily at use-site, so it adapts to every
shell's --ant-navbar-height override (extra-banner, AI content pane,
desktop) without repeating the calc.

Adopt it in the full-height standard: .page-layout-v1-vertical-scroll,
.page-layout-v1-full-height, content-height-with-resizable-panel (now
calc(var(--om-page-height) - offsets)), and the Domain tree-view height.

Co-Authored-By: Claude Fable 5 <[email protected]>
Copilot AI review requested due to automatic review settings August 10, 2026 12:11

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

Suppressed comments (2)

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:55

  • Default padding switched from the existing p-x-box (20px via styles/spacing.less:526-529) to tw:px-4 (16px). If the intent is to preserve the prior 20px classic gutter (as stated in the PR description), this will shrink horizontal spacing across all default-variant pages.
  // `compact` (uniform 8px) is for pages whose header is a HeaderShell —
  // the calling component decides. Everything else gets the default 16px
  // horizontal gutter.
  const paddingClassName = variant === 'compact' ? 'tw:p-2' : 'tw:px-4';

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:51

  • variant is always defaulted to 'default', so pages wrapped by withPageLayout (which does not pass variant) cannot become compact in AI mode. This contradicts the PR description’s “mode-aware variant when no variant is passed” behavior, and means AI mode will still render default padding unless each call-site passes variant explicitly.

Consider resolving the effective variant inside PageLayoutV1 (e.g., variantProp ?? (useIsAiMode() ? 'compact' : 'default')) and using that resolved value for both padding and the data-variant attribute.

This issue also appears on line 51 of the same file.

  variant = 'default',
}: PageLayoutProp) => {
  const location = useLocation();

  // `compact` (uniform 8px) is for pages whose header is a HeaderShell —

…rridden

A nested var() inside a custom property is substituted at the scope where
the custom property is declared, not where it is used — so --om-page-height
defined only at :root baked in the 80px navbar and ignored the
.extra-banner (144px) override. Re-declare --om-page-height alongside every
--ant-navbar-height override so it re-resolves in that scope.

Co-Authored-By: Claude Fable 5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

Suppressed comments (3)

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:48

  • The PR description says PageLayoutV1 should resolve variant automatically (AI mode => compact, classic => default) when variant is omitted, but the component still hard-defaults variant = 'default' and never consults app mode. This means the ~withPageLayout pages that don’t pass a variant still can’t opt into compact padding as described.
  mainContainerClassName = '',
  fullHeight = false,
  variant = 'default',
}: PageLayoutProp) => {

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:55

  • PR description mentions classic mode using the existing 20px horizontal gutter (p-x-box), but PageLayoutV1 now applies tw:px-4 (16px) for the default variant and the tests assert 16px. Please align either the code (switch back to p-x-box) or the PR description/expected spacing so consumers don’t get an unintentional layout change.
  // `compact` (uniform 8px) is for pages whose header is a HeaderShell —
  // the calling component decides. Everything else gets the default 16px
  // horizontal gutter.
  const paddingClassName = variant === 'compact' ? 'tw:p-2' : 'tw:px-4';

openmetadata-ui/src/main/resources/ui/src/styles/temp.css:739

  • The NOTE about nested var() substitution is inaccurate: custom properties are resolved where they are used, so overriding --ant-navbar-height in a nested scope will affect --om-page-height without needing to redeclare --om-page-height (unless that scope overrides --om-page-height itself). This comment could mislead future maintainers into adding redundant redeclarations.
   * NOTE: a nested var() in a custom property is substituted at the scope
   * where the custom property is declared, not where it is used — so this
   * MUST be re-declared in every scope that overrides --ant-navbar-height
   * (below, and each app shell), or those scopes keep the 80px value. */

chirag-madlani
chirag-madlani previously approved these changes Aug 10, 2026
The default PageLayoutV1 gutter changed from p-x-box (20px) to tw:px-4
(16px), shifting every classic page ~4px. Regenerate the affected
baselines from the CI run's actual screenshots (same pinned Playwright
image) so the visual-regression suite matches the intended layout.

Co-Authored-By: Claude Fable 5 <[email protected]>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 18 out of 29 changed files in this pull request and generated no new comments.

Suppressed comments (4)

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:55

  • The default (non-compact) padding class was changed from the existing p-x-box (20px gutters, defined in styles/spacing.less) to tw:px-4 (16px). This is a user-visible spacing change and also conflicts with the PR description that calls out the classic default as a 20px gutter. Please confirm the intended gutter size and align implementation + tests + PR description accordingly.
  // `compact` (uniform 8px) is for pages whose header is a HeaderShell —
  // the calling component decides. Everything else gets the default 16px
  // horizontal gutter.
  const paddingClassName = variant === 'compact' ? 'tw:p-2' : 'tw:px-4';

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:48

  • variant is defaulted to 'default' in the destructuring, so PageLayoutV1 currently cannot implement the PR-described behavior of resolving to compact automatically in AI mode when variant is omitted (e.g., withPageLayout callers). Consider leaving variant undefined by default and computing a resolvedVariant via useIsAiMode() (explicit prop still wins).

This issue also appears on line 51 of the same file.

  center = false,
  leftPanelWidth = 230,
  rightPanelWidth = 284,
  mainContainerClassName = '',
  fullHeight = false,
  variant = 'default',
}: PageLayoutProp) => {

openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less:76

  • --page-alert-offset is only set via .page-layout-v1-center:has(#page-alert), but there doesn’t appear to be any markup in the repo that renders an element with id page-alert (searching for page-alert only finds these style rules). If the id is missing or lives outside .page-layout-v1-center, the offset will never apply and the SSO/resizable-panel height adjustments that now rely on it may regress. Please verify the actual alert DOM and either add the matching id where the alert is rendered or adjust the selector to match the real structure.
// The sticky alert consumes @page-alert-height inside the page scroll;
// expose it as an offset so fixed-height panels
// (content-height-with-resizable-panel) shrink to fit instead of each page
// re-deriving its own calc.
.page-layout-v1-center:has(#page-alert) {
  --page-alert-offset: @page-alert-height;
}

openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.test.tsx:122

  • PR description mentions added tests for variant resolution in AI mode and explicit-variant override, but this suite only asserts the static default (data-variant="default") when variant is omitted. If PageLayoutV1 is intended to resolve compact automatically in AI mode, tests should cover that behavior by mocking the app mode (e.g., useIsAiMode() / useAppMode).
  it('Should apply the default 16px horizontal padding class when no variant is provided', () => {
    const { getByTestId } = render(
      <PageLayoutV1 pageTitle="Test Page">Center content</PageLayoutV1>
    );

    const pageLayout = getByTestId('page-layout-v1');

    expect(pageLayout).toHaveClass('tw:px-4');
    expect(pageLayout).not.toHaveClass('tw:p-2');
    expect(pageLayout).toHaveAttribute('data-variant', 'default');
  });

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit bc8d116f35b6c2237b0c105d3d63871a2718becb in Playwright run 31392984339, attempt 1.

✅ 597 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 58m 15s

⏱️ Max setup 3m 12s · max shard execution 12m 19s · max shard-job elapsed before upload 21m 2s · reporting 5s

🌐 201.62 requests/attempt · 2.80 app boots/UI scenario · 10.55% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 201.62 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.8 per UI scenario (1732 boots / 618 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 104 0 0 0 0 0
✅ Shard chromium-02 114 0 0 0 0 0
✅ Shard chromium-03 110 0 0 0 0 0
✅ Shard chromium-04 118 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 2.0 branch.
Please cherry-pick the changes manually.
You can find more details here.

@github-actions

Copy link
Copy Markdown
Contributor

Failed to cherry-pick changes to the 1.13 branch.
Please cherry-pick the changes manually.
You can find more details here.

@gitar-bot

gitar-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown
Code Review 👍 Approved with suggestions 3 resolved / 4 findings

Standardizes PageLayoutV1 padding and height across classic and AI app modes with mode-aware variants and variable-driven fullHeight sizing. Consider reviewing the page-alert-offset change, as it now shrinks all 34 resizable-panel pages.

💡 Edge Case: page-alert-offset now shrinks all 34 resizable-panel pages

📄 openmetadata-ui/src/main/resources/ui/src/styles/components/resizable-panels-component.less:40-45 📄 openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less:63-65

Previously .content-height-with-resizable-panel used @page-height (navbar + 20px only) and only SSO/settings pages had explicit :has(#page-alert) height adjustments. The shared rule now unconditionally subtracts var(--page-alert-offset, 0px), and .page-layout-v1-center:has(#page-alert) sets that to a fixed 78px — so every one of the ~34 pages using this class will shrink by 78px whenever any #page-alert is present, even pages that were never alert-aware before. Where the alert isn't sticky/78px tall or doesn't overlap the panel, this can produce a wrong gap or truncation. Worth spot-checking a non-SSO page that renders #page-alert (e.g. Explore, ingestion pages) to confirm the uniform 78px assumption holds.

✅ 3 resolved
✅ Bug: fullHeight height relies on --ant-navbar-height with no fallback

📄 openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:90-98 📄 openmetadata-ui/src/main/resources/ui/src/pages/WorkflowDefinitions/WorkflowsPage/WorkflowsPage.tsx:308-317
height: calc(100vh - var(--ant-navbar-height)) has no fallback value. In embedding/AI shells that don't define --ant-navbar-height (this repo only defines it at classic :root), the entire calc() becomes invalid at computed-value time and the height rule is dropped, so a fullHeight layout can collapse to auto height (combined with overflow: hidden). Add a fallback, e.g. calc(100vh - var(--ant-navbar-height, 64px)), so behavior is safe when the shell hasn't set the variable.

✅ Edge Case: AI-mode pages via withPageLayout lose compact padding

📄 openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:64 📄 openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:71
This commit removes the internal variant ?? (isAiMode ? 'compact' : 'default') resolution and defaults variant to 'default'. Since withPageLayout (hoc/withPageLayout.tsx) renders PageLayoutV1 without forwarding a variant, the ~30 HOC-wrapped pages — and 112 of 113 call sites overall — now always render the 16px default gutter, even in AI mode where they previously resolved to compact (8px). This reverts the PR's own stated goal of covering withPageLayout pages and can reintroduce the shell-level CSS overrides the PR set out to remove. Consider forwarding a variant prop through withPageLayout (or resolving AI mode inside the HOC) so those pages can opt into compact padding.

✅ Quality: Default gutter change (20px→16px) affects all PageLayoutV1 pages

📄 openmetadata-ui/src/main/resources/ui/src/components/PageLayoutV1/PageLayoutV1.tsx:71
The default padding class changed from p-x-box (20px) to tw:px-4 (16px). Because 112 of 113 PageLayoutV1 call sites do not pass an explicit variant, this is an app-wide horizontal-gutter change, not a localized one. It appears intentional (matches the commit message), but confirm the 4px reduction is desired across every page since the visual impact is broad and hard to catch in review.

🤖 Prompt for agents
Code Review: Standardizes PageLayoutV1 padding and height across classic and AI app modes with mode-aware variants and variable-driven fullHeight sizing. Consider reviewing the page-alert-offset change, as it now shrinks all 34 resizable-panel pages.

1. 💡 Edge Case: page-alert-offset now shrinks all 34 resizable-panel pages
   Files: openmetadata-ui/src/main/resources/ui/src/styles/components/resizable-panels-component.less:40-45, openmetadata-ui/src/main/resources/ui/src/styles/layout/page-layout.less:63-65

   Previously `.content-height-with-resizable-panel` used `@page-height` (navbar + 20px only) and only SSO/settings pages had explicit `:has(#page-alert)` height adjustments. The shared rule now unconditionally subtracts `var(--page-alert-offset, 0px)`, and `.page-layout-v1-center:has(#page-alert)` sets that to a fixed 78px — so every one of the ~34 pages using this class will shrink by 78px whenever any `#page-alert` is present, even pages that were never alert-aware before. Where the alert isn't sticky/78px tall or doesn't overlap the panel, this can produce a wrong gap or truncation. Worth spot-checking a non-SSO page that renders `#page-alert` (e.g. Explore, ingestion pages) to confirm the uniform 78px assumption holds.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

This branch was previously deployed

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

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants