-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inactive input-message
adds white-space below a label
#5130
Comments
The demo of the buggy behavior of Calcite Input Message is out of date. There has been some major changes to Calcite Input Message between |
I'm still able to reproduce on Edit:
|
@eriklharper @macandcheese @benelan wasn't it the plan for this component to go away and be rolled into If so, should we deprecate it? |
I know it has been mentioned before, although I can't find an issue for it. I think it might have to be rolled into It might be good to re-evaluate this as part of the larger form / validation story. I'd imagine that will be a larger epic for another major release, so not sure if we are quite ready to deprecate it? |
I honestly thought we were going into the opposite direction by splitting up |
By rolled into, I just meant having a slot within |
Yeah I think that one should wait. Input needs a lot of work; it's all over the place right now. Besides the validation/
I think it would be better to get all/most of those changes into a single major release if possible. † It may make sense to remove |
I think that’s a fair summary, although I do think this particular issue scope is much smaller - just fixing the white space with our current component - #6037 Maybe an issue with the above thoughts would be good? |
Yeah I agree that we should fix this white space issue now. But deprecating/moving the |
Adding it as part of label might make the most sense. Or at least a slot of label. If we do keep it then we should consider renaming it. It's really a form or label message |
Yeah I like the idea of making it part of label. Input isn't the only form component that can benefit from validation messages |
Agreed. It should not be tied to just input |
@driskull @benelan the issue with the whitespace "bug" here is two fold. The components involved here use margin which is pushing around content they don't personally have control over (child controlling the layout of it's parent which is a design system anti-pattern) and that the label itself is using flex-gap to simultaneously layout it's children which adds a gap between input and input-message unless input-message's styles are set to "display: none" which can only be achieved by either setting the attribute on the Host or by a user setting the "hidden" attribute themselves. A full fix will require a refactor of label as well as input and input-message. OR documentation instructing users to simply add "hidden" attribute to empty input-message which seems like a better solution at this time. |
Agreed. Lets hold off on this one until Franco is back. Maybe we can deprecate this component and build it into label after 1.0. |
where should the documentation go? |
Yeah agreed. I'd put it on the component's documentation page (source) under a new Overview/Usage section. Copying the format from other component doc pages, e.g. alert. @geospatialem do you have bandwidth to help add the doc? |
Definitely, can add it to the doc page today, assuming we're adding a deprecation to the |
No deprecation yet. But we need to alert users that they must add a "hidden" attribute to an empty input-message or there will be weird extra spacing. |
Added to the doc site, which will go live next Wednesday. Updating to the |
Actual Behavior
Given a
<calcite-label>
that contains a<calcite-input>
and an inactive<calcite-input-message>
, its bottom white-space is greater than a<calcite-label>
that only contains a<calcite-input>
.Expected Behavior
Given a
<calcite-label>
that contains a<calcite-input>
and an inactive<calcite-input-message>
, its bottom white-space is the same as a<calcite-label>
that only contains a<calcite-input>
.Reproduction Sample
https://codepen.io/nwhittaker-esri/pen/QWmBoEeUpdated codepen - https://codepen.io/mac_and_cheese/pen/BaxMBmm
Reproduction Steps
<calcite-label>
are different heightsThe height of the 2nd box should match the height of the 1st box.
Reproduction Version
beta.86
Relevant Info
This inconsistency adds difficulty to maintaining a vertical rhythm within a form that includes only some inputs with an assoc. input message.
A quick fix could be to give
<calcite-input-message>
adisplay: none
style when itsactive
attribute is absent.Regression?
No response
The text was updated successfully, but these errors were encountered: