-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix(kcodeblock): updated copy button data-test-id [KHCP-14752] #2577
fix(kcodeblock): updated copy button data-test-id [KHCP-14752] #2577
Conversation
✅ Deploy Preview for kongponents-sandbox ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -156,7 +156,7 @@ | |||
:aria-label="`Copy (${ALT_SHORTCUT_LABEL}+C)`" | |||
class="code-block-copy-button" | |||
:copy-tooltip="`Copy (${ALT_SHORTCUT_LABEL}+C)`" | |||
data-testid="code-block-copy-button" | |||
:data-testid="`code-block-copy-button${id ? '-' + id : '' }`" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if id is a required prop, how would it be empty...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty strings are still accepted right ?
example : id=""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''
is considered falsey for prop { type: String, required: true }
EDIT: maybe that's not true 🤔 , but either way you don't gain much from this except not appending a dash if the string is empty. Seems like unnecessary logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, i'll just remove the logic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀
## [9.17.2](v9.17.1...v9.17.2) (2025-01-20) ### Bug Fixes * **kcodeblock:** updated copy button data-test-id [KHCP-14752] ([#2577](#2577)) ([63bd9da](63bd9da))
🎉 This PR is included in version 9.17.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
JIRA ticket : https://konghq.atlassian.net/browse/KHCP-14752
Added Unique Id for copy button data-test-id