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

refactor: Update textarea character limits #1906

Merged
merged 6 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ All notable changes to this project will be documented in this file. The format
- **Breaking Change**
- The main changes are around removing the try catch blocks so errors prevent the build from finishing (should cover #1618) and the export script was removed, since it isn't valid with [fallback: true](https://nextjs.org/docs/advanced-features/static-html-export#caveats). So we'll have to change the build command to replace `export` with `start`. ([#1861](https://github.com/bloom-housing/bloom/pull/1861))
- ** Breaking Change**: if your implementation relies on the export script, you'll need to use the start script, especially if you want to take advantage of the "fallback" setting for getStaticPaths
- Update textarea character limit and set default to 1000 ([#1906](https://github.com/bloom-housing/bloom/pull/1906)) (Dominik Barcikowski)

### UI Components

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const AdditionalDetails = () => {
id={"requiredDocuments"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("listings.importantProgramRules")}
name={"programRules"}
id={"programRules"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
<GridSection columns={2}>
Expand All @@ -41,7 +41,7 @@ const AdditionalDetails = () => {
id={"specialNotes"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
</GridSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const AdditionalEligibility = () => {
id={"creditHistory"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("listings.rentalHistory")}
name={"rentalHistory"}
id={"rentalHistory"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
<GridSection columns={2}>
Expand All @@ -41,15 +41,15 @@ const AdditionalEligibility = () => {
id={"criminalBackground"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("listings.sections.rentalAssistanceTitle")}
name={"rentalAssistance"}
id={"rentalAssistance"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
</GridSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ const BuildingFeatures = () => {
id={"amenities"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("t.accessibility")}
name={"accessibility"}
id={"accessibility"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
<GridSection columns={2}>
Expand All @@ -41,15 +41,15 @@ const BuildingFeatures = () => {
id={"unitAmenities"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("t.smokingPolicy")}
name={"smokingPolicy"}
id={"smokingPolicy"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
<GridSection columns={2}>
Expand All @@ -59,15 +59,15 @@ const BuildingFeatures = () => {
id={"petPolicy"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
<Textarea
label={t("t.servicesOffered")}
name={"servicesOffered"}
id={"servicesOffered"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridSection>
</GridSection>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ const RankingsAndResults = ({ listing }: RankingsAndResultsProps) => {
id={"whatToExpect"}
fullWidth={true}
register={register}
maxLength={600}
maxLength={1000}
/>
</GridCell>
</GridSection>
Expand Down
2 changes: 1 addition & 1 deletion ui-components/src/forms/Textarea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const Textarea = (props: TextareaProps) => {
disabled={props.disabled}
defaultValue={props.defaultValue}
id={props.id ?? props.name}
maxLength={props.maxLength ?? 150}
maxLength={props.maxLength ?? 1000}
name={props.name}
placeholder={props.placeholder ?? t("t.description")}
ref={props.register}
Expand Down