dart-lang / pub-dev

The pub.dev website
https://pub.dev
BSD 3-Clause "New" or "Revised" License
777 stars 145 forks source link

Target attribute in the Github Links. #7778

Closed rennylangat closed 4 months ago

rennylangat commented 4 months ago

We could add a target attribute to the link of the package's Github repository. I followed down the specific page and if I am not wrong this is it app/lib/frontend/templates/views/pkg/info_box.dart and Line 158 could take the target attribute.

Further Explanation: I think we can all agree it'd be nicer not to have to cmd/ctrl+ click every time guys yeah?

Screenshot
isoos commented 4 months ago

There was a design choice not to put the target attribute there (among most other places).

cmd/ctrl + click gives a choice: you may open the link in the same tab or open in a new. Defaulting with target attribute will remove this choice, and it would depend on the browser whether it will be a new window or a new tab. On top of that, we would need to be consistent, and update all outgoing link with the same target attribute for consistency. Hence, we rather not force the users to open links in new tab/window.

rennylangat commented 4 months ago

Got it, thanks for your swift response @isoos.