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

Refine IME composing range styling by applying underline as text style #2244

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

agata
Copy link
Contributor

@agata agata commented Sep 19, 2024

Description

Changed the implementation of the underline styling during IME conversion. Instead of manually drawing a line beneath the composing text, the underline is now applied directly as a text style to the conversion range. This simplifies the implementation and brings it in line with Flutter's standard TextEditingController behavior.

TextEditingController#buildTextSpan
https://github.com/flutter/flutter/blob/2277e055508ee6e11ea1313a06ec5b353e76eecc/packages/flutter/lib/src/widgets/editable_text.dart#L285-L309

In the previous implementation, there was an issue where the composing style appeared like a strikethrough, positioned around the middle of the text, especially when the text height was higher than usual, such as with headers. This issue has been completely resolved with the current fix.

before:
before

after:
after

Related Issues

  • Improve No underline displayed for characters being converted with IME on iOS #2179

  • New feature: Adds new functionality without breaking existing features.

  • 🛠️ Bug fix: Resolves an issue without altering current behavior.

  • 🧹 Code refactor: Code restructuring that does not affect behavior.

  • Breaking change: Alters existing functionality and requires updates.

  • 🧪 Tests: Adds new tests or modifies existing tests.

  • 📝 Documentation: Updates or additions to documentation.

  • 🗑️ Chore: Routine tasks, or maintenance.

  • Build configuration change: Changes to build or deploy processes.

Suggestions

@singerdmx singerdmx merged commit b4ae815 into singerdmx:master Sep 19, 2024
2 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.

2 participants