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

feat: support formatting text when the composing range is not collapsed #900

Merged

Conversation

LucasXu0
Copy link
Collaborator

@LucasXu0 LucasXu0 commented Sep 26, 2024

Before that, we only supported formatting text when the selection was collapsed and the composing range was collapsed.

For some IMEs, especially those combining backtick with other characters to input a new character, the composing range is not collapsed before formatting text.

Solution: Check if the newly input character is formattable, even if the composing range is not collapsed. If so, format it; otherwise, ignore it.

showcase.mp4

@LucasXu0 LucasXu0 changed the title feat: support formatting text when the text selection is composing feat: support formatting text when the composing range is not collapsed Sep 26, 2024
Copy link

codecov bot commented Sep 26, 2024

Codecov Report

Attention: Patch coverage is 36.73469% with 31 lines in your changes missing coverage. Please review.

Project coverage is 72.17%. Comparing base (737681d) to head (9697064).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...rvice/ime/delta_input_on_non_text_update_impl.dart 14.28% 18 Missing ⚠️
...component/service/ime/non_delta_input_service.dart 0.00% 8 Missing ⚠️
lib/src/core/location/selection.dart 0.00% 4 Missing ⚠️
...rmat_single_character/format_single_character.dart 93.75% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #900      +/-   ##
==========================================
- Coverage   72.30%   72.17%   -0.13%     
==========================================
  Files         317      317              
  Lines       14822    14866      +44     
==========================================
+ Hits        10717    10730      +13     
- Misses       4105     4136      +31     
Flag Coverage Δ
72.17% <36.73%> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@LucasXu0 LucasXu0 merged commit 628d5c8 into AppFlowy-IO:main Sep 26, 2024
5 of 7 checks passed
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.

1 participant