This is basically an API module at this point. There is no actual field widget usable on an entity form out of the box, just an abstract class and some suggestions for how to implement. We should provide the most basic widget that allows for adding a schema and UI schema directly in the field settings form, in a textarea. This will allow people to try out the module, get a sense of how it works, even if they ultimately plan to implement their own custom widget.

It would also let us easily QA new MRs via tugboat previews, which are already building.

It minimum, it should validate the JSON and UI schemas on submit. Bonus points for a more friendly JSON editor in the config, but maybe not worth the effort. Could support jsoneditor if present, but that could be a follow-up issue.

Most of this my already be implemented in #3565788: Widgets, views support, including changes from #3565343 and #3565448. If so let's just create an MR specific to that widget.

I am on the fence on whether this should block a 1.0 release. It would certainly be ideal but I also think we need a stable release of this module before we can make this dependency for its old parent module DKAN, so we may just go ahead with an "API-only" 1.0 release if this takes too long.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dafeder created an issue. See original summary.

dafeder’s picture

Have started trying to isolate the "static widget" @viappidu added in #3565788: Widgets, views support, including changes from #3565343 and #3565448...

dafeder’s picture

I have this working pretty well - one thing is I'm not sure about the word "static" to describe it. Going to revisit tomorrow with fresh eyes, maybe ask for a second opinion.

Thinking a future enhancement could be that if you have the jsoneditor library installed (a soft dependency of https://www.drupal.org/project/json_field/) it uses that widget for the config fields where you have to enter JSON.

dafeder’s picture

I'm also going to try to get tugboat previews working before merging this, since this make the module actually usable without DKAN or another implementation of the base widget. I thought we were good on those but @swirt noticed them failing.

dafeder’s picture

Status: Active » Needs review

  • dafeder committed cd62eb81 on 1.x
    feat: #3572908 Include default working widget
    
    By: dafeder
    By: viappidu
    
dafeder’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

dafeder’s picture

Version: 1.x-dev » 1.0.0