ctrl-v icon indicating copy to clipboard operation
ctrl-v copied to clipboard

Add line number selection

Open jackyzha0 opened this issue 3 years ago • 12 comments

Would be nice to be able to create permalinks for pastes too, similar to what GitHub offers: https://docs.github.com/en/github/managing-your-work-on-github/creating-a-permanent-link-to-a-code-snippet

Example URL would be https://ctrl-v.app/2uKMJEu#L1-L14

Good place to start would be the lineProps prop on the syntax highlighter: https://www.npmjs.com/package/react-syntax-highlighter

AC:

  • [ ] After a paste has been created, users should be able to click on the line number gutter to highlight/select lines
  • [ ] Selecting lines should bring up the option to copy a permalink to those lines
  • [ ] Viewing a paste with permalink anchors should highlight those lines

jackyzha0 avatar Mar 06 '21 19:03 jackyzha0

Do you want something similar to this? :

image

Siddhant-K-code avatar Apr 12 '21 12:04 Siddhant-K-code

Do you want something similar to this? :

image

ctrl-v already has something like this in the 'view paste' mode but I wanted to add the ability to select a range of line numbers to highlight and copy a permalink to (similar to GitHub's functionality)

Will update the issue with more info in a bit

jackyzha0 avatar Apr 12 '21 14:04 jackyzha0

@Siddhant-K-code updated, let me know if this is still something you'd like to work on!

jackyzha0 avatar Apr 12 '21 16:04 jackyzha0

@Siddhant-K-code updated, let me know if this is still something you'd like to work on!

ok, I will look into it

Siddhant-K-code avatar Apr 12 '21 16:04 Siddhant-K-code

Example URL would be https://ctrl-v.app/2uKMJEu#L1-L14

Line Numbering is Broken? :

image

No Line Number is not showing after 64

Siddhant-K-code avatar Apr 13 '21 04:04 Siddhant-K-code

ctrl-v.app/2uKMJEu#L1-L14

hm that's really funky, what's your screen size? image

jackyzha0 avatar Apr 13 '21 04:04 jackyzha0

Idk, what is the issue, it is looking the same on multiple monitors and even after increasing/decreasing screen resolution.

Siddhant-K-code avatar Apr 13 '21 04:04 Siddhant-K-code

Idk, what is the issue, it is looking the same on multiple monitors and even after increasing/decreasing screen resolution.

ah, just realized this is a CSS change I made to line-breaking in the pre, code, and textarea tags oof, do you mind filing this as a separate issue?

jackyzha0 avatar Apr 13 '21 04:04 jackyzha0

no, we can cover this under this, also there are a lot of CSS changes required like, the Watermark at the left bottom is not responsive!

Siddhant-K-code avatar Apr 13 '21 04:04 Siddhant-K-code

Or, we can create a new issue for fixing all CSS! till then can you please tell color palette for #63

Siddhant-K-code avatar Apr 13 '21 04:04 Siddhant-K-code

Or, we can create a new issue for fixing all CSS! till then can you please tell color palette for #63

this would be preferred! having an issue for all CSS related ones would be nice. Let me get you the palette

jackyzha0 avatar Apr 13 '21 04:04 jackyzha0

created #79 for all CSS stuff

Siddhant-K-code avatar Apr 13 '21 04:04 Siddhant-K-code