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

Add a new context dependent Action for the layout xml file generation #967

Closed
bohdan-harniuk opened this issue Feb 9, 2022 · 2 comments · Fixed by #1021
Closed

Add a new context dependent Action for the layout xml file generation #967

bohdan-harniuk opened this issue Feb 9, 2022 · 2 comments · Fixed by #1021

Comments

@bohdan-harniuk
Copy link
Collaborator

Is your feature request related to a problem? Please describe.

We should add layout xml file generation to the context actions, so that we can generate a layout xml file wherever it can be generated depending on the clicked file or directory.

Input from the user:

  • filename
  • layout type (1column, 2columns-left, 2columns-right, 3columns, empty, admin-empty, admin-1column, admin-2columns-left + custom layouts) based on the area context

The original idea came from the #861.

Describe the solution you'd like (*)

We have developed a new context dependent actions group in the #958.

To add new file generation action that depends on context:

  1. create an action class that extends com.magento.idea.magento2plugin.actions.context.AbstractContextAction
  2. register it in the plugin.xml file inside the MagentoContextBasedActionsGroup group
  3. implement the isVisible method to define condition where to show this action
  4. implement the getProperties method to specify properties that should be auto-populated from the known context (leave empty for user-defined values)

Describe alternatives you've considered

A clear and concise description of any alternative solutions or features you've considered.

Additional context

Mainline branch: 4.3.0-develop

@m2-assistant
Copy link

m2-assistant bot commented Feb 9, 2022

Hi @bohdan-harniuk. Thank you for your report.
To speed up processing of this issue, make sure that you provided sufficient information.

Add a comment to assign the issue: @magento I am working on this


@SilinMykola
Copy link

@magento I am working on this

@bohdan-harniuk bohdan-harniuk moved this from Ready for Development to Dev in Progress in Community Backlog Feb 14, 2022
Community Backlog automation moved this from Dev in Progress to Done Mar 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants