Skip to content

fix(ui): apply PageHeader logo size constraints to nested elements#1762

Merged
edda merged 2 commits into
mainfrom
edda/fix-pageheader-wrapped-logo
Jun 16, 2026
Merged

fix(ui): apply PageHeader logo size constraints to nested elements#1762
edda merged 2 commits into
mainfrom
edda/fix-pageheader-wrapped-logo

Conversation

@edda

@edda edda commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Switches PageHeader's logo container from the direct-child variant (jn:*:) to the universal-descendant variant (jn:**:), so size constraints reach the actual logo element regardless of nesting depth (e.g. a logo SVG wrapped in an anchor).
  • Adds a WithWrappedLogo Storybook story documenting and verifying the behavior with a logo nested inside a link.

Closes #1761

Test plan

  • Storybook: open Layout/PageHeaderWithWrappedLogo, verify the wrapped logo respects the header's fixed height
  • Storybook: verify all other PageHeader stories still render unchanged
  • pnpm --filter @cloudoperators/juno-ui-components test passes
  • pnpm lint and pnpm typecheck pass

The logo container used the direct-child variant (jn:*:), so size
constraints did not apply when consumers passed a wrapped logo (e.g.
an anchor containing an SVG). Switch to the universal-descendant
variant (jn:**:) so the constraints reach the actual logo element
regardless of nesting depth, ensuring it fits the fixed-height header.

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
Copilot AI review requested due to automatic review settings June 15, 2026 16:23
@edda edda requested review from a team and franzheidl as code owners June 15, 2026 16:23
@changeset-bot

changeset-bot Bot commented Jun 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b2718d0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@cloudoperators/juno-ui-components Patch
@cloudoperators/juno-app-carbon Patch
@cloudoperators/juno-app-doop Patch
@cloudoperators/juno-app-example Patch
@cloudoperators/juno-app-greenhouse Patch
@cloudoperators/juno-app-heureka Patch
@cloudoperators/juno-app-supernova Patch
@cloudoperators/juno-app-template Patch
@cloudoperators/juno-messages-provider Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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

Fixes PageHeader logo sizing when consumers pass a wrapped logo (e.g. <a><svg/></a>), by switching the logo container constraints from applying only to direct children to applying to all descendants, and documents the behavior via Storybook.

Changes:

  • Update PageHeader logo container Tailwind selectors from jn:*: to jn:**: so constraints reach nested logo elements.
  • Add a WithWrappedLogo Storybook story showcasing a logo wrapped in a link.
  • Add a changeset for a patch release of @cloudoperators/juno-ui-components.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
packages/ui-components/src/components/PageHeader/PageHeader.component.tsx Apply logo sizing constraints to all descendants so wrapped logos are constrained correctly.
packages/ui-components/src/components/PageHeader/PageHeader.stories.tsx Add a Storybook story demonstrating/validating wrapped logo behavior.
.changeset/fix-pageheader-wrapped-logo.md Record patch release note for the wrapped-logo sizing fix.

@github-actions

github-actions Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-06-16 07:17 UTC

…ader logo

Address review feedback:
- Add aria-label to the wrapped-logo story's anchor so it has an
  accessible name (previously the link had only an SVG with empty alt).
- Add a Vitest test that renders a wrapped logo and asserts the
  descendant size constraints (jn:**:) are applied to the logo container,
  guarding against regressions of the selector variant.

Signed-off-by: Esther Schmitz <esther.schmitz@sap.com>
@edda edda merged commit 0e1f1d6 into main Jun 16, 2026
24 checks passed
@edda edda deleted the edda/fix-pageheader-wrapped-logo branch June 16, 2026 07:16
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.

PageHeader: logo size constraints not applied to nested logo elements

4 participants