Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
component_library
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
component_library
Compare revisions
project-update-bot-only to 1.0.x
Compare revisions
Changes are shown as if the
source
revision was being merged into the
target
revision.
Learn more about comparing revisions.
Source
project/component_library
Select target project
No results found
1.0.x
Select Git revision
Swap
Target
issue/component_library-3428527
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
project-update-bot-only
Select Git revision
Show changes
Only incoming changes from source
Include changes to target since source was created
Compare
Commits on Source (4)
Issue
#3501810
by tim bozeman: Override mode's render array memory is broken
· baf32c92
Tim Bozeman
authored
4 months ago
baf32c92
Issue
#3501810
by tim bozeman: Override mode's render array memory is broken
· 05de5878
Tim Bozeman
authored
4 months ago
05de5878
Issue
#3506574
by tim bozeman: Private methods throwing an error
· 130a7740
Tim Bozeman
authored
4 months ago
130a7740
11.0
· 3a5ba6c0
Tim Bozeman
authored
3 months ago
3a5ba6c0
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
component_library.info.yml
+1
-1
1 addition, 1 deletion
component_library.info.yml
src/Asset.php
+5
-9
5 additions, 9 deletions
src/Asset.php
src/Form/ComponentOverrideForm.php
+10
-10
10 additions, 10 deletions
src/Form/ComponentOverrideForm.php
src/OverrideMode.php
+21
-19
21 additions, 19 deletions
src/OverrideMode.php
with
37 additions
and
39 deletions
component_library.info.yml
View file @
3a5ba6c0
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
src/Asset.php
View file @
3a5ba6c0
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
src/Form/ComponentOverrideForm.php
View file @
3a5ba6c0
...
@@ -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'
],
...
...
This diff is collapsed.
Click to expand it.
src/OverrideMode.php
View file @
3a5ba6c0
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.