-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hide EditorBrowsableNever members by default #4618
Conversation
@@ -45,7 +48,7 @@ public override string ToString() | |||
|
|||
public bool Equals(CodeLine other) | |||
{ | |||
return DisplayString == other.DisplayString && ElementId == other.ElementId; | |||
return DisplayString == other.DisplayString && ElementId == other.ElementId && other.IsHiddenApi == IsHiddenApi; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My assumption is that this is safe because all out-dated codefiles will be updated in the background to the latest version. If we think this is too dangerous I can make the new property nullable and add a safeguard such that if either is null, we don't consider it a difference. This way old files containing hidden APIs will not trigger a diff against new files. We could also leave the values as null for non C# languages so that they would not run into the same issue if ever enabling support for hidden API hiding.
However, it would be a lot simpler if we could rely on the background update process.
@@ -58,6 +59,15 @@ | |||
codeLineDisplay = "hidden-row"; | |||
} | |||
|
|||
if (Model.CodeLine.IsHiddenApi) | |||
{ | |||
hiddenApiRow = "hidden-api"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This applies the italicized style.
hiddenApiRow = "hidden-api"; | ||
if (Model.Kind == DiffLineKind.Unchanged) | ||
{ | ||
hiddenApiRow += " hidden-api-toggleable d-none"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes it toggleable. When there is a diff, it should not be toggleable.
@@ -8,7 +8,7 @@ | |||
<ul class="nav-list-children"> | |||
@foreach (var item in Model) | |||
{ | |||
<li class="@navListGroupClass"> | |||
<li class="@navListGroupClass @(item.IsHiddenApi ? " hidden-api-toggleable d-none" : "")"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hides the navigation section if it represents a hidden namespace/type.
Fixes #3900
EBN applied to constructor:
Show Hidden APIs checkbox:
Entire namespace and type is hidden:
Some hidden and some non-hidden APIs when Show Hidden is checked: