Pub-dev: Make it easier for me to copy-paste the package name + version for use in pubspec.yaml

Created on 17 Feb 2020  路  9Comments  路  Source: dart-lang/pub-dev

Expected
When copying the package name _and_ the version, a visible/hidden : comes with it.

after

Actual
No helpful :, which means I paste it into pubspec.yaml and have to edit it.

before

Most helpful comment

I was secretly hoping we would one day find time to do a pub add <package> command, and insert a thing like: $ pub add uuid in the top right corner...

All 9 comments

Maybe we could add ^ too, e.g. uuid: ^2.0.4?

Well, I don't think we want the page to include that by default, which means we'd want a dropdown with various options for easy copy-paste. Something like Github:

dropdown options with copy to clipboard

Perhaps something like this, but less ugly:
example

Aside: I think it is a bit overkill. I just wanted to be a little lazier. Not maximum lazy.

I was secretly hoping we would one day find time to do a pub add <package> command, and insert a thing like: $ pub add uuid in the top right corner...

As requested by @bean5, I enclose the suggestion I made for this in #3564:
image

Screenshot 2020-08-03 at 00 38 02

reuploading image from #3902

Better to implement the suggestion on https://github.com/dart-lang/pub-dev/issues/3336#issuecomment-626133978 it is less confusing.

Seems like it's already available
image

Yes, closing this issue. Feel free to open new issues for improvements (some are already in the pipeline).

Just filled https://github.com/dart-lang/pub-dev/issues/4244 for some improvements.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Gyoko picture Gyoko  路  6Comments

jimboyeah picture jimboyeah  路  5Comments

mit-mit picture mit-mit  路  5Comments

basilex picture basilex  路  3Comments

jorgecoca picture jorgecoca  路  3Comments