Skip to content

fix(MWPW-194198): allow pbu-left-section to shrink on viewport resize#764

Open
sanjayms01 wants to merge 2 commits intostagefrom
fix/MWPW-194198-marquee-responsive
Open

fix(MWPW-194198): allow pbu-left-section to shrink on viewport resize#764
sanjayms01 wants to merge 2 commits intostagefrom
fix/MWPW-194198-marquee-responsive

Conversation

@sanjayms01
Copy link
Copy Markdown
Collaborator

Summary

Fixes MWPW-194198 — the left copy and upload container (.pbu-left-section) was not shrinking horizontally as the browser viewport narrowed on the Firefly image-to-video marquee.

Root Cause

flex-shrink: 0 on .pbu-left-section prevented the flex child from compressing below its intrinsic content size — a standard flexbox constraint. Without explicit permission to shrink, the column held its natural width regardless of available space.

Fix

In unitylibs/core/widgets/prompt-bar-upload/prompt-bar-upload.css:

Property Before After
flex-shrink 0 1
min-width (not set) 0

Changing flex-shrink to 1 allows the column to compress, and adding min-width: 0 permits shrinking below intrinsic content width — both required for fluid flexbox behaviour.

Figma Spec Alignment

Node 8821:45487 (Screensizes) specifies grow: 1 (fluid) at all breakpoints (1440–1920px) with no fixed minimum, confirming the left column is designed to scale proportionally.

Test Checklist

References

The left copy and upload container was not compressing horizontally as
the browser window narrowed. Root cause: flex-shrink: 0 on .pbu-left-section
prevented the flex child from shrinking below its intrinsic content size.

Fix:
- Change flex-shrink: 0 -> flex-shrink: 1 so the column can compress
- Add min-width: 0 to allow shrinking below intrinsic content width

The Figma spec (node 8821:45487) uses grow: 1 (fluid) at all breakpoints
(1440-1920px) with no fixed minimum, confirming proportional scaling is
the intended behaviour.

Fixes: MWPW-194198
@aem-code-sync
Copy link
Copy Markdown

aem-code-sync Bot commented May 1, 2026

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

…ing prompt-bar-style pattern

The previous fix (flex-shrink: 1 + min-width: 0) was insufficient. The correct
pattern, as used by the prompt-bar-style widget, is to use CSS Grid with
minmax(0, 1fr) on the left column.

Before: .pbu-main used display:flex with flex-shrink:0 on .pbu-left-section
After:  .pbu-main uses display:grid with grid-template-columns: minmax(0, 1fr) auto

This mirrors exactly how .unity-prompt-bar-style .unity-slf-main handles its
fluid left column:
  grid-template-columns: minmax(0, 1fr) 508px

With grid, the left column (.pbu-left-section) is now a grid item constrained
by minmax(0, 1fr) — it grows to fill available space but can shrink all the way
to 0, preventing any overflow. The right column (.pbu-right-section) is sized
by auto, taking only its intrinsic width.

The mobile breakpoint (<=599px) reverts to display:flex with flex-direction:column
so the existing stacked mobile layout is unaffected.

Fixes: MWPW-194198
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.

1 participant