-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[Feature]: Manage select options via interface #14454
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
[Feature]: Manage select options via interface #14454
Conversation
Review Checklist
|
6e10e05 to
206969c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice :) I just did a quick review.
doc/Development_Documentation/05_Objects/01_Object_Classes/01_Data_Types/77_Select_Options.md
Outdated
Show resolved
Hide resolved
206969c to
3637224
Compare
bundles/AdminBundle/src/Controller/Admin/DataObject/ClassController.php
Outdated
Show resolved
Hide resolved
3637224 to
7520734
Compare
7520734 to
07c97ab
Compare
|
Resolved merge conflicts. |
|
Hi @kjkooistra-youwe, thank you very much for this improvement, in general we really like it! We have couple of suggestions/questions, here they are:
Let us know what do you think about these points. Would you have time and motivation to have a look at these? We really appreciate your contribution, thanks agian! |
|
@lukmzig Thanks for your findings.
The enum cases are generated from the option values by default, but that doesn't work for certain special characters (
|
|
@lukmzig I'm unable to reproduce the error. I would surely have noticed if creating/opening a definition would have caused an error. I updated the 11.x branch to the latest version. Can you provide more details on how to reproduce the issue? Or a trace where the trim is called? |
|
Hi @kjkooistra-youwe, sure, seems like the exception is coming from here and it is thrown on definition load by call to the Trace: I did not do anything special except pulling your PR and adding a new definition. I also checked with my colleagues and they were able to reproduce this error as well. Let me know if this helped you or if we missed something. |
|
@lukmzig Thanks. That makes sense, as those methods may return null. I'm not sure why the error didn't occur for me. |
7448186 to
ef1a9e7
Compare
|
@lukmzig I updated the pull request, but the static analysis giving some errors now. I'm not sure where those are coming from though. |
b7cd162 to
86659db
Compare
|
Fixed errors caused by changes in this commit: 9599390 |
|
@lukmzig As this pull request keeps gathering merge conflicts, can you give any indication on when it could be merged? I'd rather not keep fixing them indefinitely. |
Hi @kjkooistra-youwe, thank you for reaching out. Did you by any chance already have time to have a look at the improvements which were mentioned up? It would be quite important for us that they are resolved before we could merge your improvement. In general, I am afraid we will not be able to merge this improvement before Pimcore 11 is released. For this reason, it is also not necessary that you resolve all conflicts right away. |
|
@lukmzig Apart from the localization, the improvements were already implemented. Sorry for not indicating that more clearly. |
|
I noticed similar settings are also configured in .github/ci/files/config/config.yaml. Should it be updated as well? |
d5f8fe8 to
bbee9c8
Compare
Yes, this config is related to the codeception tests. You can add it there too to make it consistent with others. Thanks! |
@kjkooistra-youwe Also, we can remove this file https://github.com/pimcore/pimcore/pull/14454/files#diff-f43ff01c1af018b3ee31fc731c951f862bf7024e87813487dc43090c24105b2b as we already moved it to thje admin-ui bundle |
bbee9c8 to
e128723
Compare
|
You can change the label in your PR https://github.com/pimcore/admin-ui-classic-bundle/pull/291/files#diff-b7044d81c8cbf9664c08384185ac516051a9235b8a234325bf22993531c1fc6b The Class prefix was added on purpose to distinguish between field collections and classification store, for example. Otherwise it might become confusing when the same name is used. |
|
@kjkooistra-youwe Could you please readd this file https://github.com/pimcore/admin-ui-classic-bundle/blob/2970bebcc20f21ccb0a5caa2110b0f9dbfb5fa20/src/OptionsProvider/SelectOptionsOptionsProvider.php to the core bundle https://github.com/pimcore/pimcore/tree/11.x/bundles/CoreBundle/src as the tests are failing and it should actually belong to the corebundle. |
e128723 to
07e4214
Compare
Add Select Options management interface via Settings > Data Objects submenu. Add selectoptions permission to allow access to management interface. Add options source selection to select fields definition to switch between direct configuration, select options or class / service configuration. Generate configuration file and enum to store select options. Introduce OptionsProviderInterface to detect field definitions using provider. Introduce OptionsProviderTrait to share properties between select types. Update classes rebuild command to also rebuild select options. Add PHP and JavaScript reserved words helper classes. Add and update documentation. Relates to pimcore#3409
07e4214 to
887b2d5
Compare
|
Kudos, SonarCloud Quality Gate passed!
|
|
@kjkooistra-youwe great work 👏 It will be a highlight of v11.1. Thank you very much for co-operation as this took a bit time to review 😉 |
|
Also thanks to @aryaantony92, who migrated the interface changes to the admin-ui bundle. |
…roduced a requirement on the settings-store when building the PHP classes of class definitions (pimcore#19)
Relates to #3409
Future changes