fix(InputGroup): target the shared frame instead of five classes that no longer exist - #693
Merged
Merged
Conversation
… no longer exist The input group squared off a field by naming each family's wrapper - .autocomplete-input-group, .date-picker-input-group, .time-picker-input-group, .form-multi-select-input-group, .form-password. Every one of those became .form-control-group when the primitive landed, so none of these selectors has matched any markup since: the compiled CSS had zero rules connecting .input-group to a field's frame. The visible half of that is a hand-authored group - a password field, a chip input - which was missing from the list that makes a child flex, so the row broke onto three lines instead of one. The quiet half is the corner radius, which no field frame inside an input group has had squared off at all. Those five classes only stayed in the stylesheet because these rules named them, which is also why the class API guard never reported them missing: a dead selector keeps a class alive as far as the compiled CSS is concerned. They are registered as removals now. Locked by two visual cases. Reverting the fix takes the first from 425x37 to 425x109 pixels.
Coverage Report for CI Build 30922704625Coverage remained the same at 93.074%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats💛 - Coveralls |
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.
Found while moving the password icon into JavaScript.
The state of it
.input-groupsquared off a field component's frame by naming each family's wrapper:All five of those became
.form-control-groupwhen the primitive landed, so none of these selectors has matched any markup since. Measured on the compiled stylesheet: 0 rules connected.input-groupto a field's frame. After this change there are 7.Two consequences, one loud and one quiet:
flex: 1 1 auto; width: 1%), so a password field or chip input in an input group did not shrink — the row broke onto three lines.Why the class API guard never caught it
The guard compares the compiled CSS against the v5 snapshot. These five classes were still in the stylesheet — as the subjects of these dead selectors — so it concluded they still existed. A dead selector keeps a class alive as far as the compiled CSS is concerned. Deleting the selectors is what finally made them disappear, and the guard then reported all five, which is how I know the sweep is complete. They are registered as removals now.
The fix
The five family selectors collapse to one, in each of the three radius blocks and the two lists:
.form-passwordalso went from the sizing list and both focus/validationz-indexlists, replaced by.form-control-groupso a hand-authored frame is a first-class child of an input group.One oddity disappeared with it:
> .form-multi-select:not(:first-child) + .form-multi-select > .form-multi-select-input-grouprequired two adjacent multi selects to square off the second one — almost certainly a typo, and unreachable either way.Verification
Two visual cases, one per half of the contract — a hand-authored group and one a component builds for itself. Reverting the fix takes the first from 425×37 to 425×109 pixels, which is the broken row rendering itself.
The second is a regression lock rather than a proof: a corner radius on a 37 px element moves too few pixels to trip the comparator. The evidence for that half is the compiled-CSS count above.
Plus stylelint, fusv, the Sass suite, the class API guard, the other 28 visual baselines unchanged, and a full docs build. Migration guide carries the class mapping.