-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow field def containedExamples to render #2178
base: main
Are you sure you want to change the base?
Conversation
3180076
to
0cf9e05
Compare
0cf9e05
to
923e1a8
Compare
Pause review here. There is some bug on primitive handling which requires more card-api tweaks |
The bug in here is when serializing (im not sure in deserializing) URL extends StringField. URL is a primitive so it doesn't serialize meta.fields. That means it doesn't have the ability to render a different template. |
74384e1
to
332df0d
Compare
I have updated #2189. And will continue work once that is merged |
This PR builds on on #2189 and #2105.
Previously, Specs could not render fields
Now, Specs render fields based upon the code ref it contains
Further Note
Here, Specs are 1 to 1 with code refs so it doesn't really need a "different" subclass rendering of the field when showing containedExamples. However, if we want to include the UI affordance for selecting a template for field that is of a particular type, we can easily do so by dynamically specifying the typeConstraint (but this might not be the concern of Spec).
I saw some rendering thing with the ColorField. I'll look into it independently