dartdoc icon indicating copy to clipboard operation
dartdoc copied to clipboard

Aliases for entries

Open dnfield opened this issue 7 years ago • 3 comments

See https://github.com/flutter/flutter/issues/24351

We redid a bunch of classes that were declared like this:

abstract class ReallyAMixin {
  factory ReallyAMixin._() => null;
  ...
}

To this:

mixin ReallyAMixin {
}

Which now is resulting in a new Dart doc link (...-mixin.html instead of ...-class.html), which is breaking external links. Is there some sensible way we could alias ReallyAMixin-class.html to ReallyAMixin-mixin.html? Obiviously for docs we control we should just update the links, but this might hurt things like old StackOverflow answers or blog posts.

/cc @gspencergoog @sfshaza2

dnfield avatar Nov 14 '18 21:11 dnfield

If there's no existing way, it might be nice to have something like:

/// {@alias abstract class ReallyAMixin}

Or perhaps some other top level file that control such things, for cases where types get renamed.

dnfield avatar Nov 14 '18 21:11 dnfield

I like the idea of a top level control file for this sort of thing. In the meantime, you could probably patch this particular case of it up in post-processing.

jcollins-g avatar Nov 14 '18 22:11 jcollins-g

Related, https://github.com/dart-lang/dartdoc/issues/1346 would make this obsolete for type changes if it were generalized

guidezpl avatar May 23 '22 09:05 guidezpl