-
Notifications
You must be signed in to change notification settings - Fork 266
Spell #1168
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
base: main
Are you sure you want to change the base?
Spell #1168
Conversation
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.
Pull request overview
This PR implements a comprehensive spell checking feature for the AppFlowy Editor, adding real-time dictionary-based spell checking with visual underlines, hover-based suggestion menus, and autocorrect functionality for desktop platforms.
Key Changes
- Dictionary-based spell checker with a 10,000-word dictionary and smart exclusion rules for technical terms, proper nouns, and code identifiers
- Visual spell check indicators with red wavy underlines for misspelled words integrated into the rich text rendering
- Interactive suggestion system with hover-based popup menus for word corrections and automatic word replacement
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
lib/src/service/spell_check/spell_checker.dart |
Core spell checker implementation with dictionary loading, word validation, Levenshtein-based suggestions, and grammatical variation detection |
lib/src/editor/block_component/rich_text/appflowy_rich_text.dart |
Integration of spell checking into rich text rendering with word tokenization, async checking, and visual underlines |
lib/src/editor/block_component/rich_text/spell_check_overlay.dart |
Hover-based overlay widget for displaying spell check suggestions and handling word replacements |
lib/src/editor/block_component/rich_text/spell_hover.dart |
Reusable hover widget for managing suggestion popups with mouse region handling |
lib/src/editor/editor_component/service/ime/delta_input_on_replace_impl.dart |
Desktop autocorrect integration that automatically applies top suggestions during text input |
test/spell_checker_test.dart |
Comprehensive test suite covering dictionary lookup, exclusion rules, suggestions, and grammatical variations |
pubspec.yaml |
Asset configuration to include the dictionary file |
assets/dictionary/words.txt |
10,000-word English dictionary for spell checking |
example/macos/Runner.xcodeproj/project.pbxproj |
macOS deployment target update from 10.14 to 10.15 |
example/macos/Podfile |
Podfile platform version update to match deployment target |
devtools_options.yaml |
New DevTools configuration file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This PR implements the feature described in issue #1165: a real-time spell checker in the AppFlowy Editor. It includes dictionary loading, word scanning & suggestion generation, visual underlines for misspelled words, hover suggestion menus, and word replacement functionality — all integrated in a performant, non-intrusive way.