Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Housekeeping #52

Merged
merged 10 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(

#[\Override]
public function build(NodeInterface $node, EnvironmentInterface $environment): RenderArrayBuilderResult {
// @todo Build context DTO is heavily needed here. In cases where same
// @todo Build scope DTO is heavily needed here. In cases where same
// environment can be rendered in more than one view mode it can be
// helpful.
$this->childRenderArrayBuilder->setEnvironment($environment);
Expand Down
11 changes: 2 additions & 9 deletions app/Drupal/external_content/src/Extension/BasicHtmlExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@

/**
* Provides a very basic extension with most useful settings.
*
* @todo Consider creating dedicated extensions for plain text, code and
* element, and use them here.
*/
final class BasicHtmlExtension implements ExtensionInterface {

Expand All @@ -22,13 +19,9 @@ public function __construct(

#[\Override]
public function register(EnvironmentBuilderInterface $environment): void {
$html_parser_manager = $this
->externalContentManager
->getHtmlParserManager();
$html_parser_manager = $this->externalContentManager->getHtmlParserManager();
$serializer_manager = $this->externalContentManager->getSerializerManager();
$render_array_builder_manager = $this
->externalContentManager
->getRenderArrayBuilderManager();
$render_array_builder_manager = $this->externalContentManager->getRenderArrayBuilderManager();

$environment
->addHtmlParser($html_parser_manager->get('plain_text'))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
/**
* @covers \Drupal\external_content\Builder\ElementRenderArrayBuilder
* @group external_content
* @todo Make it kernel with a proper testing of 'pre_render'.
*/
final class ElementRenderArrayBuilderTest extends UnitTestCaseTest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
overflow: hidden;
flex-shrink: 0;
align-self: center;
width: 150px;
border-radius: var(--spacing-2);
box-shadow: var(--elevation-1);

Expand Down
2 changes: 1 addition & 1 deletion app/Drupal/laszlo/components/content/article/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
.article__poster {
overflow: hidden;
flex-shrink: 0;
min-width: 200px;
width: 200px;
border-radius: var(--spacing-2);
box-shadow: var(--elevation-2);
margin-inline: auto;
Expand Down
11 changes: 9 additions & 2 deletions app/Drupal/laszlo/components/ui/image/image.component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ props:
type: string
width:
title: Image width
type: [string, integer ]
type: [string, integer, 'null']
height:
title: Image height
type: [string, integer]
type: [string, integer, 'null']
alt:
title: Image alt
type: string
Expand All @@ -29,6 +29,13 @@ props:
- lazy
type: string
default: lazy
decoding:
title: Image decoding
enum:
- sync
- async
- auto
type: string
srcset:
title: Image srcset
type: array
Expand Down
1 change: 1 addition & 0 deletions app/Drupal/laszlo/components/ui/image/image.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
{% do height ? attributes.setAttribute('height', height) %}
{% do attributes.setAttribute('src', src) %}
{% do attributes.setAttribute('loading', loading|default('lazy')) %}
{% do decoding ? attributes.setAttribute('decoding', decoding) %}
{% if srcset is not empty %}
{% do attributes.setAttribute('sizes', sizes|default('100vw')|join(', ')) %}
{% set srcset_array = [] %}
Expand Down
5 changes: 5 additions & 0 deletions app/Drupal/laszlo/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
"name": "niklan/laszlo",
"type": "drupal-custom-theme",
"version": "1.0.0-dev",
"autoload": {
"psr-4": {
"Drupal\\laszlo\\": "src"
}
},
"require": {
"niklan/niklan": "^1.0@dev",
"niklan-asset/lora": "^35"
Expand Down
24 changes: 0 additions & 24 deletions app/Drupal/laszlo/templates/field/field-with-common-markup.twig

This file was deleted.

24 changes: 0 additions & 24 deletions app/Drupal/laszlo/templates/field/field-with-entity-markup.twig

This file was deleted.

30 changes: 0 additions & 30 deletions app/Drupal/laszlo/templates/field/field-with-full-markup.twig

This file was deleted.

2 changes: 1 addition & 1 deletion app/Drupal/laszlo/templates/form/input--checkbox.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @ingroup themeable
*/
#}
@TODO complete
@TODO Complete it.
{% embed 'laszlo:checkbox' with input_props only %}

{% endembed %}
18 changes: 0 additions & 18 deletions app/Drupal/niklan/config/schema/niklan.schema.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
filter_settings.niklan_markdown:
type: filter
label: 'Markdown filter'

field.formatter.settings.niklan_responsive_media_thumbnail:
type: mapping
label: Responsive media thumbnail
mapping:
responsive_image_style:
type: string
label: 'Responsive image style'
image_link:
type: string
label: 'Link image to'
image_loading:
type: mapping
label: 'Image loading settings'
mapping:
attribute:
type: string
label: 'Loading attribute'
Loading