zenorocha / codecopy

A browser extension that adds copy to clipboard buttons on every code block

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Button on left side of code

katrinleinweber opened this issue · comments

Would it be possible to place the button to the left of the code? In all preview examples there is more space between the code and the button, than there is code in the block ;-) Shave off some meters of mouse movement per day?

@katrinleinweber I understand what you are saying but isn't the default position for something like this in general the top right corner? To me this seems the most dominant position where people will check.
Of course always open to feedback.

The Edit > Copy/Paste menu items are also mostly on the left half of program windows. Anyway, I would argue that since your button replaces selecting the code, that (also left-oriented) mouse movement is a better comparison than other workflows (like issue management on GitHub).

I understand what you are saying, if something like this will be added it should be optional imo. So a (small) settings menu will be required.

Also this will create extra complexity, as you can see in the preview examples there is no room on the left side. I think there are 2 options for this:

  • Change CSS to move content so there is room for the button (might not be possible to make it work out of the box for all websites).
  • Make button appear over the code.

Btw Zenorocha has given me contributor rights on this project so I am going over all the issues ;) Sorry if you consider this as spam or outdated.

I consider it current, no worries :-)

Updating position: absolute to float: left under .codecopy-btn keeps an OK look on GitHub & StackOverflow at least:

screen shot 2018-11-19 at 18 22 02

screen shot 2018-11-19 at 18 26 54

I think we agree that drawing over the code would not be a good idea.

For know I am going to go through the existing PR's first before doing anything new.
But you are always welcome to help me out and make a PR for this ;)

Anyways if I will be working on this I will for sure tag you and ask your feedback.

To me this seems the most dominant position where people will check.

This seems important to me. I would recommend at least opening a ballot before making such design change.