Skip to content

Expose metadata types in product create#11802

Open
sebastianekstrom wants to merge 1 commit into
mainfrom
feature/meta-data-types
Open

Expose metadata types in product create#11802
sebastianekstrom wants to merge 1 commit into
mainfrom
feature/meta-data-types

Conversation

@sebastianekstrom
Copy link
Copy Markdown
Contributor

@sebastianekstrom sebastianekstrom commented May 20, 2026

Expose the metadata type in product creation/editing. The backend supports string | bool | number but we only expose strings in the UI. This can make it tricky to know exactly what a value is.

  • String: Text input
  • Number: Number input
  • Boolean: True/False dropdown

Also sprinkled some of that sweet sweet monospace font in there to better convey what does what.

Before

Screenshot 2026-05-20 at 20 57 38

After

Screenshot 2026-05-20 at 21 10 59

@sebastianekstrom sebastianekstrom requested a review from a team as a code owner May 20, 2026 19:01
@vercel
Copy link
Copy Markdown

vercel Bot commented May 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
polar Ready Ready Preview, Comment May 21, 2026 10:07am
polar-sandbox Ready Ready Preview, Comment May 21, 2026 10:07am

Request Review

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 20, 2026

Preview Environment
URL: https://polar-preview-vm.taildbff7b.ts.net/pr-11802
API: https://polar-preview-vm.taildbff7b.ts.net/pr-11802/v1/
Logs: backend
SHA: dac2bfd0694940ab3ee7aded69dcbd2817752d00

Copy link
Copy Markdown
Contributor

@pieterbeulque pieterbeulque left a comment

Choose a reason for hiding this comment

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

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.

@frankie567
Copy link
Copy Markdown
Member

@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.

@pieterbeulque
Copy link
Copy Markdown
Contributor

Oh, yes, definitely, that's even cleaner/easier!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants