Enhancement: Add Support for Floating Point Number Field #413

Closed
opened 2026-10-05 02:45:54 +02:00 by adam · 4 comments
Owner

I am currently working on a project where I need to store geolocations in my .mdx files as lat and lng fields.
Because lat and lng coordinates are floating point numbers and can be negative, the current number field type does not work.

I would love to either add a separate float field type or allow a numberFormat or similar field that allows to specify what number type is expected.

Expressing these as a string and then parsing them works, but is not ideal.

I think this would not only be beneficial for my use case but for a lot more.

I am currently working on a project where I need to store geolocations in my .mdx files as lat and lng fields. Because lat and lng coordinates are floating point numbers and can be negative, the current number field type does not work. I would love to either add a separate float field type or allow a numberFormat or similar field that allows to specify what number type is expected. Expressing these as a string and then parsing them works, but is not ideal. I think this would not only be beneficial for my use case but for a lot more. <!-- github-sync-id:1609346169 -->
adam closed this issue 2026-10-05 02:45:54 +02:00
Author
Owner

Thanks @LucasNeuhausDev for the suggestion.

Thanks @LucasNeuhausDev for the suggestion. <!-- github-comment-id:1454669869 -->
Author
Owner

To have better number field support, there will be a new numberOptions setting coming which you can use in combination with your number field.

Here is an example:

{
  "title": "Float field",
  "name": "float",
  "type": "number",
  "numberOptions": {
    "isDecimal": true,
    "min": 0,
    "max": 100,
    "step": 0.01
  }
}

This way, you are able to specify more than only if it is a decimal value. You'll also be able to set the min, max, and step value.

To have better `number` field support, there will be a new `numberOptions` setting coming which you can use in combination with your `number` field. Here is an example: ```json { "title": "Float field", "name": "float", "type": "number", "numberOptions": { "isDecimal": true, "min": 0, "max": 100, "step": 0.01 } } ``` This way, you are able to specify more than only if it is a decimal value. You'll also be able to set the `min`, `max`, and `step` value. <!-- github-comment-id:1454699551 -->
Author
Owner

You'll be able to test it out in the latest BETA version.

You'll be able to test it out in the latest BETA version. <!-- github-comment-id:1454701165 -->
Author
Owner

Exactly what I was looking for ♡.

I came across the project via the livestream from you and James Q Quick and added it to my side project while watching the Stream.
Just AMAZING work!
Exactly what I needed without looking for it 😃

I will check out the Beta!

Exactly what I was looking for ♡. I came across the project via the livestream from you and James Q Quick and added it to my side project while watching the Stream. Just AMAZING work! Exactly what I needed without looking for it 😃 I will check out the Beta! <!-- github-comment-id:1454704935 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/vscode-front-matter#413