docfx icon indicating copy to clipboard operation
docfx copied to clipboard

Inline <seealso> not populating "See Also" section

Open KristianWedberg opened this issue 8 years ago • 5 comments

Inline <seealso> does not populate the "See Also" section

Functional impact

The reference won't appear in the "See Also" section.

Minimal repro steps

Using docfx v2.20:

    public class PopulatesSeeAlso
    { }

    public class DoesNotPopulateSeeAlso
    { }

    /// <summary>
    /// Also see <seealso cref="DoesNotPopulateSeeAlso"/>.
    /// </summary>
    /// <seealso cref="PopulatesSeeAlso"/>
    public sealed class Test
    { }

Expected result

All <seealso> tags should appear in the "See Also" section, even if they are located inside a top-level tag, such as <summary>.

Actual result

A top-level <seealso> tag works as expected, but a <seealso> tag appearing inside e.g. a <summary> tag will only appear in the "Summary" section, it won't (by itself) create a "See Also" section and it won't appear in the "See Also" section.

KristianWedberg avatar Jul 10 '17 13:07 KristianWedberg

It is by design. Only stand alone see also creates See Also section.

vicancy avatar Jul 11 '17 02:07 vicancy

The current design means:

  • An inline <see> does exactly the same thing as an inline <seealso>, so currently there's no reason to ever use an inline <seealso>
  • One often has to add both an inline <see> tag and a stand-alone <seealso> tag for the same reference, which is extra unnecessary code
  • Having the <seealso> tag not populating the "See Also" section under certain circumstances is very unintuitive

Feature Request

Please revise <seealso> to always populate the "See Also" section.

Thanks, Kristian

KristianWedberg avatar Jul 11 '17 08:07 KristianWedberg

Is this something one could customize by some template? I see this issue is quite old, but it still stands afaik.

Garonenur avatar Feb 13 '20 15:02 Garonenur

cc @herohua

vicancy avatar Feb 17 '20 02:02 vicancy

Judging from the DocFX v2 source code, I think the feature could be implemented like this:

TripleSlashCommentTransform.xsl would not have to be changed.

KalleOlaviNiemitalo avatar Aug 01 '20 15:08 KalleOlaviNiemitalo