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

Select/multiselect data types with localized and centralized select options #3409

Closed
markus-moser opened this issue Oct 1, 2018 · 6 comments

Comments

@markus-moser
Copy link
Contributor

markus-moser commented Oct 1, 2018

Select/multiselect fields only support a single value and label for one selected option and the provided select options need to be defined directly in the class editor (if no options provider is used). There a several problems with this approach in many projects:

  • In many constellations it's important to localize the selected value. It's possible to do this via website translations with a special naming scheme (e.g. optionsvalue.my-option). But this could be quite challenging and a lot of work in a PIM system with hundreds of attributes and thousands of attribute values.

  • Sometimes the same select options need to be used in different fields. For example when object bricks are used for different product categories the same field could be needed in two different bricks with the same options.

  • Often some users should have the right to maintain the provided select options (add new ones etc.). At the moment this is only possible when the user is allowed to use the class editor which is quite dangerous.

It's possible to use a options provider to create solutions for these kind of problems but a more standardized and out of the box way would be a really good improvement as option providers have several limitations:

  • It's more work to create option providers than to use a good standard feature. :-)

  • Export/import/grid view works not that perfect. A good out of the box solution could provide good solutions for that. For example with a special operator which can export the translated value. The grid view itself could show the translated value in the right language etc.

  • If combined with Pimcore's output channel bundle (https://github.com/pimcore/output-data-config-toolkit) things become really nasty when using option providers.

Therefore I suggest a solution similar to this:

  1. Add a global "Select options" section similar to for example the classification store group/key definitions. There it might be possible to define for example select value groups and within the groups localized select values. A new user right can be added to define who is allowed to edit the select options.
  2. Add 2 new data types for select/multiselect based on these select options and groups. In the class editor of the data type the used select options group needs to be configurable.
  3. Add grid view operators for the new data types.
@dpfaffenbauer
Copy link
Contributor

Isn't that a bit overkill for just selects? Why not use something like https://github.com/coreshop/CoreShop/blob/master/src/CoreShop/Bundle/PimcoreBundle/CoreExtension/DynamicDropdown.php where the select value is from another Object?

@markus-moser
Copy link
Contributor Author

markus-moser commented Oct 2, 2018

I have done it similarly to that in several projects. But remember a data model with 400 select/multiselect attributes in 20 object bricks. It would get really big and additionally it's not that easy to create for example a CSV exporter via the object grid. I think the dynamic dropdown is the overkill for this kind of problem. I have the same situation in nearly each PIM project with a lot of attributes.

@dpfaffenbauer
Copy link
Contributor

👍 ok, the export/import argument makes sense to me ;)

The 400 attributes in 20 bricks would be easy with the DynamicDropdown. But that also depends on the use-case. In my projects, the "href" solved with the DynamicDropdown has other attributes like a image as well.

@markus-moser
Copy link
Contributor Author

Yes I know the situation with images and other attributes needed. The dynamic dropdown is a good solution for that. The 400 attributes in 20 bricks are possible too for sure but the (for example memory consumption) overhead would be quite big.

@JonasWinter
Copy link

Is there any chance this will be shipped with the product one day? 😕

@brusch brusch added PR Welcome and removed Priority labels Mar 8, 2022
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 16, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 17, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 17, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 20, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 21, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 23, 2023
Generates definition files in JSON format.
Generates enums for the options.
Resolves pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 24, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 27, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Feb 28, 2023
Add Select Options management interface via Settings > Data Objects submenu.
Add selectoptions permission to allow access to management interface.
Update select fields to easily configure select options via options provider.
Generate definition file and enum to store select options.
Introduce OptionsProviderInterface to detect field definitions using provider.
Update classes rebuild command to also rebuild select options.
Add PHP and JavaScript reserved words helper classes.
Add documentation.
Relates to pimcore#3409
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Mar 10, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Mar 10, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Mar 17, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Mar 17, 2023
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
@fashxp fashxp added the Backlog label Jun 12, 2023
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 25, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 25, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 25, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 25, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 25, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 26, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 28, 2023
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
kjkooistra-youwe added a commit to kjkooistra-youwe/pimcore that referenced this issue Sep 28, 2023
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
dvesh3 pushed a commit that referenced this issue Oct 2, 2023
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 #3409
@fashxp
Copy link
Member

fashxp commented Nov 9, 2023

fixed via #14454

@fashxp fashxp closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants