ckanext-scheming icon indicating copy to clipboard operation
ckanext-scheming copied to clipboard

Integrate custom extra metadata

Open pdekraker-epa opened this issue 2 years ago • 4 comments

Add a scheming preset for custom metadata key value pairs

Solution previously mentioned in #14 and #229 has a couple issues:

  • All or nothing (is enabled for all schemas)
  • Incompatible with multi-page forms (fields appear on each page)
  • Cannot control placement within the form

This change adds a preset using the underlying CKAN form element. The associated field must be called "extras" to bypass schema conversion. If there is a better approach please advise.

pdekraker-epa avatar Nov 30 '22 04:11 pdekraker-epa

Can this be merged?

GordianDziwis avatar Jun 14 '23 18:06 GordianDziwis

I believe if functions properly. The added preset is however not documented in the README.

pdekraker-epa avatar Jun 14 '23 18:06 pdekraker-epa

@wardi could you merge this PR or provide feedback on additional changes that may be required?

pdekraker-epa avatar Nov 07 '23 13:11 pdekraker-epa

I don't use this feature because I don't like how users can accidentally cause the site to break by using the same names for their custom extras that are used in the schema. Once we start storing scheming extra fields in plugin_extras instead of extras this problem will be resolved.

I'm not against merging, though because certainly some sites find this feature useful. I think I would add a warning on the README about users needing to avoid field names used in the schema, at least.

About the name of the feature, what do you think about "free-form extras" or something similar that implies a lack of standardization instead of "custom extras"?

wardi avatar Nov 07 '23 15:11 wardi