Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sgammon
Copy link
Contributor

@sgammon sgammon commented Sep 11, 2023

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

  • fix: add non-breaking space between package name and version to allow for copying/pasting each one easily
  • fix: add css declaration to make copy/paste easier for package name and version

- fix: add non-breaking space between package name and version to
  allow for copying/pasting each one easily

- fix: add css declaration to make copy/paste easier for package
  name and version

Signed-off-by: Sam Gammon <[email protected]>
@sgammon
Copy link
Contributor Author

sgammon commented Sep 11, 2023

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:

Screen.Recording.2023-09-11.at.1.46.08.PM-HD.1080p.mov

After:

Screen.Recording.2023-09-11.at.1.48.03.PM-HD.1080p.mov

@hobofan hobofan self-requested a review September 20, 2023 06:48
Copy link
Member

@hobofan hobofan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the change, but I'd like to stick with Tailwind here and not introduce extra CSS classes. selectable -> select-all, decorative -> select-none

@sgammon
Copy link
Contributor Author

sgammon commented Oct 4, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants