Skip to content

Commit c6e9528

Browse files
committed
Change all goto page inputs on edit routes page to be the same width
The width of a select input depends on the longest option in the input; on the edit routes page which has lots of them each with different options the last select input on the page can end up much less wide than the others, which is visually distracting. This commit fixes that issue by using a width override to make each input take up the full available space of the grid column. This doesn't take up the full width of the viewport, because of the grid, but is still a bit wider than strictly necessary; however all the other width overrides are not wide enough for a question of reasonable length.
1 parent aeaa95b commit c6e9528

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

app/views/routes/show.html.erb

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,13 @@
3333
route_form.hidden_field(:id) +
3434
route_form.hidden_field(:page_id) +
3535
route_form.hidden_field(:answer_value) +
36-
route_form.govuk_select(:goto, options_for_select(route_form.object.goto_options, route_form.object.goto), label: route_form.object.label, id: route_form.field_id(:goto))
36+
route_form.govuk_select(
37+
:goto,
38+
options_for_select(route_form.object.goto_options, route_form.object.goto),
39+
label: route_form.object.label,
40+
id: route_form.field_id(:goto),
41+
class: ["govuk-!-width-full"],
42+
)
3743
end %>
3844
</li>
3945
<% end %>

0 commit comments

Comments
 (0)