-
Notifications
You must be signed in to change notification settings - Fork 340
Description
When navigating to an example in the Flutter repo source code in the form of:
/// {@tool dartpad}
/// This example shows various [ClipRRect]s applied to containers.
///
/// ** See code in examples/api/lib/widgets/basic/clip_rrect.0.dart **
/// {@end-tool}
/// ...
/// {@tool dartpad}
/// This example shows a [ClipRRect] that adds round corners to an image.
///
/// ** See code in examples/api/lib/widgets/basic/clip_rrect.1.dart **
/// {@end-tool}If there are multiple examples in the comment then it says that there are two possible "definitions" for the destination, when the analyzer should be supplying the full path to the destination under the pointer, and so VSCode should be linkifying the entire path, not just the path element.
If there is only one example in the dartdoc block, then it more correctly links to just the link under the pointer:
However, it seems to me that VSCode should be rendering the links in another color (the "link" color that is used by symbol refs in brackets) so that users even know that they can click on them. It's not very discoverable to have to ctrl-click on the path in a comment, since it's not expected that it is a symbol.
It also seems like in that screenshot that the tooltip/hover text is showing an empty tip, which also shouldn't happen.
To Reproduce
Steps to reproduce the behavior:
- Open
flutter/packages/flutter/lib/src/widgets/basic.dartin the Flutter repo. - Point at the path in the "See code in" marker in the dartdoc block for
ClipRRect. - If you press Ctrl/Cmd while pointing at parts of the path, it will only highlight that part of the path, and will think there are two destinations.
Expected behavior
- Draw the link in the "link" color, even when not pointing at it.
- When pointing at it with Ctrl/Cmd down, linkify the entire path, not just the component under the pointer.
- When clicking on the path, it should just navigate without having to disambiguate, even if there are multiple examples.
- When pointing at a link, don't show an empty tooltip.
Please complete the following information:
- Operating System and version: Debian GNU/Linux rodete 5.18.16-1rodete1-amd64
- VS Code version: 1.71.2
- Dart extension version: v3.48.4
- Flutter extension version: v3.48.0
- Dart/Flutter SDK version: Dart version 2.19.0 (build 2.19.0-229.0.dev)/Flutter version 3.4.0-29.0.pre.111

