contentful / create-contentful-app

Bootstrap a Contentful App

Home Page:https://contentful.com/developers/docs/extensibility/app-framework/create-contentful-app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Include the new default field component?

stefanjudis opened this issue Β· comments

Hey friends! πŸ‘‹

The field editors include a new component to render the Contentful default experience depending on the field type.

<FieldWrapper sdk={fieldExtensionSdk} name={fieldName} getEntryURL={(entry) => ''}>
    <Field sdk={fieldExtensionSdk} widgetId={widgetId} />
</FieldWrapper>

Would it make sense to include this component in https://github.com/contentful/create-contentful-app/blob/master/template/src/components/Field.tsx paired with a quick explanation?

Thanks! πŸ™‡

commented

Heya πŸ‘‹

Personally, I'd like to avoid showing default contentful behaviour behaviour for two reasons:

  • To avoid limiting imagination that entry fields are input boxes. Basically to allow someone to quickly understand that a field is basically taking over a specific area in content editing but isn't limited to what they can do there. e.g: they can render a map that sets values to other fields. So field element shouldn't necessary mean they can only deal with one property of the entity

  • To avoid the risk of devs thinking @contentful/default-field-editors is a required library to work with app framework. I'd prefer something separate like an examples folder or repo that can show various integrations with other libraries.

Let me know what you think

That does make a lot of sense. Thank you for the explanation Kado! I'm closing here then. :)

Would you be up for a comment pointing to the editors. In conversations I get the feeling that not everybody discovers the editors.

// If you want to extend Contentful's default editing experience
// Find Contentful's field editor components at https://github.com/contentful/field-editors

☝️ Or something. :) No problem if not. πŸ™‡

commented

For sure. I think even having some "additional libraries" section in the README would be a great improvement. I think the idea of a blank slate works well but it definitely helps a lot of know that we have a bunch of ready-made libraries to improve the experience. Feel free to pen a pull request for it :)