bazel-contrib / bcr-ui

Website for the Bazel Central Registry
https://registry.bazel.build
Apache License 2.0
14 stars 9 forks source link

fix: easier copy/paste of package name and version #104

Open sgammon opened 10 months ago

sgammon commented 10 months ago

Summary

At the moment, it can be difficult on BCR to copy only the package name or version value, rather than the full code snippet. By adding an &nbsp; between the two <span>s and applying a small CSS fix, the selection can be bounded by the package name and version rather than copying both.

The effect is subtle but makes it much easier to copy/paste from these values, see below:

Before:

Screenshot 2023-09-11 at 1 51 09 PM

After:

Screenshot 2023-09-11 at 1 51 21 PM

Changelog

sgammon commented 10 months ago

Here are a pair of videos of the old vs new behavior in action (this PR only deals with selection, it doesn't put the value on the clipboard). Note that all clicks here are single-clicks in the new video.

Before:

https://github.com/bazel-contrib/bcr-ui/assets/171897/c41e7d29-a8e5-4a16-837d-c98f3b260f74

After:

https://github.com/bazel-contrib/bcr-ui/assets/171897/47284e66-33ea-4219-9046-3a3802528290

sgammon commented 9 months ago

@hobofan new to tailwind, thank you for these pointers; will adjust