Editing expressions via code directly is officially forbidden now?

I was not satisfied with the way how visual editing of expressions works in Wappler.
So I used a “hybrid” approach, when I combined working with it both visually and via code.

But seems like it is impossible now.

Say, I have an expression
data1 && data2

Now, when I open it in Data Bindings in Code Mode, it shows like
data1&&data2

And when I save it, it shows in page code like
data1&&data2

Obviously, I can’t work with that neither in the Data Bindings code nor in the page code.
But I can’t stop using Data Bindings window too. So what should I do?

So, instead of making things easier like I suggested here Wappler is moving in the opposite direction.
Or am I the only one disappointed?

  • I agree!
  • Don’t see a problem

0 voters

That is definitely not the case!

We actually improved the hand confine expressions in the visual expressions editor now in the latest Wappler so you can write in directly math and conditional operators.

What you see as &amp encoding is just the normal html encoding that is required on html attributes.

Hi Nick, not sure what you mean. We actually made it easier to write these directly without the need to go to code view, so operators like && are automatically recognized now in the visual expression builder:

1 Like

4 posts were split to a new topic: Add more formatting to the visual expression editor

Yes, this is very important for me too. I use code view 90% of the time…

2 Likes

@George @Teodor
I checked it right after the update. And I am sure I am still not gonna use this. :slight_smile:

Of course I wouldn’t mind a cool powerful modern visual editor for expressions.
But we are still far away from that, so it is crucial to be able to just edit expressions as fast and easy as possible.
And it can be provided only by simple strict code editing.

I was not pleased by doing it in the current UI, so I have suggested implementing something like this.

image

But at least code editing was possible before.
Now with all data1&&data2 and data1&&data2 I don’t know how to do it at all.

Stop that, we are not weirdos here. :slight_smile:

I am not a fan of coding, but it is obviously the fastest and easiest way to edit expressions in many cases.
So it is normal and rational to demand at least to keep this feature available.

Am not even sure that we are in minority about this matter.

Sorry Nick, but what stops you from editing your expressions in code view now?

The problem is I have data1&&data2 instead of data1 && data2 in the page code. I can’t work with that.

And in the code view in Data Binding it is data1&&data2 which is very inconvenient as well.

This has nothing to do with coding or not. It is just the required way to encode ampersand in HTML tag attributes.

In HTML attributes & needs to be encoded as &

See:

The html standard is described in:

https://www.w3.org/TR/xhtml1/guidelines.html#C_12

1 Like

I am afraid sir I will need proof of that.

1 Like

Ok, I understand that moment about html standart now.

But I stumbled upon & for the first time only a few days ago. So I believe it wasn’t like that before.
Is it really necessary? Could we keep ignoring this standard as before?

If not, then we need at least keep spaces so it would be data1 && data2 and not data1&&data2. So it would be possible to work with expressions somehow.

It still would be painful though.

well it is unfortunately necessary when you using ampersands in html attributes otherwise weird side effects might happen.

The good think is that Wappler does all the encoding for you - so you can still write you expressions in the data bindings dialog and those will be automatically escaped for you. You can still use the design / code switch there for complex code expressions and write the regular && and it will be correctly escaped for you.

Also do note that escaping is only needed when you have your expressions in html attributes only. All other places like Page/App Flows or Server Connect - do not require escaping.

So if I manually write && in the page code, is it ok? It wouldn’t be a disruption of html standard?

I think what’s throwing @nickneustroev off most is the spaces being trimmed out. I spend 90% of my time in code view in both the editor and data picker. When it first happened to me I thought it was a bug. I love Wappler automatically encoding, I just find it easier to read with spaces regardless of whether it’s && or && I love it other than the lack of spacing. Just my two cents.

1 Like