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

IBX-4629: Implement Meta field groups #680

Merged
merged 9 commits into from
Feb 3, 2023
Merged

Conversation

barw4
Copy link
Contributor

@barw4 barw4 commented Jan 17, 2023

Question Answer
Tickets https://issues.ibexa.co/browse/IBX-4629
Bug fix? no
New feature? yes
BC breaks? no
Tests pass? yes
Doc needed? yes
License GPL-2.0

A new configuration has been implemented that allows configuring fieldgroups that would be shown in the "Meta" section in the content form:

    system:
        admin_group:
            admin_ui_forms:
                content_edit:
                    meta_field_groups_list:
                       - metadata

The default value is set to metadata, however, one can configure it to include any of available fieldgroups or even disable this feature:

    system:
        admin_group:
            admin_ui_forms:
                content_edit:
                    meta_field_groups_list: []

The meta_fieldgroup_list configuration is not deeply merged so overriding it is simple.

Also, a minor bug fix was done in order to scroll to a chosen field via an anchor on the left.

Example:
Using a fresh Ibexa DXP installation and the following meta configuration:

    system:
        admin_group:
            admin_ui_forms:
                content_edit:
                    meta_field_groups_list:
                       - content

with short_name being changed to Metadata fieldgroup, and taxonomy_entry_assignment being set to meta: true, one can observe the following:
image

One last thing worth mentioning is that meta: true configuration still applies, so we should decide whether to disable it for the taxonomy and the product_catalog packages and allows developers to decide whether to apply it themselves or leave it as it is for now with an annotation in the Developer Documentation.
// Edit - will be removed from both those packages, however, this configuration still is valid.

Short summary, both the meta_field_groups_list and the meta: true configurations are valid.

Related PRs:

Checklist:

  • Coding standards ($ composer fix-cs)
  • Ready for Code Review

@barw4 barw4 added Feature New feature request Ready for review labels Jan 17, 2023
@barw4 barw4 requested review from webhdx and a team January 17, 2023 10:28
@barw4 barw4 self-assigned this Jan 17, 2023
@MagdalenaZuba MagdalenaZuba added the Doc needed The changes require some documentation label Jan 17, 2023
Copy link
Contributor

@webhdx webhdx left a comment

Choose a reason for hiding this comment

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

Very good contribution 👍 I have only some small complaints.

@barw4 barw4 requested review from webhdx and a team January 18, 2023 13:14
@barw4 barw4 changed the title IBX-4629: Implement Meta fieldgroups IBX-4629: Implement Meta field groups Jan 18, 2023
@sonarcloud
Copy link

sonarcloud bot commented Jan 30, 2023

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 2 Code Smells

No Coverage information No Coverage information
3.2% 3.2% Duplication

@micszo
Copy link
Contributor

micszo commented Jan 31, 2023

@barw4 two questions:

  1. Is it intended that in Content tab anchor is placed on categories?
    Screenshot 2023-01-31 at 12 36 46
    When in Meta tab anchor is placed on fields.
    Screenshot 2023-01-31 at 12 36 56

  2. Does this implementation support adding e.g. Basic information category as third tab? Billing address as fourth tab and so on.
    Screenshot 2023-01-31 at 12 39 09

@barw4
Copy link
Contributor Author

barw4 commented Jan 31, 2023

@micszo

  1. I didn't change any behavior here. The fields were visible with meta:true as well before this PR, probably because there would be less of them.

  2. No, Meta is hardcoded and we only allow to set specific field groups to it.

@barw4
Copy link
Contributor Author

barw4 commented Jan 31, 2023

@micszo adding to my previous comment, basically, this PR allows us to additionally add field groups to the Meta tab. Previously we allowed only field types, now we allow to put field groups there as well.

Copy link
Contributor

@micszo micszo left a comment

Choose a reason for hiding this comment

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

QA Approved on Ibexa Commerce 4.3.3-dev.

Encountered an JS issue with subcategory anchors highlighting but managed to reproduce it without these changes. Will be reported separately - update: so far deterministic steps were not found 😞.

Behat tests adjusted here and in https://github.com/ibexa/workflow/pull/70.

@webhdx webhdx merged commit 4c3a278 into 4.3 Feb 3, 2023
@webhdx webhdx deleted the ibx-4629-meta-fieldgroups branch February 3, 2023 12:08
@juskora juskora removed the Doc needed The changes require some documentation label Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature request QA approved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet