carbon-app / carbon

:black_heart: Create and share beautiful images of your source code
https://carbon.now.sh
MIT License
34.44k stars 1.91k forks source link

Copy Plain URL doesn't copy anything #1379

Open OnkelTem opened 2 years ago

OnkelTem commented 2 years ago

Describe the bug Copying "Plain URL" doesn't work.

To Reproduce Steps to reproduce the behavior:

  1. Open https://carbon.now.sh/
  2. Select the "Plain URL" item from the copy menu:

image

  1. Open a new tab and paste the URL. It pastes just the site's root URL: https://carbon.now.sh/

Expected behavior A link to the snippet would get copied.

Info (please complete the following information):

mfix22 commented 2 years ago

Does your browser have access to the clipboard? This works great on all browsers I have access to.

OnkelTem commented 2 years ago

Of course it has. It just doesn't copy anything the full URL. I can make a video.

UPDATE https://www.youtube.com/watch?v=TFJFG5kp65o

thevinitgupta commented 2 years ago

@OnkelTem Have tried after logging in? Because I am seeing the same error until I login to my account.

mfix22 commented 1 year ago

Thanks for the helpful reproduction video @OnkelTem! This should be an easy fix (I imagine you would be able to fix it yourself if you are interested).

agilityhawk commented 1 year ago

Hello. I was looking to pick this up and have been able to reproduce it on the prod site (thanks to the vid by @OnkelTem). However, in order to reproduce this locally and confirm my fix, I wanted to go through the flow and receive the API response that saves the snippet but am unable to locate the API/server-side code where this response is supposed to come from.

Since I was unable to find it in this code, I'm assuming that API and backend code for this is somewhere else? @mfix22 - Could you provide further insights into this assumption please?

Thanks in advance!

P.S: Additionally, I was also hoping if we could add a local/placeholder .env file that just lists all the ENV variables that are consumed by this code, in case we wanted to set them up locally as well?