Expose metadata types in product create#11802
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Preview Environment |
pieterbeulque
left a comment
There was a problem hiding this comment.
Can you also do the back-end changes to cast the submitted data to the correct data type again before storing?
On its own, it's pretty unexpected to actively declare something is a boolean only to then get "true" back.
|
@pieterbeulque Agree, but I think the casting should be done on the UI's side when posting to the API. The backend has no data type concept, so this would require a complex schema change. |
|
Oh, yes, definitely, that's even cleaner/easier! |
6e3367a to
dac2bfd
Compare
Expose the metadata type in product creation/editing. The backend supports
string | bool | numberbut we only expose strings in the UI. This can make it tricky to know exactly what a value is.Also sprinkled some of that sweet sweet monospace font in there to better convey what does what.
Before
After