Skip to content

Comments

[6.x] Fix Spacer fieldtype collapse behaviour#13985

Merged
jasonvarga merged 5 commits into6.xfrom
spacer-fieldtype-should-collapse-in-stacked-layouts
Feb 18, 2026
Merged

[6.x] Fix Spacer fieldtype collapse behaviour#13985
jasonvarga merged 5 commits into6.xfrom
spacer-fieldtype-should-collapse-in-stacked-layouts

Conversation

@jaygeorge
Copy link
Contributor

@jaygeorge jaygeorge commented Feb 18, 2026

Description of the Problem

There are a couple of problems with the spacer field at lower viewports, described here #13983

  • Firstly the spacer field type has some hidden text which can make the field appear taller than standard fields at smaller viewports when the invisible text is wrapped.
  • Secondly the spacer field should collapse at mobile-like viewports where we use a stacked layout. Currently it causes a vertical gap.

What this PR Does

Taller Spacer Field (Before)

The spacer fieldtype had some extra text which meant it was "taller" than other fields at smaller viewports. Here it is around 78px vs the 66px height of a standard field, causing the row here to be taller than usual.

2026-02-18 at 16 26 26@2x

Taller Spacer Field (After)

The spacer should now be no taller than the other fields (66px here)

2026-02-18 at 16 25 24@2x

Gap (Before)

Gap (After)

How to Reproduce

  1. As per Spacer fieldtype should collapse in stacked layouts (small screen sizes) #13983 add some 33% fields with a 33% field with spacer, like so:

2026-02-18 at 16 50 50@2x

  1. Reduce the viewport width and see the problems listed above

jaygeorge and others added 5 commits February 18, 2026 16:23
…r to have extra height on small screens vs a standard field
the alternative to avoid the text would be to create an empty SpacerFieldtype component but that's unnecessary overhead.
@jasonvarga
Copy link
Member

jasonvarga commented Feb 18, 2026

Removes some words from the hidden text so wrapped text doesn't take up so much room.
Instead of reading Component does not exist it now reads shorter as

The whole reason that text is there is to see when you are using an invalid component. We want it to show.

For the spacer fieldtype though, we were just making it invisible. The text was still there. I've avoided rendering the text now.

@jasonvarga jasonvarga merged commit b891ae3 into 6.x Feb 18, 2026
12 checks passed
@jasonvarga jasonvarga deleted the spacer-fieldtype-should-collapse-in-stacked-layouts branch February 18, 2026 17:28
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.

Spacer fieldtype should collapse in stacked layouts (small screen sizes)

2 participants