Skip to content

Put form labels above their fields and line up the entry editor's status row - #269

Merged
mraible merged 1 commit into
masterfrom
fix-admin-form-spacing
Nov 15, 2026
Merged

mraible merged 1 commit into
masterfrom
fix-admin-form-spacing

Conversation

@mraible

@mraible mraible commented Nov 14, 2026 •

Copy link
Copy Markdown
Contributor

The admin forms put each label in a column beside its field. Short labels such as Title sat a long way from their inputs, and long ones such as "Email address of weblog owner" wrapped onto two lines and made their rows taller than the rest. This puts labels above their fields at every width, which is what narrow screens already showed.

  • roller.css: inside .form-horizontal, the label and field columns (col-sm-3/col-md-3 and col-sm-9/col-md-9) become full-width rows, and the label's padding is adjusted to sit just above its field. An empty label that was only there to indent a checkbox is hidden, so checkbox rows line up with the fields.
  • EntryEdit.jsp: the Permalink and Status rows were hand-written and out of step with the generated rows around them. Their labels lacked col-form-label, so they were regular weight. The values were wrapped in a <p>, which added a 10px top margin. The status used Bootstrap 3's label class, which Bootstrap 5 shows as coloured text with no padding. They now use the same classes as the other rows, a <div> for the value, and badge. The Status label's for pointed at an id that doesn't exist, so it's gone.

No markup changes outside those two rows; every other form picks the layout up from the stylesheet.

I checked it on a copy of a real site (22 admin pages, 115 form rows) at 1200px and 390px: no row is left side by side, nothing overflows, and there are no script errors. I didn't run the UI tests locally. They don't reference the markup changed here, and CI runs them on this pull request.

The entry editor and the site configuration page at 1200px wide, before and after:

Before After
New Entry before New Entry after
Roller Configuration before Roller Configuration after

…tus row

The admin forms put each label in a column beside its field. A short label such as Title sat a long way from its input, and long ones such as "Email address of weblog owner" wrapped onto two lines and made their rows taller than the rest. Labels now sit above their fields at every width, as they already did on narrow screens: every label fits on one line, fields use the full width, and rows whose first column was an empty label, there only to indent a checkbox, lose the indent.

On the entry editor, the Permalink and Status rows were hand-written and out of step with the generated rows around them. Their labels lacked col-form-label, so they were regular weight; the values were wrapped in a paragraph that added a top margin; and the status used Bootstrap 3's label class, which Bootstrap 5 renders as plain coloured text with no padding. They now use the same label classes as the other rows, a div for the value, and Bootstrap 5's badge. The Status label also pointed at an id that does not exist.

Checked on 22 admin pages with 115 form rows: none is left side by side and none overflows.
@mraible
mraible requested a review from snoopdave November 15, 2026 00:08
@mraible mraible added the 7.0.0 label Nov 15, 2026

@snoopdave snoopdave 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.

PR-Review: no issues. Note: label:empty only matches labels with no whitespace inside. The hand-written indent labels qualify; if a gap shows up later on a Struts-generated row, give that label a class instead.

@mraible
mraible merged commit fd0db47 into master Nov 15, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants