Conditional Visibility Property for Widgets
126
Views
2
Comments
New
OutSystems UI

Currently in OutSystems, developers often need to wrap widgets inside a Container or an If widget just to control their visibility. This makes the UI tree more complex and adds unnecessary nodes.

Proposed Solution

Add a “Visible ” property directly on all widgets.

  • Accepts a Boolean expression

  • No need to wrap the widget inside Containers or If widgets

  • Works for all widget types (Text, Input, Button, List, etc.)

  • Automatically hides/shows the widget based on the expression

Example

Visible : User.IsAdmin = True

The widget is only visible if the expression is true — without adding a Container.


While I understand where this is coming from, from my experience having a explicit IF in the UI is much more maintainable than Visible properties. 

In most teams I've worked, it's considered an anti pattern to use the Visible property of containers.

I agree with @Tiago Ribeiro here. 

I find it easier for a developer, who did not contribute to the code before, to detect a conditional visibility in the Widget Tree when there is an IF used.

The visibility parameter in any widget, and specially containers, is hard to detect with the naked eye.