Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Constant value fields #770

Open
benjelloun opened this issue Nov 26, 2024 · 3 comments
Open

Constant value fields #770

benjelloun opened this issue Nov 26, 2024 · 3 comments
Assignees

Comments

@benjelloun
Copy link
Contributor

It's often useful to associate key-value pairs at the level of a RecordSet. We propose doing that by adding a "value" property to Field that allows it to have a fixed value.

This is similar to the "data" property of RecordSet, that makes it possible to specify the values (records) contained in a RecordSet directly in the Croissant definition.

The "value" of a Field can be atomic, for Fields with a simple dataType, or it can be structured, in case the Field has SubFields. For the latter case, a JSON string can be used to represent the value.

@csbrown
Copy link

csbrown commented Dec 19, 2024

Do you have a specific example use case where this would be helpful?

@csbrown
Copy link

csbrown commented Jan 27, 2025

@benjelloun could I get some advice here? It looks like I'll need to update the Field description in the 1.1 spec here. I'll also need to update the field node code here and possibly the editor code here? Are there any other tools that might need to be updated and tested to work with a value property?

I am seeing some tests for Field formatting that I can add to here. It looks like the testing apparatus involves a half dozen different frameworks, not all of which I'm familiar with, so suggestions on how to test this would be 💯

@csbrown
Copy link

csbrown commented Jan 27, 2025

Also, would like to recommend that the 1.1 spec be a new branch rather than a parallel file. This will help with the code and spec being in sync (viz. should we update 1.0 spec code to support 1.1 spec?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

2 participants