Skip to content

Conversation

ConnorKirk
Copy link
Contributor

Issue number: closes #7263

Summary

The copy to clipboard functionality did not always work as expected. Clicking the clipboard icon did not work.
This seems to be because the event handler is added to the copyMe class. The clipboard icon is a sibling to this class, rather than a child of the class.

The typescript docs had a similar issue and we implemented the same fix
Issue: aws-powertools/powertools-lambda-typescript#3832
PR: aws-powertools/powertools-lambda-typescript#3836

Changes

  • Remove clipboard icon from markdown.
  • Define clipboard icon as css

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

@pull-request-size pull-request-size bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Aug 28, 2025
Copy link

boring-cyborg bot commented Aug 28, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #python channel on our Powertools for AWS Lambda Discord: Invite link

@boring-cyborg boring-cyborg bot added the documentation Improvements or additions to documentation label Aug 28, 2025
@ConnorKirk ConnorKirk force-pushed the docs/copy-to-clipboard-fix branch from e129feb to 2632162 Compare August 28, 2025 09:52
@ConnorKirk
Copy link
Contributor Author

I need to confess I've hit a weird issue that stopped the markdown lint container image running in my pre-commit hook. I've skipped it, as I think the check is also run in the CI. Sorry for my bad behaviour 🙈

@ConnorKirk ConnorKirk marked this pull request as ready for review August 28, 2025 10:47
@ConnorKirk ConnorKirk requested a review from a team as a code owner August 28, 2025 10:47
This commit fixes the copy to clipboard button.
It moves the definition of the clipboard icon to CSS, removing the need to define it in each line, and fixing the bug affecting usage.
@ConnorKirk ConnorKirk force-pushed the docs/copy-to-clipboard-fix branch from 3d7e6ca to b06b798 Compare August 28, 2025 10:49
Copy link

Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Hi @ConnorKirk, is this working in your environment? It doesn't seem to be working in Chrome. I don't think this is an issue with this change, but it's not working for me.

Can you please take a look?

@ConnorKirk
Copy link
Contributor Author

Weird 🤔
It is working for me in both Chrome and Firefox locally.
I didn't include it in the gif, but I can see it appearing in my clipboard manager as well

Firefox:
2025-08-28_clipboard-firefox (1)

Chrome:
2025-08-28_clipboard-chrome (1)

@leandrodamascena
Copy link
Contributor

Actually you're right! There was something weird with Chrome. This is working now.

@leandrodamascena leandrodamascena self-requested a review August 28, 2025 12:26
Copy link
Contributor

@leandrodamascena leandrodamascena left a comment

Choose a reason for hiding this comment

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

Thanks @ConnorKirk! APPROVED!

@leandrodamascena leandrodamascena merged commit 97d7601 into aws-powertools:develop Aug 28, 2025
8 checks passed
Copy link

boring-cyborg bot commented Aug 28, 2025

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: Copy to clipboard icon doesn't invoke copy
2 participants