Skip to content
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 SelectionArea copy bug #125

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Fix SelectionArea copy bug #125

wants to merge 7 commits into from

Conversation

wilinz
Copy link

@wilinz wilinz commented Aug 19, 2023

For more information, please refer to flutter/flutter#104548

@asjqkkkk
Copy link
Owner

Hello @wilinz ,thank you for your pull request. The copy feature has been implemented very well in my experience. However, it seems that there is currently no corresponding test code written for the SelectionTransformer, which covers almost all components. Can you also add the corresponding Widget test code? Once the functionality is confirmed to be working properly, I will merge them as soon as possible.

@wilinz
Copy link
Author

wilinz commented Aug 19, 2023

Dear repository owner,

Hello, based on my understanding, the functionality of the SelectionTransformer widget primarily involves transforming selected text during copy operations, which cannot be directly verified through widget tests. It requires integration testing to simulate user copy operations and check if the text copied to the clipboard matches the expected result.

Flutter provides a package called flutter_driver for integration testing. However, as of now, flutter_driver does not support direct access or manipulation of the clipboard. You may need to rely on third-party plugins like clipboard_manager to perform clipboard operations in integration tests.

However, this can make the testing process complex, and it may require running tests on real devices since some emulators may not support clipboard operations.

In conclusion, comprehensive testing of the SelectionTransformer widget can be complex and requires a combination of integration testing and third-party plugins.

Therefore, I apologize that I may not be able to provide test case writing in this scenario.

Thank you for your understanding and support.

@asjqkkkk
Copy link
Owner

Hi @wilinz , I roughly understand that writing corresponding unit tests might be a bit troublesome.
However, I have encountered a new bug while using it, which is that when you copy like this according to the image, it generates a large number of line breaks. This issue did not occur in previous versions. Could you please confirm which part of the new code might have caused this?
image

@wilinz
Copy link
Author

wilinz commented Aug 21, 2023

Hello, this bug exists at present, and there are also some bugs on the desktop side, waiting for my investigation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants