magento2-phpstorm-plugin icon indicating copy to clipboard operation
magento2-phpstorm-plugin copied to clipboard

Create duplicated XML declarations navigation

Open Stepa4man opened this issue 5 years ago • 4 comments

As a developer, I want to know where are other declarations of the same XML path nodes located and access them quickly. Area of usage is almost all XML declarations:

  • di
  • events
  • crontab
  • system
  • config
  • db_schema
  • acl
  • menu
  • routes
  • extension_attributes
  • email_templates
  • webapi
  • mview
  • indexer
  • fieldset
  • cron_group
  • webrestriction
  • sections

Would be nice to have something the same as we have in plugins functionality (just some icon with a dropdown list when you click on it): image List of files that contains the same declaration. If you click on it - you go directly to the selected declaration.

Example: You have a Vendor1_Module/etc/adminhtml/system.xml with declaration section1/group2/field1 and Vendor2_Module/etc/adminhtml/system.xml with the same declaration section1/group2/field1 At both files, you have a "related nodes" icon on the left side of this node. When you click on this icon you see the list of files that also contain this declaration. Clicking to any of them you'll be switched to this file and place in file where this node is declared.

Stepa4man avatar Apr 22 '20 09:04 Stepa4man

Just a thought, wouldn't this visually crowd the sidebar in an XML file with more than a few declarations? Or does it not matter? A system.xml file for example will have a lot of fields and groups and sections, and will hence crowd the sidebar with that many icons.

I love this feature, but just thinking if this would be too overloading on the eyes. :)

drpayyne avatar Nov 08 '20 18:11 drpayyne

Hello, @Stepa4man!

We need to discuss this issue to make a decision if it should be implemented or not. Do you have some additional ideas how to solve the problem mentioned by the @drpayyne? As for now, I think that mentioned problem is still crucial and I am inclined not to implement it.

cc. @VitaliyBoyko, @drpayyne, @coderimus, @Iamwade

Regards,

bohdan-harniuk avatar Jan 23 '22 13:01 bohdan-harniuk

Hello, @Stepa4man!

We need to discuss this issue to make a decision if it should be implemented or not. Do you have some additional ideas how to solve the problem mentioned by the @drpayyne? As for now, I think that mentioned problem is still crucial and I am inclined not to implement it.

cc. @VitaliyBoyko, @drpayyne, @coderimus, @Iamwade

Regards,

I just provided one example. I guess for this example you can just make section/tab/field code clickable instead of making this at the side bar. But even with sidebar approach still didn't get why it should crowd something. You never fave field/section/group/tab on one line, so it's just one icon. image BUt approach with clickable /field/group/section code even cleaner.

Stepa4man avatar Jan 26 '22 15:01 Stepa4man

Hello, @Stepa4man!

Thank you! We'll discuss this feature.

Regards,

bohdan-harniuk avatar Jan 28 '22 06:01 bohdan-harniuk