Repository navigation
Conversation
A listing used as a field widget sits inside form[name=edit_form], and every input and select in there is forced to width:100% !important so that a result field fills its cell. The listing's own search box is an input-group, which Bootstrap lays out by sizing the field with width:1%: the field claimed the whole row instead, and the saved filters button and the two search buttons wrapped onto lines of their own. An input-group is a row by construction, so the fields inside one keep the width Bootstrap gives them.
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.
Description of the issue/feature this PR addresses
A listing used as a field widget renders inside
form[name="edit_form"], andforms.scssforces every input and select in there to the full width of its cell:That is right for a result field in a cell and wrong for the listing's own search box, which is a Bootstrap
input-group. An input-group only lays out on one line because Bootstrap sizes the field inside it withwidth: 1%and lets flex-grow hand it the leftover space. The!importantabove wins, the field claims the whole row, and the saved filters button and the two search buttons wrap onto lines of their own.Current behavior before PR
Measured on the Specifications field of an analysis specification, in a 314px wide container:
input-group-prependform-controlinput-group-appendThree rows, 77px tall.
Desired behavior after PR is merged
input-group-prependform-controlinput-group-appendOne row, 31px tall.
Implementation
A counter-rule for the fields inside an input-group, which is a row by construction:
Nothing else is touched: an input that is not inside an input-group still fills its cell.
Verification
Measured in the browser before and after, on the Specifications field shown above. The screenshots come from a training dataset.
Affects every listing used as a field widget: analysis specifications, the services of an analysis profile, the services of a sample template, the layout of a worksheet template.
--
I confirm I have tested this PR thoroughly and coded it according to PEP8
and Plone's Python styleguide standards.