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

Migrating the shop grid configuration to php #15419

Open
wants to merge 7 commits into
base: 2.0
Choose a base branch
from

Conversation

mamazu
Copy link
Member

@mamazu mamazu commented Oct 8, 2023

Paritally copying over some of the grids from #14449

Q A
Branch? 1.13
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Related tickets partially #14449
License MIT

To be able to get this merged quicker this MR contains the shop grid bundle changes only for the shop.

@mamazu mamazu requested a review from a team as a code owner October 8, 2023 17:14
@probot-autolabeler probot-autolabeler bot added the Shop ShopBundle related issues and PRs. label Oct 8, 2023
@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch 2 times, most recently from 1cc0abe to cc8c992 Compare October 8, 2023 17:23
@github-actions
Copy link

github-actions bot commented Oct 8, 2023

Bunnyshell Preview Environment deployed

It will be automatically stopped in 4 hours.

Use the command /bns:start to start it if it's stopped.

Component Endpoints
mailhog https://mailhog-op7xze.bunnyenv.com/
php https://store-op7xze.bunnyenv.com/

Available commands:

  • /bns:stop to stop the environment
  • /bns:deploy to redeploy the environment
  • /bns:delete to remove the environment

@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch 2 times, most recently from 2f7ecec to 43e4c2c Compare October 8, 2023 18:40
@mamazu
Copy link
Member Author

mamazu commented Oct 9, 2023

@Florian-Merle I think this could be a problem with the expression language not working correctly?

@diimpp
Copy link
Member

diimpp commented Oct 9, 2023

Hi, as #14449 (comment) Loic mentioned, this most likely should target 2.0. For example new workflow SM are specifically done in yaml instead of php for 1.13.

@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch from 43e4c2c to 670065d Compare October 10, 2023 08:35
@probot-autolabeler probot-autolabeler bot added Docker Docker-related issues and PRs. Maintenance CI configurations, READMEs, releases, etc. labels Oct 10, 2023
@mamazu mamazu changed the base branch from 1.13 to 2.0 October 10, 2023 08:35
@mamazu
Copy link
Member Author

mamazu commented Oct 10, 2023

Rebased to 2.0. Sadly I still don't have a way to test the changes as I don't have a local development environment for 1.13.

@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch 4 times, most recently from a7cff61 to 3e7c4aa Compare October 17, 2023 07:12
Comment on lines 60 to 62
// @see Sylius\Bundle\ResourceBundle\ExpressionLanguage\NotNullExpressionFunctionProvider
$taxon = $this->taxonRepository->findOneBySlug(
$this->resquest->attributes->get('slug'),
$localeCode,
);
if ($taxon === null) {
throw new NotFoundHttpException('Requested page is invalid');
}
Copy link
Member Author

Choose a reason for hiding this comment

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

We might want to move that to a helper or somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

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

@diimpp Any ideas or thoughts on this one? I guess it would make sense to make a class or a trait that could emulate what we had in the expression parser.

@mamazu mamazu changed the title Applying the shop grids Migrating the shop grid configuration to php Oct 17, 2023
@mamazu
Copy link
Member Author

mamazu commented Oct 17, 2023

@diimpp Can someone with some behat expertise have a look, I don't understand what the problem is. The button should be there.

src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/Account/OrderGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/Account/OrderGrid.php Outdated Show resolved Hide resolved
src/Sylius/Bundle/ShopBundle/Grid/ProductGrid.php Outdated Show resolved Hide resolved
@mamazu
Copy link
Member Author

mamazu commented Oct 18, 2023

I am using the same actions as before now (they are the same, but have different templates to make overriding them easier.

@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch from 16581d0 to f4f1f77 Compare October 19, 2023 15:24
@mamazu mamazu force-pushed the php_grids_for_shop_bundle branch from 25e9f35 to c4a2292 Compare October 20, 2023 17:08
diimpp
diimpp previously approved these changes Oct 20, 2023
@loic425
Copy link
Member

loic425 commented Oct 21, 2023

Please keep the yaml configuration, the configuration are not merged. I will make a new provider for a bc layer to migrate grid per grid for end users. I'll make it probably next week.

Copy link
Member

@loic425 loic425 left a comment

Choose a reason for hiding this comment

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

See my other comment

@mamazu
Copy link
Member Author

mamazu commented Oct 21, 2023

I don't yet understand why but I can revert the grid configuration.

@loic425
Copy link
Member

loic425 commented Oct 22, 2023

I don't yet understand why but I can revert the grid configuration.

https://github.com/Sylius/SyliusGridBundle/blob/1.13/src/Component/Provider/ChainProvider.php

there are two providers to retrieve the grid configuration. When a developer has customized the sylius grid with yaml it will not work cause the service grid provider configuration will be retrieved first.

I have an idea for a new provider to make a bc layer

@loic425 loic425 mentioned this pull request Nov 2, 2023
4 tasks
@loic425
Copy link
Member

loic425 commented Jan 2, 2024

I think we can base this one to 1.13. But let's wait for other core team opinions.

@diimpp
Copy link
Member

diimpp commented Jan 6, 2024

I think we can base this one to 1.13. But let's wait for other core team opinions.

@loic425 I think we're keeping yaml at 1.13 and php configs are for 2.0. Same was done for SF workflows.

@mamazu
Copy link
Member Author

mamazu commented Mar 9, 2024

So what's the status on this one? Can loics PR be merged and mine too. Because there are still the admin grids that need to be migrated for 2.0

@GSadee GSadee requested a review from a team as a code owner July 9, 2024 09:58
@mamazu
Copy link
Member Author

mamazu commented Sep 7, 2024

Poking this and #15491 again. It would make finding the grid configuration easier as well. Just search for OrderGrid and you don't have to go through the yaml files or the debugger to find it.

NoResponseMate
NoResponseMate previously approved these changes Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docker Docker-related issues and PRs. Maintenance CI configurations, READMEs, releases, etc. Shop ShopBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants