Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • project/component_library
  • issue/component_library-3248568
  • issue/component_library-3259011
  • issue/component_library-3262430
  • issue/component_library-3264776
  • issue/component_library-3271103
  • issue/component_library-3272659
  • issue/component_library-3273574
  • issue/component_library-3273813
  • issue/component_library-3274318
  • issue/component_library-3294882
  • issue/component_library-3295912
  • issue/component_library-3296106
  • issue/component_library-3296114
  • issue/component_library-3300353
  • issue/component_library-3301393
  • issue/component_library-3307259
  • issue/component_library-3311381
  • issue/component_library-3313784
  • issue/component_library-3315055
  • issue/component_library-3315059
  • issue/component_library-3323687
  • issue/component_library-3316106
  • issue/component_library-3336864
  • issue/component_library-3351228
  • issue/component_library-3380414
  • issue/component_library-3393569
  • issue/component_library-3395549
  • issue/component_library-3428527
  • issue/component_library-3463212
30 results
Select Git revision
Show changes
Commits on Source (4)
...@@ -2,7 +2,7 @@ name: Component Library ...@@ -2,7 +2,7 @@ name: Component Library
type: module type: module
description: Build a library of components description: Build a library of components
package: User interface package: User interface
core_version_requirement: ^9 || ^10 core_version_requirement: ^9 || ^10 || ^11
php: 7.4 php: 7.4
dependencies: dependencies:
- entity:entity - entity:entity
......
...@@ -15,15 +15,11 @@ use Drupal\component_library\Entity\ComponentLibraryAsset; ...@@ -15,15 +15,11 @@ use Drupal\component_library\Entity\ComponentLibraryAsset;
*/ */
class Asset { class Asset {
private FileSystemInterface $fileSystem; public function __construct(
private ConfigFactoryInterface $configFactory; protected FileSystemInterface $fileSystem,
private LibraryDiscoveryInterface $libraryDiscovery; protected LibraryDiscoveryInterface $libraryDiscovery,
protected ConfigFactoryInterface $configFactory,
public function __construct(FileSystemInterface $file_system, LibraryDiscoveryInterface $library_discovery, ConfigFactoryInterface $config_factory) { ) {}
$this->fileSystem = $file_system;
$this->configFactory = $config_factory;
$this->libraryDiscovery = $library_discovery;
}
/** /**
* Generate library files. * Generate library files.
......
...@@ -425,16 +425,16 @@ final class ComponentOverrideForm extends EntityForm { ...@@ -425,16 +425,16 @@ final class ComponentOverrideForm extends EntityForm {
protected function actions(array $form, FormStateInterface $form_state) { protected function actions(array $form, FormStateInterface $form_state) {
$actions = parent::actions($form, $form_state); $actions = parent::actions($form, $form_state);
$actions['preview'] = [ // $actions['preview'] = [
'#type' => 'submit', // '#type' => 'submit',
'#value' => $this->t('Preview'), // '#value' => $this->t('Preview'),
'#submit' => ['::submitForm'], // '#submit' => ['::submitForm'],
'#attributes' => ['class' => ['preview-template']], // '#attributes' => ['class' => ['preview-template']],
'#ajax' => [ // '#ajax' => [
'callback' => [$this, 'previewCallback'], // 'callback' => [$this, 'previewCallback'],
'event' => 'click', // 'event' => 'click',
], // ],
]; // ];
$actions['submit']['#ajax'] = [ $actions['submit']['#ajax'] = [
'callback' => [$this, 'ajaxSubmit'], 'callback' => [$this, 'ajaxSubmit'],
......
...@@ -178,25 +178,27 @@ final class OverrideMode { ...@@ -178,25 +178,27 @@ final class OverrideMode {
'url' => Url::fromRoute($route, $route_parameters, $options)->toString(), 'url' => Url::fromRoute($route, $route_parameters, $options)->toString(),
'theme_suggestion' => $theme_suggestion, 'theme_suggestion' => $theme_suggestion,
]; ];
$variables = $this->addPlaceholders($variables); // This needs to be refactored as it now throws
try { // Deprecated function: Creation of dynamic property Drupal\Core\Template\Attribute::$#override_mode_breadcrumb is deprecated in Drupal\component_library\OverrideMode->traverse()
$bubbleable['#attached']['html_head'][] = [ // $variables = $this->addPlaceholders($variables);
[ // try {
'#type' => 'html_tag', // $bubbleable['#attached']['html_head'][] = [
'#tag' => 'script', // [
'#weight' => -1, // '#type' => 'html_tag',
'#attributes' => [ // '#tag' => 'script',
'type' => 'application/json', // '#weight' => -1,
'data-uuid' => $uuid, // '#attributes' => [
], // 'type' => 'application/json',
'#value' => Json::encode($variables), // 'data-uuid' => $uuid,
], // ],
$uuid, // '#value' => Json::encode([]),
]; // ],
} // $uuid,
catch (\Throwable $t) { // ];
$this->logger->get('component_library')->notice("component_library Override Mode: failed to serialize $theme_suggestion variables.\n" . $t->getMessage()); // }
} // catch (\Throwable $t) {
// $this->logger->get('component_library')->notice("component_library Override Mode: failed to serialize $theme_suggestion variables.\n" . $t->getMessage());
// }
$this->renderer->render($bubbleable); $this->renderer->render($bubbleable);
return $uuid; return $uuid;
......