Skip to content

Align select and remote-select heights with input height#1528

Merged
maebeale merged 1 commit into
mainfrom
maebeale/story-form-select-height
May 25, 2026
Merged

Align select and remote-select heights with input height#1528
maebeale merged 1 commit into
mainfrom
maebeale/story-form-select-height

Conversation

@maebeale
Copy link
Copy Markdown
Collaborator

What is the goal of this PR and why is this important?

  • On the new story idea form, the three controls in the first row rendered at three different heights: the empty native Windows audience select was shortest, the Workshop TomSelect was slightly taller, and the populated Organization select was the tallest. They should all match the standard input height.

How did you approach the change?

  • Pinned line-height: 1.5rem on select.select-placeholder so the smaller placeholder font (0.875rem) no longer collapses the box, keeping empty selects the same height as populated ones.
  • In remote_select_controller.js, replaced the min-height: 0 reset on .ts-control with min-height: 1.5rem and pinned line-height: 1.5rem on the control, the inner input, and .item so TomSelect's content box matches a single line of text-base. Combined with the wrapper's existing py-2 and border, total height ends up at the same 42px as a native input.

UI Testing Checklist

  • On /story_ideas/new, the Windows audience, Workshop (TomSelect), and Organization controls all sit at the same height as the surrounding text inputs, both empty and after a value is selected.
  • Other forms that use remote-select (event registrations, workshop variations, story form, people/organization affiliations) still render correctly.
  • Other native selects with the placeholder caret styling render at full input height when empty.

Anything else to add?

  • The line-height was the missing piece — without it, both the smaller-font placeholder and TomSelect's default sizing produce a shorter box. Pinning it keeps the placeholder visually smaller without affecting layout.

🤖 Generated with Claude Code

Native selects with a placeholder were rendering shorter because
.select-placeholder shrinks font-size to 0.875rem without pinning
line-height, so the box compressed. TomSelect controls were also
slightly shorter since the inner control had min-height: 0 and the
input's line-height wasn't pinned.

Lock line-height to 1.5rem on .select-placeholder and on TomSelect's
.ts-control / inner input / .item so all variants line up at the
standard input height.
@maebeale maebeale requested a review from jmilljr24 May 25, 2026 17:21
@maebeale maebeale marked this pull request as ready for review May 25, 2026 17:21
@maebeale maebeale merged commit 0d6e6b3 into main May 25, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/story-form-select-height branch May 25, 2026 19: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.

2 participants