Skip to content
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

feat: Support 'fullWidth' prop on all text fields #979

Merged
merged 3 commits into from
Dec 7, 2023
Merged

Conversation

bdow
Copy link
Contributor

@bdow bdow commented Dec 6, 2023

Adds support for a PresentationFieldProps.fullWidth property. The following components will respect the property:

  • FormLines
  • TextField
  • TextAreaField
  • RichTextField
  • SelectField
  • MultiSelectField
  • DateField
  • NumberField
  • TreeSelectField

Updates the FormLines component to default to the "lg" size instead of "full". This will hopefully minimize the impact on existing layouts as the previous default width for each field within FormLines was 550px. By using the lg size, we'll continue to default the fields within FormLines to 550px.

@@ -90,6 +90,8 @@ export function ComboBoxInput<O, V extends Value>(props: ComboBoxInputProps<O, V
const multilineProps = allowWrap ? { textAreaMinHeight: 0, multiline: true } : {};
useGrowingTextField({ disabled: !allowWrap, inputRef, inputWrapRef, value: inputProps.value });

console.log("otherProps", otherProps);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Snuck in

Copy link
Contributor

@stephenh stephenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the idea that text fields were just getting ridiculous too wide, so 550px is a better default max size? That makes sense...

Per making FormLines be lg, that sgtm but honestly not a ton of places use that yet 🤷 . Should be good though!

@bdow
Copy link
Contributor Author

bdow commented Dec 6, 2023

Is the idea that text fields were just getting ridiculous too wide, so 550px is a better default max size? That makes sense...

No, 550px is currently the default max-width. With this PR we are allowing the option to remove the max-width now. It sounds like in some instances we want to allow them to be wider.

Copy link
Contributor

@stephenh stephenh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this PR we are allowing the option to remove the max-width now.

Ah gotcha! Kinda curious but sounds good.

@bdow bdow force-pushed the full-width-text-field branch from 3ddc8eb to a2b9fe2 Compare December 7, 2023 01:46
@bdow bdow merged commit 6bf26ac into main Dec 7, 2023
6 checks passed
@bdow bdow deleted the full-width-text-field branch December 7, 2023 02:43
homebound-team-bot pushed a commit that referenced this pull request Dec 7, 2023
## [2.327.0](v2.326.1...v2.327.0) (2023-12-07)

### Features

* Support 'fullWidth' prop on all text fields ([#979](#979)) ([6bf26ac](6bf26ac))
@homebound-team-bot
Copy link

🎉 This PR is included in version 2.327.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants