IF Else design

Why has the design of stacked IF-Else loops been changed? Previously, IF and Else were displayed side by side, making it easier to work with. However, with the new design, it has become difficult to understand old codes and it get difficult to know which else elongs to which if. Old design of if-else was a big advantage of UiPath

1 Like

Hi @Mohite_Bhushan

Design changes are typically implemented by UiPath to improve user experience, enhance functionality.it is possible that some users may find certain changes initially challenging or unfamiliar, especially when working with existing code.
If you are experiencing difficulties understanding the new design of stacked IF-Else loops in UiPath, it is recommended to explore the official UiPath documentation, forums.

Hope it helps!!

Hi @Mohite_Bhushan

You can degrade to the oldest version of the packages to get that if-else activity

Hope it helps!!

1 Like

If Else hasn’t changed, it was always vertical.
The If has changed from a horizontal layout to a vertical one bringing it in line with the If Else and is a good change in my opinion since the horizontal scaling it could do is nasty, I am currently trying to deduce someone’s old code and the nested ifs all going horizontally is horrible.

Its much easier to go up and down a workflow rather than left to right, especially since one fat part (often caused by horizontal IF layouts) can cause the whole workflow to render in a horrible way.

Speak for yourself as I am very happy with this change and do not want it changed back and find it improves development speed.

Hi @Mohite_Bhushan

The only thing I can mention for now is that we are having a look at this issue. It looks to be a strong user preference because we are hearing feedback from both sides.

1 Like

If there are more than 2 or 3 nested IF blocks stretching your page across, then your code is wrong! That’s what a Flowchart is for at that point. This should highlight a problem in your code, rather than accomodating for it with the vertical design… that’s my biggest concern with this change. It’s not something we should get used to. If we are going to start doing top to bottom IF blocks we may as well just be coding it from scratch at this point. The whole point in UiPath is for the visual assistance/user friendliness which it is unbecoming with this new change.

The left to right design was WAY more intuitive and easy to compare side by side/ A-B comparison of the different paths. You could see in parallel the actions either path would follow in a single glance, now it’s tucked away at the bottom and more confusing to show to non-technical staff when trying to demonstrate something. The top to bottom design is a major step backwards and they need to change this ASAP.

UiPath: If it isn’t broken, don’t fix it!

Or even better, make it a configurable setting in your studio. Then both the horizontal camp and the vertical camp are happy!

As I explained, I was deducing someone elses old code and trying to refactor it remove the nasty nested IFs, which are an issue regardless of layout.

I disagree with you.
Vertical IF brings it in line with Else IF and also makes it consistent with other coding formats where the if goes down and something I prefer, especially for the ElseIF consistency.

This would become a discussion on one side ā€œit should be like this because ā€˜some standard in some other language’ therefor it should be the same everywhere argumentā€ versus ā€œI like this better because ā€˜personal preference argumentā€™ā€¦ā€

So pretty much comparing apples and oranges where neither one will ever agree with the other one…

Very fair, on other topics of this I have proposed a similar solution to yours so it can be toggled to selectively hide the If or the else (as often you only want one) aswell as the orientation.

I am mostly pushing back on ideas like this because I feel there are often bad reactions to many changes simply because some people don’t like change, which is not a good argument in my opinion.

My argument is more about consistency and familiarity, which are important points in UI design.

It was much better, you could visualize A | B and follow the linear flow of both lanes and quickly spot the differences very easily. You could always label the sequence and collapse them too, to make it neater.

Now, if you’re down in the Else container and not sure which If block it relates to, you have to do a whole bunch of scrolling up and lose where the hell you are. Also, if you’re trying to compare it to the linear flow of the True path versus the Else path, you’d be scrolling up and down constantly… really poor design

Not sure how anyone can justify the change. It is inconsistent yes… and the keyword here is ā€œUserā€ interface. It shouldn’t be just replicating the layout of background code. Otherwise we wouldn’t be bothering to use UiPath…

Perhaps if they wanted to change it up so much, they should have let this be a configurable option, much like the Dark/Light theme… each to their own preference… but don’t make a bold change like this as a blanket rule for all users on something we didn’t ask for.

Agree. And your point is valid.
But I also can understand the restraint on change. Looking back at most of the ā€˜modernizations’ UiPath has done the past few years, it very often hasn’t been an improvement, even if you leave out my own personal preferences.

I often get the feeling that the dev teams of UiPath Studio need to keep their backlog filled and keep changing things that work perfectly, just for the sake of changing things.

1 Like

Yes it feels like that.

Why not just focus on adding both options? I’ve been using UiPath since 2019 and it was always left/right If blocks when I first started. So consistency would be to keep it this way, else, bring in an option for top-down for those who prefer that (for some strange reason…) which can be toggled between the two.

Just upgrading to 23.10 and the workflows look messy to follow and even more box-y than ever. They sure love their boxes. They should rebrand as BoxPath :sweat_smile:

I don’t think that, considering how many features and changes are going on there is a ton to do.

Some features like this come wrapped in other requests. For years people were banging on about colour coding their workflows cause they are so horizontal and they lose track of which layer they are in so they want to colour code it (horrible idea in my opinion as just makes more visual clutter).
So they added colour coding and increased verticality, as is convention for reading things, and you get people now complaining of they want the horizontal mess back and why are there colours, what do they mean.

There is nuance in this discussion, and I do think they mis-step, for example removing the data type for for each loops was a mistake to not let us still manually select, but in general the software is waaaay better than it was 3 years ago.

1 Like

It doesn’t have to be 2 or 3 nested IF blocks. Put a Use App/Browser inside the If and a Check App State inside the Use App. This is perfectly normal and leads to unwieldy horizontal scrolling.

1 Like

Hello,

my two cents, now UiPath provides a ā€œreturnā€ activity that can help a lot to clarify coding, avoiding many If/else abuse.

For instance

If true : return; will stop workflow and continue

and after this you can code directly after activity and not in the else part because you are sure with the return statement that you will not reach this part of code if condition is met.

Much clearer code imo !

Hope this helps.

Please bring back the old view, or give users the ability to choose. This is a downgrade and you need to give users the choice.