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.

Files: 
CommentFileSizeAuthor
#14 2096371-form_mode-config-schema-14.patch1.49 KBvijaycs85
PASSED: [[SimpleTest]]: [MySQL] 59,239 pass(es). View
#10 form_mode_entity_schema-2096371-10.patch1.23 KBsushantpaste
PASSED: [[SimpleTest]]: [MySQL] 58,921 pass(es). View
#8 form_mode_entity_schema-2096371-8.patch1.28 KBsushantpaste
PASSED: [[SimpleTest]]: [MySQL] 60,350 pass(es). View
#6 form_mode_entity_schema-2096371-5.patch841 bytesepari.siva
PASSED: [[SimpleTest]]: [MySQL] 60,375 pass(es). View
#4 configuration editor form.png24.02 KBepari.siva
#4 form_mode_entity_schema-2096371-4.patch841 bytesepari.siva
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch form_mode_entity_schema-2096371-4.patch. Unable to apply patch. See the log in the details link for more information. View
#2 configuration editor form.png26.45 KBjsbalsera
#2 form_mode_entity_schema-2096371-3.patch1 KBjsbalsera
PASSED: [[SimpleTest]]: [MySQL] 59,114 pass(es). View
#2 interdiff.txt754 bytesjsbalsera
#1 configuration editor form.png22.23 KBjsbalsera
#1 raw.png9.66 KBjsbalsera
#1 form_mode_entity_schema-2096371-2.patch1 KBjsbalsera
PASSED: [[SimpleTest]]: [MySQL] 59,093 pass(es). View

Comments

jsbalsera’s picture

Status: Active » Needs review
FileSize
1 KB
PASSED: [[SimpleTest]]: [MySQL] 59,093 pass(es). View
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

FileSize
754 bytes
1 KB
PASSED: [[SimpleTest]]: [MySQL] 59,114 pass(es). View
26.45 KB

There was a typo
configuration editor form.png

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?

epari.siva’s picture

Issue summary: View changes
FileSize
841 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch form_mode_entity_schema-2096371-4.patch. Unable to apply patch. See the log in the details link for more information. View
24.02 KB

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.

epari.siva’s picture

FileSize
841 bytes
PASSED: [[SimpleTest]]: [MySQL] 60,375 pass(es). View

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

Drupal Configuration editor

epari.siva’s picture

Status: Needs work » Needs review
sushantpaste’s picture

FileSize
1.28 KB
PASSED: [[SimpleTest]]: [MySQL] 60,350 pass(es). View

@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

FileSize
1.23 KB
PASSED: [[SimpleTest]]: [MySQL] 58,921 pass(es). View

@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

FileSize
1.49 KB
PASSED: [[SimpleTest]]: [MySQL] 59,239 pass(es). View

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.