Skip to content
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

[Feature Request] Consolidate overloads #10101

Open
frarees opened this issue Jul 10, 2024 · 1 comment
Open

[Feature Request] Consolidate overloads #10101

frarees opened this issue Jul 10, 2024 · 1 comment
Labels
dotnet Generate .NET API reference docs

Comments

@frarees
Copy link
Contributor

frarees commented Jul 10, 2024

Given this source:

namespace MyNamespace
{
    public class MyClass
    {
        public void MyMethod() { }
        public void MyMethod(float f) { }
        public void MyMethod(float f, int i) { }
        public void MyMethod<T>(float v, int i) { }
        public void MyMethod<T, T1>(float v, int i) { }
        public void MyMethod<T, T1, T2>(float v, int i) { }
        public int MyMethod(float v, int i, string s) => 0;
    }
}

MyNamespace.MyClass.html looks like this:

image

But I'd like to have an option to render it like this:

consolidated

Is this currently possible?

@yufeih yufeih added the dotnet Generate .NET API reference docs label Jul 11, 2024
@frarees
Copy link
Contributor Author

frarees commented Jul 16, 2024

I've managed to accomplish it at theme transformation level, via ManagedReference.extension.js (on top of modern).

Would be nice if all this would be leveraged by the builtin themes, and configurable through metadata.

One issue I've encountered is that I can't xref to a page - I don't know how. For example, if I have uid:MyNamespace.MyMethod(float, int), MyNamespace.MyMethod(float, float) but not uid:MyNamespace.MyMethod, I cannot consolidate into the xref MyNamespace.MyMethod. Instead, I have to avoid using xref/uid and store hrefs and names myself.

Is there any way to get a <xref> to point me to MyNamespace.MyMethod.html (no specific uid)? Otherwise I have to <a href="{{myCustomHref}}">.

Another issue is going to be which summary to use, when you have a bunch of overloads. Right now I pick the first one found.

If there's interest I can share my implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet Generate .NET API reference docs
Projects
None yet
Development

No branches or pull requests

2 participants