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

OP-326: New content elements #506

Merged
merged 76 commits into from
Jul 12, 2024

Conversation

jkindly
Copy link

@jkindly jkindly commented Jul 8, 2024

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets OP-326
License MIT

@jkindly jkindly changed the base branch from master to feature/OP-312-redesign-cms-plugin July 8, 2024 10:20
src/Form/Type/ContentConfigurationType.php Outdated Show resolved Hide resolved
public function findByNamePart(string $phrase): array
{
return $this->createQueryBuilder('o')
->andWhere('o.name LIKE :name')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couldn't we really do this in another way? LIKE %% has incredible bad performance...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, but there is already exact the same method in block, collection and pages. I just copied this one to the media. I'm not sure what we can change here. I was looking for a solution and didn't find anything special, except Elasticsearch or something similar. Maybe you have some idea?

src/Resources/config/services/form.xml Outdated Show resolved Hide resolved
tests/Behat/Behaviour/ContainsContentElementTrait.php Outdated Show resolved Hide resolved
@@ -131,6 +131,30 @@ public function iFillTheNameIfItIsEmpty(string $name): void
$this->resolveCurrentPage()->fillNameIfItIsEmpty($name);
}

/**
* @When I click on Add button in Content elements section
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Content" by capital "C"?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, because it is name of the section, not single content element, so I think it should be capitalized.

tests/Behat/Page/Admin/Block/CreatePage.php Outdated Show resolved Hide resolved
{
Assert::isInstanceOf($this->getDriver(), ChromeDriver::class);

$addButton = $this->getElement('content_elements_add_button');
$addButton->click();

$addButton->waitFor(3, function (): bool {
return $this->hasElement('content_elements_textarea');
$addButton->waitFor(2, function (): bool {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope it is 2 ms, not 2 s 🙏

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's seconds. All behat tests are written like this, even in Sylius core. I changed all occurrences to lower ones.

@jkindly jkindly requested a review from senghe July 12, 2024 10:16
@jkindly jkindly merged commit c84b85d into feature/OP-312-redesign-cms-plugin Jul 12, 2024
52 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants