-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[web] Implement Link for web #3155
Conversation
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me; I'd move the link.dart file under src so users can't import it; that way I wouldn't worry much about making things _Private.
My only real concern would be to auto-applying a 'rel' attribute, or letting users set it alongside the 'target', so window.opener does not become an issue.
Everything else is nitpicking, and since most of this file is private anyways, it seems it can be refactored later, if needed/wanted.
packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart
Outdated
Show resolved
Hide resolved
packages/url_launcher/url_launcher_web/lib/url_launcher_web.dart
Outdated
Show resolved
Hide resolved
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ship it, let's give this a shot!
ditman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| group('link', () { | ||
| testWidgets('creates anchor with correct attributes', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the test! In a further PR, I think this should be separated to its own test file: link_integration.dart or similar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I want to also add more tests around hit testing but I couldn't make it work so it's gonna take some time. I wanted to land this ASAP to unbreak the url_launcher plugin.
cyanglaz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
The red Merging. |
|
Thanks for publishing this, @mdebbar! |
|
So what version does this work in, is it working now? |
|
@neiljaywarner This should work all the way up to flutter channel beta? |
|
@ditman will it get documentation on flutter.dev or similar "soon"? Also I might have had an issue where I didn't switch to most recent version bc nullsafety issue |
|
@neiljaywarner there is documentation for the widget, here: (The widget comes in the url_launcher plugin) |
|
Unfortunately, the CMD+Left Mouse Click still not working to open the link in the new tab as users are used in the "classic" web app. |
Description
The design has been discussed in:
Issues:
Fixes flutter/flutter#68545