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][Admin] Separate base form types #16238
[POC][Admin] Separate base form types #16238
Conversation
97f87c8
to
91f0a96
Compare
Bunnyshell Preview Environment deletedAvailable commands:
|
…lek, NoResponseMate, GSadee, jakubtobiasz, Wojdylak, kulczy, Rafikooo, mpysiak) This PR was merged into the 2.0 branch. Discussion ---------- | Q | A |-----------------|----- | Branch? | 2.0 | Bug fix? | no | New feature? |yes | BC breaks? | yes | Deprecations? | no | Related tickets | | License | MIT As our new Bootstrap Admin Panel is already mostly covered and starting to be functional, I would like to merge branch `bootstrap-admin-panel` to `2.0` and continue the work here. <!-- - Bug fixes must be submitted against the 1.12 or 1.13 branches - Features and deprecations must be submitted against the 1.14 branch - Features, removing deprecations and BC breaks must be submitted against the 2.0 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Commits ------- c046fb7 Use extension instead of changing the existing forms in ProductBundle 38c8be5 minor review fixes 115d4c2 Revoke change of AutocompleteChoiceType to AdminBundle's one 10a2cc5 move ProductType related extensions definitions to dedicated file 165b84c Bring back the transformer from ProductBundle and create a new one for Admin eff1c8f Use ProductAssociationType instead of extension 2310f81 [Admin][DX] Remove autocompleters 480cfca [Admin][Product] Add ProductAttribute autocomplete type 9516ad0 [Admin][DX] Change `AutocompleteChoiceType` suffix to `AutocompleteType` 72411ad [Admin][DX] Add default aliases to autocomplete fields 6e256e6 [Admin][UX] Add more searchable fields to autocompletes e694fbd Merge branch '2.0' into bootstrap-admin-panel 6b26f4a Add the "sylius.live_component" tag and the translation layer 04fc430 Move all components from the "TwigComponent" directory under the "Twig\Component" directory c2f0596 Convert all AsLiveComponent attribute to the custom sylius.live_component tag 8823b74 Bump ux-symfony packages minimal version 32e2cca Update PHPStan ignore rules for Twig components ce811f2 Fix the malformed sylius_admin:country:form component usages 2fd9297 Fix not adding the 'controller.service_arguments' tag to services tagged with sylius.live_component 1e30fb3 Bring back #[AsLiveComponent] attribute to LiveComponent classes 65969a7 Unfinalize all components 7be88ea Rename `TaxonTreeComponent` component to `TreeComponent` 7e52dfa Fix Product's Form component service id e435ebf Rename `ShipComponent` to `ShipFormComponent` ed65c29 Adjust the Zone's form component to the new standard 3d06429 [Behat] Change mink panther to chromedriver bf3a434 Rename sylius_admin:order:history:address to sylius_admin:order:addresshistory 6f3c0d9 [Behat] Disable behat test 73b4a5f Unify index actions 4cc8549 Add show buttons to the homepage 064db37 Improve filter section 5e319d4 Make bolder header d3748e9 Style grid fields templates 4e6f42d Improve grids view 7d37d78 Fix tests 5fd5746 [Admin][Zone] Move FormComponent 8b6d2b1 [Admin][Zone] Move FormComponent (Sylius#16256) 32fcf43 [Admin][Product][Inventory] Enable behat tests 08c3e85 [Admin][Taxon] Implements media management 630f9a1 [Admin][Taxon][Image] Enable behat tests e6deeb4 [Behat] Submit live component before submitting the form e3909ab [Behat] Extract waitForFormUpdate function to CrudFormElement 59695b1 [Taxon][Behat] Extract management of image to separate form element. 554da08 [Admin][Taxon] Remove unnecessary code e30e391 [Admin][Taxon] Split media more granularly f42496c [Admin][Taxon] Rename FormImageElement to ImageFormElement 36e06c0 Merge branch '2.0' into bootstrap-admin-panel bb4e9f3 [Admin][UI] Add error indicators for form tabs and accordions 865a481 Review fixes d1ed503 Remove final from the Zone's form component e6bd06a Remove final from the Zone's form component (Sylius#16270) cb9ac59 [Admin][UI] Add error indicators for form tabs and accordions (Sylius#16263) 27a9529 [Admin][Product] Add view in store button d8e1758 [Admin][Product] Enable and fix tests f7378ae Changes after CR c940afe Merge branch '2.0' into bootstrap-admin-panel a313b14 Fixes after CR 6d6079e minor Sylius#16268 [Admin][Product] Add view in store button (mpysiak) 68da42b [Maintenance] Enable non-UI tests in CI 71ff79c [Behat] Add possibility to accepting null as value in response checker f083d82 [Admin][UX] Filter translatable autocomplete results based on current locale
The base of this pull-request was changed, you need fetch and reset your local branch Unless you added new commits (to this branch) locally that you did not push yet, Feel free to ask for assistance when you get stuck 👍 |
91f0a96
to
abc4d8b
Compare
Closing as it has been achieved via #16276 |
…nBundle (NoResponseMate, TheMilek) This PR was merged into the 2.0 branch. Discussion ---------- | Q | A |-----------------|----- | Branch? | 2.0 <!-- see the comment below --> | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no <!-- don't forget to update the UPGRADE-*.md file --> | License | MIT <!-- - Bug fixes must be submitted against the 1.12 or 1.13 branches - Features and deprecations must be submitted against the 1.14 branch - Features, removing deprecations and BC breaks must be submitted against the 2.0 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html --> Based on #16238 Commits ------- 8c212e4 [Admin] Extract an admin-only ProductType c06c8bd Extract admin-only CatalogPromotionType 1601e03 Extract admin-only ChannelType 22972b3 Extract admin-only CountryType b25e22b Extract admin-only ProductVariantsGenerateType aa30003 Extract admin-only ZoneType 592f1ea Extract admin-only ShippingMethodType 8ef9c28 Extract admin-only AddressType aef65d0 Correct twig components forms after rebase d5fb466 correct wrong service id d17f950 Update forms in routing config 2980eec Resolve block prefixes 1bd52b1 update forms in twig ocmponents 0a98422 make the forms config in alphabetical order ef3462d Review fixes
Current state:
Every base form type is placed at the lowest possible place, either a specific bundle or core.
The main point of extension for form types is a
TypeExtension
since all form types are final.The problem:
Form extensions work globally and since we have a singular start point, we cannot reuse any form type easily when it should be used in different contexts. For instance, if you add a field through an extension in
AdminBundle
(admin context), the same field will also be available in the shop's context.If a form type is used in both, shop and admin, then there's no easy way to distinguish what place added what and when each change should be added.
The sudden addition of Symfony UX complicates things further since we're overriding some fields to allow using it.
Proposed solution:
Adding separate base form types for the admin panel.