twenty
twenty copied to clipboard
Field name and options should be normalized to A-Z+0-9
I tried to create a field "industry" on the company object.
One of the options had emoji in its value:
But now my workspace is broken and I get this error everywhere:
Related: #3066 #2146
Sentry issue: PROD-3C
Hey @FelixMalfait I encountered a similar issue in #3270.
It looks like while create options, we are assigning value
property as the Name
of enum. This error is thrown because GraphQL has internal validation on GraphQLEnumType. I did a workaround from the front end to solve this, but I guess that shouldn't be long term solution.
@AdityaPimpalkar You're right the problem is actually also related to #3270, but in that case the name inside the enum are chosen by the user. We should change the regex to only accept [a-zA-Z]+
, and drop number and emoji support.
We should add a new field inside FieldMetadataDefaultOptions
for emoji, and contact it in the front side.