Commit 3850aa9
Upgrade nudge: fix collapsed banner outside the block editor (#50873)
The pre-rendered frontend upgrade nudge shares its markup with the editor's
paid-block banner, but not its stylesheet. The spacing rules live in
extensions/extended-blocks/paid-blocks/editor.scss, which is editor-only and
never loads on the frontend, so the banner collapsed to the 28px height of its
own button with the Upgrade button flush against the top and bottom edges.
Add the missing rules to extensions/shared/components/style.scss, which already
exists to carry editor styling to the frontend and is only imported by the
pre-rendered components entry, so the change is scoped to the bundle with the
bug.
Also:
- Stretch the banner to the full row. It is printed as a sibling of the block,
so inside a flex container it shrinks to its content width. Uses width rather
than flex-basis, because a Form saved with a layout attribute renders a column
flex container where flex-basis sizes the block axis and leaves width alone.
- Stop the shared Nudge emitting a literal `undefined__description` class. The
description built its class with a bare template literal while the title
already used a guarded clsx call.
- Fix a dead selector in paid-blocks/editor.scss left behind when the nudge's
editor-canvas class was renamed from `wp-block` to `jetpack-nudge-canvas`.
Fixes FORMS-737
Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/31536622430
Upstream-Ref: Automattic/jetpack@d1f75e21 parent d51ac30 commit 3850aa9
0 file changed
0 commit comments