Improve logic constraints text formatting

Cyphall

New member
Currently, the "AND/OR/XOR/NOR" logic constraints are formatted as "LOGIC_OPERATOR (CONDITION_1, CONDITION_2, CONDITION_3, ...).
For example, an AND constraint with "battery level < 11%" and "power disconnected" will be formatted as "AND (Battery < 11%, Power Disconnected)". This is fairly hard to read, especially with multiple levels of nested constraints.

I would like the formatting to be changed to "(CONDITION_1 LOGIC_OPERATOR CONDITION_2 LOGIC_OPERATOR CONDITION_3 LOGIC_OPERATOR ...).
With this format, the same example above would look like this "(Battery < 11% AND Power Disconnected)", which is much easier to read IMO.

Could this be implemented?
 

Dm114

Well-known member
Currently, the "AND/OR/XOR/NOR" logic constraints are formatted as "LOGIC_OPERATOR (CONDITION_1, CONDITION_2, CONDITION_3, ...).
For example, an AND constraint with "battery level < 11%" and "power disconnected" will be formatted as "AND (Battery < 11%, Power Disconnected)". This is fairly hard to read, especially with multiple levels of nested constraints.

I would like the formatting to be changed to "(CONDITION_1 LOGIC_OPERATOR CONDITION_2 LOGIC_OPERATOR CONDITION_3 LOGIC_OPERATOR ...).
With this format, the same example above would look like this "(Battery < 11% AND Power Disconnected)", which is much easier to read IMO.

Could this be implemented?
I don't really understand your request. To me constraints display seems clear enough even with some more sophisticated imbrications. In these cases, for better understanding, it's important to add constraints in a logical and clearly readable order: as each added one is added ar the end of the list, it's sometimes advisable to reorder them (by cut-pasting some of them).

In the example attached, how would you like it to be displayed?
 

Attachments

  • 20230403_093602.jpg
    20230403_093602.jpg
    150.5 KB · Views: 7

Cyphall

New member
I am talking about how the conditions are formatted as text in the main task view.

For example, this Else If setup
a.png

will be shown as
b.png

in the main task view, which feels unintuitive and not easy to read.

I would like the formatting to be "(MacroDroid Variable AND (Battery > 10% OR Power Connected))" in this example.
 

Dm114

Well-known member
I am talking about how the conditions are formatted as text in the main task view.

For example, this Else If setup
View attachment 5150

will be shown as
View attachment 5151

in the main task view, which feels unintuitive and not easy to read.

I would like the formatting to be "(MacroDroid Variable AND (Battery > 10% OR Power Connected))" in this example.
Ok I understand but in your example the 1st AND connector is useless. It's the reason why formatted text is a bit complicated...
 

Cyphall

New member
Well, I find using an unified way of describing logic operators more, well, logic, than using two different ways (the root dropdown menu with AND and OR and the AND/OR/XOR/NOT constraint). With the existence of this constraint, the root dropdown menu is basically redundant, but that has nothing to do with my problem since I have nested constraints.

By the way, I found that the logic operator from the root dropdown menu is already formatted the way I want in this feature request, so this makes the different formatting from the constraint even more odd.
Screenshot_20230403_235356_MacroDroid.jpg
 
Top