-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: an issue in the HistoryView component where keywords in copied content contain html code #1662
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
Conversation
|
20c682b to
6ad9891
Compare
f51c8ae to
feaf792
Compare
…ontent contain html code
mrubens
left a comment
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.
Thanks!
Context
The HistoryView component now handles copied content with HTML code correctly.
The CopyButton component now extracts the plain text from HTML content before copying.
The test coverage for the HistoryView component has been improved.
Implementation
Modified the CopyButton component to handle HTML content by extracting the plain text.
Added a new test file for HistoryView component.
Added a data-testid attribute to the task content element.
Mocked dependencies and window.vscode for testing.
Screenshots
| before | after |
|
copy <span class="history-item-highlight">me</span>!|copy me!|| | |
How to Test
Added a new test file for HistoryView component.
Get in Touch
dreambt@discord
Important
Fixes HTML content copying issue in
CopyButtonby extracting plain text, with tests added forHistoryView.CopyButtoninCopyButton.tsxnow extracts plain text from HTML content before copying.HistoryViewinHistoryView.tsxupdated to includedata-testidattributes for testing.HistoryView.test.tsxadded to test plain text copying functionality.useTaskSearchanduseClipboardhooks, andwindow.vscodefor testing.data-testidtotask-contentandcopy-buttoninHistoryView.tsx.This description was created by
for 2a986212cc10f077d3e46297b4d7457d647daa17. It will automatically update as commits are pushed.