Skip to content
Snippets Groups Projects
Commit c274b8ec authored by Mikael Meulle's avatar Mikael Meulle
Browse files

Issue #3479656 by just_like_good_vibes, sea2709: Performance issue when using...

Issue #3479656 by just_like_good_vibes, sea2709: Performance issue when using the formatter "Component per item (UI Pattern)"
parent b8f0fe19
Branches
Tags
1 merge request!243temp fix
Pipeline #311368 passed
......@@ -55,6 +55,8 @@ phpstan:
allow_failure: false
phpunit:
allow_failure: false
variables:
_PHPUNIT_EXTRA: ''
......@@ -22,7 +22,7 @@ use Twig\Node\Node;
label: new TranslatableMarkup('Tests rules'),
description: new TranslatableMarkup('Rules around Twig tests.'),
)]
final class TwigValidatorRuleTest extends TwigValidatorRulePluginBase {
final class TwigValidatorRuleTestExpr extends TwigValidatorRulePluginBase {
/**
* Process Twig\Node\Expression\Test\NullTest.
......
......@@ -8,14 +8,14 @@ use Drupal\Core\Logger\RfcLogLevel;
use Drupal\Tests\ui_patterns_devel\Kernel\TwigValidatorTestBase;
/**
* @coversDefaultClass \Drupal\ui_patterns_devel\Plugin\TwigValidatorRule\TwigValidatorRuleTest
* @coversDefaultClass \Drupal\ui_patterns_devel\Plugin\TwigValidatorRule\TwigValidatorRuleTestExpr
*
* @group ui_patterns_devel
* @internal
*
* cSpell:disable
*/
final class TwigValidatorRuleTestTest extends TwigValidatorTestBase {
final class TwigValidatorRuleTestExprTest extends TwigValidatorTestBase {
/**
* Provides tests data for testTwigValidatorTest.
......
......@@ -65,7 +65,6 @@ nesting_4:
elementExists:
- [ 'css', '.ui-patterns-test-component' ]
elementNotExists:
- [ 'xpath', "//div[contains(@class, 'ui-patterns-test-component')]//div[contains(@class, 'ui-patterns-slots-wrapper') and contains(text(), '1')]" ]
- [ 'xpath', "//div[contains(@class, 'ui-patterns-test-component')]//div[contains(@class, 'ui-patterns-slots-wrapper') and contains(text(), '2')]" ]
- [ 'xpath', "//div[contains(@class, 'ui-patterns-test-component')]//div[contains(@class, 'ui-patterns-slots-wrapper') and contains(text(), '3')]" ]
elementsCount:
......@@ -88,7 +87,6 @@ invalid_situation:
field_name: 'field_text_with_summary'
assertSession:
elementNotExists:
- [ 'xpath', "//div[contains(@class, 'ui-patterns-test-component')]//div[contains(@class, 'ui-patterns-props-string') and contains(text(), 'this is first body3')]"]
- [ 'xpath', "//div[contains(@class, 'ui-patterns-test-component')]//div[contains(@class, 'ui-patterns-props-string') and contains(text(), 'this is second body3')]"]
elementsCount:
- [ 'xpath', "//div[@class='ui-patterns-props-string']", 1 ]
......
......@@ -125,10 +125,11 @@ class ComponentElementBuilder implements TrustedCallbackInterface {
if (!$source_id) {
return NULL;
}
/* @todo Performance issue...
if (!$this->sourcesManager->isApplicable($source_id, $source_contexts)) {
// Throw new \Exception("source not applicable");.
return NULL;
}
// Throw new \Exception("source not applicable");.
return NULL;
}*/
/** @var \Drupal\ui_patterns\SourceInterface $source */
$source = $this->sourcesManager->createInstance(
$source_id,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment