aui-framework / aui-framework/aui

AUI_DECLARATIVE_IF

Open
#501 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
598
Forks
44
Avg merge
17h 56m
Merged PRs (30d)
3

Description

### Describe the need of your project

If there's [AUI_DECLARATIVE_FOR](https://aui-framework.github.io/develop/group__useful__macros.html#ga3b247bd8a48a4e7cae4882e19ef45cbc), there's should be a `AUI_DECLARATIVE_IF`, which conditionally disables visibility of (group of) views.

### Proposed solution

```
/* pseudo code */
TextField { state->password },
CheckBoxWrapper { state->showPassword, Label { "Show password" } }
AUI_DECLARATIVE_IF(!state->showPassword) {
TextField { state->passwordConfirmation }
}
```

### Alternatives you've considered

But after re-consideration, I've recognized a more robust solution would be introduce property support to `with_style`, i.e.,

```
/* pseudo code */
TextField { state->password },
CheckBoxWrapper { state->showPassword, Label { "Show password" } }
TextField { state->passwordConfirmation } with_style {
AUI_REACT(state->showPassword ? Visibility::VISIBLE : Visibility::GONE)
}
```

### Additional context

_No response_

Contributor guide

Open the contributing guide

Research direction

Start by reading the AUI_DECLARATIVE_FOR documentation and inspecting the existing with_style and AUI_REACT concepts referenced in the issue. Determine whether the intended result is a new AUI_DECLARATIVE_IF construct or property support for with_style, then validate the chosen API with the conditional-visibility examples shown in the issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.