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

563 category attribute generator #569

Conversation

ProkopovVitaliy
Copy link
Contributor

Description (*)

Added category eav attribute generation:

Screenshot 2021-04-21 at 14 46 32

  • When we try generate new attribute for category, automatically we get generated form configuration:
  1. Generate multiselect attribute with custom options:
    Screenshot 2021-04-21 at 14 47 59

  2. We get next generated data patch:
    Screenshot 2021-04-21 at 14 48 10

  3. Generated category_form.xml file:
    Screenshot 2021-04-21 at 14 48 18

Screenshot 2021-04-21 at 14 48 28

  1. After bin/magento setup:upgrade we will see new attribute in admin panel form:
    Screenshot 2021-04-21 at 14 49 32
  • Create attribute with not-usual attribute data:
  1. Attribute configuration:
    Screenshot 2021-04-21 at 14 50 57

  2. Generated data patch:
    Screenshot 2021-04-21 at 14 51 13

  3. Updated category_form.xml file with new field-set:
    Screenshot 2021-04-21 at 14 51 23

  4. Run bin/magento setup:upgrade and check admin panel:
    Screenshot 2021-04-21 at 14 54 40

  • Create attribute with autogenerated source:
  1. Attribute configuration:
    Screenshot 2021-04-21 at 14 52 21

  2. Check generated data patch and source model:
    Screenshot 2021-04-21 at 15 05 11

Screenshot 2021-04-21 at 14 53 15

  1. Check updated category_form.xml file with updated early added field-set:
    Screenshot 2021-04-21 at 14 53 25

  2. Run bin/magento setup:upgrade and check admin panel:
    Screenshot 2021-04-21 at 14 54 24

Fixed Issues (if relevant)

  1. Fixes Category attribute setup patch generator #563

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with integration/functional tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Copy link
Contributor

@eduard13 eduard13 left a comment

Choose a reason for hiding this comment

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

Thank you @ProkopovVitaliy for this great feature. However, I'd suggest the following improvements that might be done as separate PRs.

  1. Change a bit the order of fields. First field should be Label, based on which the Attribute Code should be autocompleted
  2. Provide a fields' validation as we did for Entity Generator
  3. Pay attention at the following PR, as it also actual in scope of Product/Category Attribute generators
  4. We should be more strict with Group, because if we enter My Group, then Magento generates it as my-group, however the generator adds it as my_group in ui_component form file

Thank you.

@VitaliyBoyko VitaliyBoyko removed their assignment Apr 22, 2021
@eduard13 eduard13 merged commit a939aa6 into magento:mainline-eav-attr-code-genearators Apr 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants