[2.0.0-alpha1] Improve compatibility with existing SDC themes

Created on 7 January 2024, 12 months ago
Updated 29 January 2024, 11 months ago

Problem/Motivation

We have tested the current UI Patterns 2.x dev version with those themes:

And we are able to cover

Proposed resolution

Add a "free" list prop type

It was not initially plan because not existing in UI Patterns 2.x but most SDC themes are using an array of items without an enum:

type: array
items:
  type: [string, number, integer]

We may need to rename the current list prop type which expect an enum.

Remove false positives from CompatibilityChecker

By checking required properties in objects.

ui_patterns_library : add provider page

Not mandatory, but more comfortable if many themes installed in the same time. Like the overview page, but for only the ucrrent provider.

Add a new "proxy" plugin type

This is the big deal.

Sometimes, a prop JSON schema is different enough to not be caught by the compatibility checker, but close enough to address the same Drupal API as existing prop type with only some small bidirectional transformation of the data.

To keep the list of prop types as tight as possible, and their JSON schemas as strict as possible, because they are also used for data validation, we may need a new plugin type:

  • Lightweight, just a proxy, with basic bidirectional transformations
  • We will not be afraid to create a lot of them

Specs: https://docs.google.com/document/d/1-GaMK1Qk-h0hmB7GtAcnqPTuCOGMaxeRguop...

Let's prototype first.

API changes

yes, of course

📌 Task
Status

Fixed

Version

2.0

Component

Code

Created by

🇫🇷France pdureau Paris

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