Skip to content

Commit

Permalink
Fix: allow empty domain descriptions
Browse files Browse the repository at this point in the history
  • Loading branch information
rdig committed Apr 19, 2024
1 parent 6029c79 commit 573be11
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 31 deletions.
6 changes: 3 additions & 3 deletions amplify/backend/api/colonycdapp/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -1854,7 +1854,7 @@ type DomainMetadata @model {
"""
Description of the Domain
"""
description: String!
description: String
"""
Color associated with the Domain
"""
Expand Down Expand Up @@ -1892,11 +1892,11 @@ type DomainMetadataChangelog {
"""
Description of the Domain before the change
"""
oldDescription: String!
oldDescription: String
"""
Description of the Domain after the change
"""
newDescription: String!
newDescription: String
}

"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ export const validationSchema = object()
.trim()
.max(MAX_COLONY_DISPLAY_NAME)
.required(() => 'Team name required.'),
domainPurpose: string().trim().max(MAX_DOMAIN_PURPOSE_LENGTH).notRequired(),
domainPurpose: string()
.trim()
.max(MAX_DOMAIN_PURPOSE_LENGTH)
.notRequired()
.nullable(),
domainColor: string().notRequired(),
createdIn: number().defined(),
decisionMethod: string().defined(),
Expand Down
2 changes: 1 addition & 1 deletion src/components/v5/common/TeamCard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export interface TeamCardProps {
meatBallMenuProps: MeatBallMenuProps;
balance: React.ReactNode;
title?: string;
description?: string;
description?: string | null;
links?: (LinkProps & {
key: string;
})[];
Expand Down
Loading

0 comments on commit 573be11

Please sign in to comment.