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

[PoC] Improved DX while creating forms with Twig Hooks #16284

Draft
wants to merge 13 commits into
base: 2.0
Choose a base branch
from

Conversation

jakubtobiasz
Copy link
Contributor

@jakubtobiasz jakubtobiasz commented May 22, 2024

Currently, we have been forced to (let's be honest) duplicate hooks configuration for the create/update page. In most cases they were exactly the same, and it was annoying.

The idea is to extract the form to a separate anonymous component, add two additional hook names (sylius_admin.common.component.form and sylius_admin.<resource_name>.component.form and configure most of the hookables using the sylius_admin.<resource_name>.component.form.

You can see the example here: 70bef86

Moreover, if we want to add a field only on the update/create page it is possible thanks to already existing sylius_admin.<resource_name>.(create/update) hooks.

@jakubtobiasz jakubtobiasz added the Admin AdminBundle related issues and PRs. label May 22, 2024
Copy link

github-actions bot commented May 22, 2024

Bunnyshell Preview Environment deployment failed

Check https://github.com/Sylius/Sylius/actions/runs/9188164850 for details.

Available commands:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Admin AdminBundle related issues and PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant