You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forms don't limit the width of a field, so something like SearchWithin can cause the whole form to expand if the scope is changed.
HelpText conditional rendering can cause focus to be lost, there's a current case of this with no visible label and only error text
馃 Expected Behavior
馃槸 Current Behavior
馃拋 Possible Solution
We explored a possible alternative, though it involves a new prop at the least in order to avoid breaking changes. https://github.com/adobe/react-spectrum/tree/explore-other-form-rendering-options
This takes advantage of CSS Grid and the auto-flow property not being dense.
Since we control rendering of all our input fields, we can omit the wrapping div and use auto-flow to place each part of an input field: label, helptext, and input.
馃敠 Context
馃捇 Code Sample
馃實 Your Environment
Software
Version(s)
react-spectrum
Browser
Operating System
馃Б Your Company/Team
馃暦 Tracking Issue (optional)
Followup from Design Review
Things to try
always render a wrapper
use display: contents for immediate field children of Form in label position side
this should allow us to leave the Wells/Flex alone
We shouldn't need nested Forms/FieldGroup/FieldSection as a result
Change assumption from label?, field, helptext? to [label?, [field, helptext?], contextual help?]
Move props back to the outer-wrapper, which can stay visible when in vertical stacking. When in side label case, apply props to the new element that will wrap (field, helptext). This should solve our issue with something like height being applied to the entire field.
馃悰 Bug Report
We have some limitations with our Forms due to the various different layouts options they have. Not all combinations yield the expected result.
馃 Expected Behavior
馃槸 Current Behavior
馃拋 Possible Solution
We explored a possible alternative, though it involves a new prop at the least in order to avoid breaking changes.
https://github.com/adobe/react-spectrum/tree/explore-other-form-rendering-options
This takes advantage of CSS Grid and the auto-flow property not being dense.
Since we control rendering of all our input fields, we can omit the wrapping div and use auto-flow to place each part of an input field: label, helptext, and input.
馃敠 Context
馃捇 Code Sample
馃實 Your Environment
馃Б Your Company/Team
馃暦 Tracking Issue (optional)
Followup from Design Review
Things to try
display: contents
for immediate field children of Form in label position sidelabel?, field, helptext?
to[label?, [field, helptext?], contextual help?]
To make sure that
display: contents
works, it may be easier to implement these ideas in these codesandboxes:https://codesandbox.io/s/distracted-sutherland-djobf?file=/src/App.js
https://codesandbox.io/s/strange-johnson-8dofo?file=/src/App.js
The text was updated successfully, but these errors were encountered: