This is a sub-issue of #1910624: [META] Introduce and complete configuration schemas in all of core.

Problem/motivation

#1866610: Introduce Kwalify-inspired schema format for configuration introduced some config schema coverage for views, but it is not complete. The changelog leads to (hopefully extensive) documentation on the format at http://drupal.org/node/1905070. While there are little cleanups planned for the format overall, the current format is a result of months of back and forths, so it should be perfectly fine to apply it more widely to core.

Proposed solution

Figure out the missing pieces that are not yet covered. Write schema file sections for them. Clean up / fix any issues in current schema.

Create a configuration schema for entity type form_mode.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jsbalsera’s picture

Status: Active » Needs review
FileSize
1 KB
9.66 KB
22.23 KB

Raw data:
raw.png

Form tab in the config inspector form view:

configuration editor form.png

jsbalsera’s picture

vijaycs85’s picture

  1. +++ b/core/modules/entity/config/schema/entity.schema.yml
    @@ -0,0 +1,27 @@
    +# Configuration schema for entity type entity_display
    

    entity_display?

  2. +++ b/core/modules/entity/config/schema/entity.schema.yml
    @@ -0,0 +1,27 @@
    +      label: 'Entity type this form or view mode is used for'
    ...
    +      label: 'Whether or not this form or view mode has custom settings by default'
    ...
    +      label: 'Whether or not the rendered output of this view mode is cached by default'
    

    Not sure about this labels. may need to make them bit short?

siva_epari’s picture

Removed the top comment & renamed labels of status as 'Status' and for cache as 'Cache'

Drupal Configuration editor

Status: Needs review » Needs work

The last submitted patch, 4: form_mode_entity_schema-2096371-4.patch, failed testing.

siva_epari’s picture

The previous patch was not a proper git patch. Reuploading proper patch.

Drupal Configuration editor

siva_epari’s picture

Status: Needs work » Needs review
sushantpaste’s picture

@Siva : patch seems to work fine. Checked with config inspector.
Here are small modification in patch with comment and label.

vijaycs85’s picture

Thanks for your work on this issue @sushantpaste and @epari.siva. Here is some minor review comments.

  1. +++ b/core/modules/entity/config/schema/entity.schema.yml
    @@ -0,0 +1,26 @@
    +# Configuration schema for entity type form_mode
    

    we may need to update title... how about 'Configuration schema for form mode of entities' or Configuration schema for the entity form mode'

  2. +++ b/core/modules/entity/config/schema/entity.schema.yml
    @@ -0,0 +1,26 @@
    \ No newline at end of file
    

    Needs a empty line at the end.

sushantpaste’s picture

@vijaycs85: Thanks for the review. Here is updated patch.

vijaycs85’s picture

Status: Needs review » Reviewed & tested by the community

Thanks again @sushantpaste.

+++ b/core/modules/entity/config/schema/entity.schema.yml
@@ -0,0 +1,26 @@
+      label: 'The human-readable name of the form or view mode'
...
+      label: 'Used for Entity type'

these labels are looks bit wired. But they are not really show stoppers.

sushantpaste’s picture

@vijaycs85: should we change that labels ?

webchick’s picture

Assigned: Unassigned » vijaycs85
Status: Reviewed & tested by the community » Needs review

'Used for Entity type' definitely sounds weird to me, but I'm not that familiar with form modes. Marking back to needs review for vijay.

vijaycs85’s picture

Re-rolling + label changes: As there is no UI for the fields in this schema, just using the human readable form of key as label.

vijaycs85’s picture

Assigned: vijaycs85 » Unassigned
ianthomas_uk’s picture

vijaycs85's changes are a little more than #14 suggests, becuase very similar code has already been committed. His new patch updated the labels for the patch on #10 and the code that was already committed.

aspilicious’s picture

Status: Needs review » Reviewed & tested by the community

Looks good. Glad to see this finally being done :)

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.