Repository navigation
Put form labels above their fields and line up the entry editor's status row - #269
Merged
Merged
Conversation
…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.
snoopdave
approved these changes
Nov 15, 2026
snoopdave
left a comment
Contributor
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-3andcol-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 lackedcol-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'slabelclass, 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, andbadge. The Status label'sforpointed 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: