Problem/Motivation

We have not schema for all bootstrap displays. It will be nice to start working on it and add config schema for all displays.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

lamp5 created an issue. See original summary.

lamp5’s picture

Status: Active » Needs review
StatusFileSize
new696 bytes

It is first schema for bootstrap grid, nice for first commit and continuing works.

Status: Needs review » Needs work

The last submitted patch, 2: views_bootstrap-3260347-2.patch, failed testing. View results

shelane’s picture

Version: 8.x-4.x-dev » 5.4.x-dev
paweldxm’s picture

StatusFileSize
new1.22 KB

New .patch include more missing values in schema.

splash112’s picture

Yes, please! But make some taxtfields "label" so they can be translated. Using the following now:

# The 'type' should be "label" for short meta tags and "text" for ones which
# could get longer, especially ones which use a textarea field instead of a
# textfield.
views.style.views_bootstrap_dropdown:
  type: views_style
  label: 'Dropdown format'
  mapping:
    button_text:
      type:  label
paweldxm’s picture

StatusFileSize
new1.73 KB

I added simple labels. Additionally, I added the missing schema for table.

anybody’s picture

Version: 5.4.x-dev » 5.5.x-dev

I can confirm this issue. This can be simply reproduced by using config_inspector module:

 	display.default.display_options.style.options.col_xs 	Undefined 	undefined 	Nein 	none 	missing schema 	'col_xs' ist kein unterstützter Schlüssel.
	display.default.display_options.style.options.col_sm 	Undefined 	undefined 	Nein 	none 	missing schema 	'col_sm' ist kein unterstützter Schlüssel.
	display.default.display_options.style.options.col_md 	Undefined 	undefined 	Nein 	col-md-6 	missing schema 	'col_md' ist kein unterstützter Schlüssel.
	display.default.display_options.style.options.col_lg 	Undefined 	undefined 	Nein 	col-lg-4 	missing schema 	'col_lg' ist kein unterstützter Schlüssel.
	display.default.display_options.style.options.col_xl 	Undefined 	undefined 	Nein 	none

Affected config example:

style:
        type: views_bootstrap_grid
        options:
          row_class: ''
          default_row_class: true
          uses_fields: false
          col_xs: none
          col_sm: none
          col_md: col-md-6
          col_lg: col-lg-4
          col_xl: none

Grevil made their first commit to this issue’s fork.

grevil’s picture

Some of these options are never actually used?

"ViewsBootstrapGrid" for example defines loads of options in "defineOptions" but, basically, all of them are not even in use...

Defining these to override core Grid options (like "col_class_default" or "col_class_custom") would make sense if we extend "Drupal\views\Plugin\views\style\Grid", but the "ViewsBootstrapGrid" class is extending "StylePluginBase" instead. So there seems to be no way, to actually change these options, since no UI is provided? Or am I missing something here?

grevil’s picture

Status: Needs work » Needs review

Alright, that should be it. I adjusted the schema and a few default_values. If we want to be 100% clean, we need to provide update hooks for some views style plugins, to map their values to the new ones, in case they are using the default values. But the maintainers should decide here.

anybody’s picture

Status: Needs review » Needs work
grevil’s picture

Status: Needs work » Needs review
anybody’s picture

LGTM, but a maintainer or someone else should please take a final look & test and RTBC this.

  • shelane committed 6c30c50f on 5.5.x authored by Grevil
    Issue #3260347 by Grevil, paweldxm, shelane, lamp5, Anybody, splash112:...
shelane’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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