dotnet / dotnet/project-system

Support per-configuration visibility conditions

Open
#7,052 1 comment 0 reactions 0 assignees View on GitHub
Feature-Project-Properties-Designer Triage-Investigate
Dominant language
C#
Stars
1k
Forks
415
PR merge metrics
No merged PRs in 30d

Description

#### Summary
Some properties are directly related to other properties. Meaning, the state of one property determines something about another property. In this case here, `Treat warnings as errors` determines if one property can be shown (`Treat specific warnings as errors`) versus showing another property (`Exclude specific warnings as errors`). It works like a light-switch, when it is off, you see `Treat specific warnings as errors`, and when it is on, you see `Exclude specific warnings as errors`.

However, there is a problem. `Treat warnings as errors` can be varied by Configuration. Meaning, each configuration variation (`Release`, `Debug`, etc.) can have their own value for this light-switch. If one is off and one is on, you'll see both `Treat specific warnings as errors` and `Exclude specific warnings as errors`. The relationship to which variation those apply is the problem.

Each of these properties are, therefore, able to be varied by Configuration. But the UI doesn't display this properly. Firstly, it does not automatically go into `Vary value by Configuration` mode. This means, it shows a single edit box instead of one edit box per Configuration variation. If you switch it to `Vary value by Configuration` mode, it will show Configurations for which this value does not apply! This adds to the confusion. The ask here is to make dependent properties (those whom depend on other properties to be visible) to automatically react to varied parent properties.

#### Expected Behavior
| Before | After
| ----------- | -----------
| Going from this state, all variation values of the parent property are the same [unchecked]. | To this state [checked], will properly show varied UI for dependent properties. I've make a mock-up here.
| ![image](https://user-images.githubusercontent.com/17788297/112550565-cd043c00-8d7c-11eb-9df4-f1587dab8eb7.png) | ![image](https://user-images.githubusercontent.com/17788297/112550975-6cc1ca00-8d7d-11eb-9d70-f4f3c77dba7d.png)

#### Actual Behavior
| Before | After | Additional
| ----------- | ----------- | -----------
| Going from this state, all variation values of the parent property are the same [unchecked]. | To this state [checked], does not show variation UI for dependent properties. | Additionally, enabling variation UI for dependent properties improperly shows variations that are not applicable for those properties, given the parent property's state.
| ![image](https://user-images.githubusercontent.com/17788297/112550565-cd043c00-8d7c-11eb-9df4-f1587dab8eb7.png) | ![image](https://user-images.githubusercontent.com/17788297/112551071-98dd4b00-8d7d-11eb-9196-0e739da938ee.png) | ![image](https://user-images.githubusercontent.com/17788297/112550851-3f751c00-8d7d-11eb-94b6-832234120b0b.png)

#### Clip of Suggestion
![VisibilityByVariation](https://user-images.githubusercontent.com/17788297/112548652-cc1ddb00-8d79-11eb-9455-3e3ce48924fd.gif)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.