JJLongoria / aura-helper

Repository for manage the development of Aura Helper VSCode Extension
GNU General Public License v3.0
9 stars 5 forks source link

Max Field Projections on SOQLs instead of One Projection Field Per Line #31

Closed LuisKumruyanLoggi closed 3 years ago

LuisKumruyanLoggi commented 3 years ago

First of all, thanks for this awesome extension! It is helping our team a lot on our development process formatting Apex code!

This is a suggestion for an improvement on an existing feature (One Projection Field Per Line).

For now, if this setting is enabled, the SOQL fields are separated into different lines and if it is disabled, the fields are concatenated in the same line.

Would you consider changing this setting to allow the developer to choose the maximum number of fields on each line? For large SOQLs (with more than 10 fields selected, for example) the line ends up being too large and separating each field on a different line makes the code too large.

This feature could be very useful this way:

  1. The user sets the maximum number of fields per line on an SOQL (for this example, 3 fields).
  2. The query gets formatted this way:

Before formatting:

[SELECT Id, CreatedDate, LastModifiedById, LastModifiedDate, CreatedById, OwnerId, Phone__c, Email__c FROM Account]

After formatting:

[SELECT Id, CreatedDate, LastModifiedById,
  LastModifiedDate, CreatedById, OwnerId,
  Phone__c, Email__c
  FROM Account]

This would greatly reduce the line sizes while keeping the code on a managed size as well.

Let me know what do you think of this feature improvement and if it is possible to implement :)

Once again, thanks for your awesome work! 👍

JJLongoria commented 3 years ago

Hi Luis Fernando!

Thanks for write and suggest improvements. Just today I think on this enhancement when write a large query... Lol! Yes it is possible and I will implement it on the next realese (with other improvements and features)

I'm glad that the extension is useful to you and your team. Do not hesitate to send me any other suggestion, improvement or inform me of any errors, I will be happy to find the best solution as soon as possible to have a great development tool.

JJLongoria commented 3 years ago

Hi Luis!

I've been worked on your idea and I published a new version with this feature. Now have a new setting called "Max Projection Field Per Line" to select the projection fields number. 0 means all fields in the same line.

Also have other new features and new logo :). Enjoy the app! :)

Regards.