One-click beautify code
2185
Views
42
Comments
Not right now
Service Studio

Hello everyone,


Currently, we have the option to align and distribute the items in an action flow by selecting multiple items, and right-click the selection subsequently. But I think there is room for some improvement. I'm not sure if it's feasible (for bigger action flows), but I thought it would be nice if there was an option to beautify your produced code with one click, based on some common best practices. 

For me, it increases readability if the spacing between items in an actionflow is the constant for example. In the image below I exaggerated the issue a bit, but it clarifies the idea that I'd like to suggest.

I'm curious to hear other thoughts on this topic.

Sam

Changed the category to
Service Studio
2014-02-07 17-02-43
Vasco Pessanha
Changed the status to
Not right now

Hey Sam,

Thanks a lot for your idea!

Although it is a very cool one and I hope we have this in the future, currently we don't have plans in the short term to tackle this.

Keep the ideas coming!

This would be great. Very often, I find myself 'beautifying' my code by CTRL-SHIFT-Click <node>, then moving all nodes around so that there aren't huge gaps between nodes. It's a very repetitive process, and something that's much easier with traditional C# programming.

Merged this idea with 'Automatic code alignment' (created on 08 Nov 2018 13:46:46 by Márcio Menezes)

The current functionality to align the code takes a lot of effort and time to use(Right click -> Go to align and only after that we can click again to select an option) - three steps.

What I suggest is a simpler or default auto align to format all the code from a flow.

This should be a simple option to access by mouse or keyboard shortcut(Ctrl + Shift + F).

Example of the golang implementation https://blog.golang.org/go-fmt-your-code.

The auto align rules can be defined by you :)

Changed the category to
Service Studio
2014-02-07 17-02-43
Vasco Pessanha
Changed the status to
Not right now

Hey Márcio,

Thanks a lot for your idea!

This could indeed accelerate the alignment of the flows. Despite this, it requires a significant investment and it is quite a challenge to have all the use cases right. Because of this, and since we have other important stuff in our roadmap, we don't have plans to do this in the short-term.

Nevertheless, I'll keep the idea to be re-considered in the future.

Keep the ideas coming!

2014-02-07 17-02-43
Vasco Pessanha
Merged this idea with 'Nodes auto alignment in Service studio' (created on 26 Dec 2018 08:56:02 by Manoj Ahirwar)

Hello,


In major projects, its very hard to maintain nodes alignment and indentations. can we have a feature that can auto alignment all the nodes without any manual work?


This feature will help code readability for the projects that already developed and being handled by support team.


Thanks



This comment was:
- originally posted on idea 'Nodes auto alignment in Service studio' (created on 26 Dec 2018 by Manoj Ahirwar)
- merged to idea 'Automatic code alignment' on 31 Dec 2018 08:26:06 by Vasco Pessanha
2014-02-07 17-02-43
Vasco Pessanha
Changed the category to
Service Studio


This comment was:
- originally posted on idea 'Nodes auto alignment in Service studio' (created on 26 Dec 2018 by Manoj Ahirwar)
- merged to idea 'Automatic code alignment' on 31 Dec 2018 08:26:06 by Vasco Pessanha

It could be nice if using the grid, the used could select the "step" to arrange the auto location of the nodes.


It could have a default value (example 5 points), but the could parameter  it 


Regards



This comment was:
- originally posted on idea 'Nodes auto alignment in Service studio' (created on 26 Dec 2018 by Manoj Ahirwar)
- merged to idea 'Automatic code alignment' on 31 Dec 2018 08:26:06 by Vasco Pessanha

I found a idea in the same direction....


https://www.outsystems.com/ideas/5944/Help+to+leave+the+elements+equidistant%2c++see+the+gif.?IsFromAdvancedSearch=True




This comment was:
- originally posted on idea 'Nodes auto alignment in Service studio' (created on 26 Dec 2018 by Manoj Ahirwar)
- merged to idea 'Automatic code alignment' on 31 Dec 2018 08:26:06 by Vasco Pessanha
Merged this idea with 'Adjust distances and aligning automatically' (created on 13 Feb 2021 22:37:00 by José Gonçalves)

Option to organize the flow with a standard distance and alignment.


BEFORE:


AFTER:




This comment was:
- originally posted on idea 'Adjust distances and aligning automatically' (created on 13 Feb 2021 by José Gonçalves)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:31:57 by Justin James

This has already been proposed, and marked as "Out of Scope", unfortunately. :(


Idea - Automatic code alignment | OutSystems 


J.Ja



This comment was:
- originally posted on idea 'Adjust distances and aligning automatically' (created on 13 Feb 2021 by José Gonçalves)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:31:57 by Justin James
Merged this idea with 'Auto Arrange of Screens and Blocks in Flows in Service Studio' (created on 07 Oct 2020 09:45:18 by JohnGB)

Currently, when a screen/s and block/s is moved or pasted in a flow, it is just randomly placed or scattered in the work space of the flow.

Would love to see a function which would align them automatically or just put them side by side when pasted or created.



This comment was:
- originally posted on idea 'Auto Arrange of Screens and Blocks in Flows in Service Studio' (created on 07 Oct 2020 by JohnGB)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:32:20 by Justin James

Good Idea!



This comment was:
- originally posted on idea 'Auto Arrange of Screens and Blocks in Flows in Service Studio' (created on 07 Oct 2020 by JohnGB)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:32:20 by Justin James

There's already alignment functionality built in. Every time this kind of Idea comes up, I merge it with the auto arrange Idea, then remember that the auto arrange idea was marked as "implemented".

If you select multiple items and right click, there's an "align" and "distribute" option. Can you try it and let me know if it does what you need?

J.Ja



This comment was:
- originally posted on idea 'Auto Arrange of Screens and Blocks in Flows in Service Studio' (created on 07 Oct 2020 by JohnGB)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:32:20 by Justin James

Hi Justin,

Thanks for this.



This comment was:
- originally posted on idea 'Auto Arrange of Screens and Blocks in Flows in Service Studio' (created on 07 Oct 2020 by JohnGB)
- merged to idea 'Automatic code alignment' on 14 Feb 2021 15:32:20 by Justin James
Merged this idea with 'Spacing in the logical flow' (created on 03 Oct 2023 14:37:04 by Aleff Correia)

It would be nice if there was a way to automatically space the logical flow when building the application.Making it standard and more readable.

Can't we already do this by selecting the flow elements, right-clicking, and choosing Align? 

Hi Beatriz, I believe the idea is that it would happen automatically.

Merged this idea with 'Align nodes with a single click' (created on 10 Mar 2021 09:59:01 by José Gonçalves)


A treat for devs with OCD:


Hi José,

Don't the current allign options not do this already?

Regards,

Daniel

They don't fix distances.

The only useful Align currently is Align Left/Right.

That what are the distribute menu options are for

Changed the category to
Service Studio
Merged this idea with 'Add the ability to automatically format action flows' (created on 01 Aug 2019 20:11:45 by Greg Whitten)

Add an ability to organize and format an action flow so that a messy action can be automatically spaced and aligned nicely.  Accessible by right clicking the canvas or from the Edit menu, and choosing Organize, the action nodes would be nicely spaced and aligned vertically and horizontally.  Similar to how traditional programming IDE's will format code for indenting and line breaks.

Changed the category to
Service Studio
Merged this idea with 'Service Studio Code Formatter' (created on 26 Oct 2022 13:51:38 by Kadir Ozcan)

When working on an application with multiple developers, you sometimes observe that not every code follows the same code formatting style. For example, spacing between code elements can sometimes be quite different.

It would be nice to have the option to auto-format code in Service Studio. This auto-formatting can maybe also be configured to follow a custom specified formatting style.

The benefit of this functionality would be consistency in code formatting.

Changed the category to
Service Studio

Would be SO helpful to speed up having clean code.

Merged this idea with 'Server/Client Actions Workflow Organizer' (created on 26 Jan 2024 20:06:42 by Fábio Miguel Ferreira Coelho)

Hi buddies,

I hope you're doing well.

I'm an OutSystems Developer and sometimes I need to develop some big server/client actions with a lot of things inside. I lost a lot of time organizing the workflow to look nice and readable.

My idea is the creation of a button in the Service Studio that automatically organizes the server/client actions workflow in the best way possible to look nice and readable. Basically, will put all the items aligned horizontally and vertically and will create a happy path.

I look forward to hearing from you.

Thank you.

Kind regards,

FC

Please search the ideas first to see if the idea already exists. Double posted Ideas will be merged.

Merged this idea with 'Beautify Logic Flow: Automated Workflow Organization in ODC/OS Service Studio' (created on 28 Jan 2025 14:43:24 by assif_tiger)

Greetings All,


While working & dealing with long logic workflows in OutSystems, the visualization of actions becomes very messy and complicated, which is very hard to follow and understand during attempts or probably we have to organize it always for better understanding.

It would be very helpful for the developers if we have an option of 'Beautify'.


In Service Studio whenever we right click on a logic action, there should be an option “Beautify” in the context menu and this beautify will automatically rearrange the order of the logic flow.

This idea is similar to what we already have in native code editors.

Thanks,
assif_tiger