-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Addition of a "Copy Code" button to the code editing interface #2446
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
Comments
Welcome! 👋 Thanks for opening your first issue here! And to ensure the community is able to respond to your issue, be sure to follow the issue template if you haven't already. |
Good feature request!! can i work on this.. |
I want to work on this issue |
@perminder-17 Share your ideas that how to add copy button.. |
I am working on it. |
I have successfully done the PR. Please see @lindapaiste. |
@perminder-17 has written all of the code for this in #2451, but we are not sure exactly what the button should look like and where it should go in the layout. If any of you have a good eye for design then feel free to share your thoughts! One option would be an icon button, similar to what GitHub uses: I also think that the UI in the mockups in this issue is better than what's in #2451 because the button is smaller and located closer to the code. This is a non-essential feature so we don't want too much emphasis on the button. |
Hey, could you also consider adding a reset button adjacent to the copy button to reset the whole code and start from the beginning. |
I've just submitted a pull request to address this feature. @lindapaiste your feedback and review would be greatly appreciated. |
Another thought: we should re-use the "Copied to Clipboard" tooltip which we have in the Share modal. The code for this tooltip is in the We're also using an npm package |
Hi @lindapaiste I liked your idea of reusing the tooltip and copying feature from the share Modal as:
But the problem is:
In my opinion, the existing code remains readable and maintainable, with only a few lines added for the copying feature. If we identify additional areas in the future where the copying feature is required, we can reconsider the architecture at that time. However, I respect your opinion, and if you believe implementing the feature differently would be beneficial, I'm open to discussing and implementing it accordingly. |
Hello @lindapaiste, In response to your suggestion to incorporate a tooltip after copying, I've recently implemented this in my latest commit for issue #2462. 🔄 Changes Made:
📚 Additional Context: For the basis of this implementation, I referred to the Kindly review the code in issue #2462, and I welcome any feedback or suggestions you may have. |
Hello @lindapaiste, I hope you're doing well. I wanted to gently remind you about the pull request I submitted last week for issue #2462. As a newcomer, I'm excited about my first potential merge and would really appreciate your feedback whenever you get a chance. Thank you for your time! |
Hello @lindapaiste, Hope you're well. Just wanted to check in on my PR #2462 from a couple of months back. I've attached the video of what the feature looks like. Any chance you could share your thoughts when you get a moment? Thanks a bunch! Copy.with.Tooltip.mp4 |
Increasing Access
1.Enhanced Usability: The "Copy Code" button would simplify the task of copying code, reducing the need to manually select and
copy text, which can be error-prone and time-consuming.
2.Improved Productivity: Users can save time and effort when sharing or moving code within your platform, increasing overall
productivity.
3.User Satisfaction: Implementing user-requested features like this can enhance overall user satisfaction, demonstrating that you
listen to and value user feedback.
Feature request details
I propose the addition of a "Copy Code" button to the code editing interface. This button would allow users to easily copy the code from the text area created for writing and editing code. The feature aims to streamline the process of copying code snippets and would be particularly useful for users who frequently share code with others or need to move code between different parts of your platform.
The text was updated successfully, but these errors were encountered: