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

Flutter API docs included libraries missing link to code #3756

Open
guidezpl opened this issue Apr 23, 2024 · 2 comments
Open

Flutter API docs included libraries missing link to code #3756

guidezpl opened this issue Apr 23, 2024 · 2 comments
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@guidezpl
Copy link
Contributor

guidezpl commented Apr 23, 2024

I noticed some libraries included in Flutter don't have a View source code button e.g. https://api.flutter.dev/flutter/dart-ui/Color/lerp.html

image

Is this a limitation or can be worked around?

Screenshot 2024-04-23 at 09 35 34
@srawlins
Copy link
Member

Yes, it looks like no methods, etc. from dart:ui have a "Show source code" in the top right of the main frame. But methods found in package:flutter do have those links. @goderbauer do you know if this is expected / intentional? Should only package:flutter have such links? Should all packages? Should a short list of packages have those links?

@goderbauer
Copy link
Contributor

Ideally, all packages would have source links. We currently seem to only set up source links for the flutter/flutter repository, though, see: https://github.com/flutter/flutter/blob/b0524b354b1593e17f292cb4e78145916a549898/dev/tools/create_api_docs.dart#L570-L575

And after dartdoc is done we do some post-processing on the links here to "fix" them: https://github.com/flutter/flutter/blob/b0524b354b1593e17f292cb4e78145916a549898/dev/tools/create_api_docs.dart#L298

Not sure what we'd have to do to link to source for other packages (including the engine). Does dart doc support that? The docs are a little vague about this:

dartdoc/README.md

Lines 447 to 451 in d9e31ff

This gets more complicated with `--auto-include-dependencies` as these command line flags
will override all settings from individual packages. In that case, to preserve
source links from third party packages it may be necessary to generate
dartdoc_options.yaml options for each package you are intending to add source links
to yourself.

@pq pq added the P2 A bug or feature request we're likely to work on label Apr 23, 2024
@srawlins srawlins added type-enhancement A request for a change that isn't a bug type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) and removed type-enhancement A request for a change that isn't a bug labels May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants