`leaflet_popup` schema

Created on 11 September 2024, 4 months ago

Problem/Motivation

We've been getting a schema missing error
Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for views.view.localgov_directory_channel with the following errors: views.view.localgov_directory_channel:display.embed_map.display_options.style.options.leaflet_popup.view_mode missing schema
caused by exported view leaflet_map style

        leaflet_popup:
            value: '#rendered_view_fields'
            options: '{"maxWidth":"300","minWidth":"50","autoPan":true}'
            view_mode: full

(see also reproduce)

Steps to reproduce

Example view on the PR https://github.com/localgovdrupal/localgov_directories/pull/336 specifically https://github.com/localgovdrupal/localgov_directories/pull/336/commits/...

Proposed resolution

Looking at the code it's just the view_mode that's added at the moment. So add that to the schema. But as it's using the LeafletSettingsElementTrait it could set and contain: value, options, view_mode, control and content https://git.drupalcode.org/project/leaflet/-/blob/999f59251a6fa8f04718c1... so a 'belt-and-braces' approach would be to update the schema in places the Trait is used to accept those properties.

Remaining tasks

Add potential leaflet_popup properties to the schema where the LeafletSettingsElementsTrait is used. MR to follow.

🐛 Bug report
Status

Needs review

Version

10.2

Component

Code

Created by

🇳🇱Netherlands ekes

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024