Introduce the Spell checker for simplicity, extensibility and support for Android, iOS, macOS, and Windows #2246
Labels
enhancement
New feature or request
minor
Minimal impact or cosmetic issue. Can be resolved at a later time without affecting overall function
notice
This is a notice or information that may be important for users to be aware of.
We plan on introducing a breaking change for
SpellCheckerService
(fromflutter_quill
) and using the FlutterSpellCheckerService
or extending it instead of having our own customSpellCheckerService
which we discovered that it has some issues:Extensibility: The interface should be more generic and less specific to client-side spell-checking service, it should be focused as a source of checking the spelling itself and not specific to Flutter
TextSpan
or having some methods such asdispose
,setNewLanguageState
,updateCustomLanguageIfExist
,addCustomLanguage
, those methods seem to be helpers for managing a client-side service that is on the app itself, the user may want to use a web API that provides this service (e.g., Grammarly API) or use method channel, it's also not aFuture
which is expected to be by the user. The service itself should not be responsible for customizing the UI. Take a look atTextField
to see how it's done in Flutter (See SpellCheckConfiguration). The service will be activated in theQuillEditorConfiguration
instead of having theSpellCheckerServiceProvider
.Bundle size: We have introduced a package that has supports for too many languages all at once, we initially wanted to separate each language into its package but this would complicate the process and require more effort when using the package since the user needs the core package and a package for each language which is a common solution is used by VS Code and JetBrains IDEs, in general even when using one language (English) it still increase the bundle size quite significantly, which require us to make this feature completely optional, having our own package that integrates with
flutter_quill
, the project is currently in the process of changes more frequently than before and there are priorities, we need to fix existing issues before introducing something that leads to more issue reports. Usually, this is a bigger issue on the web.Web Support: Currently experiencing issues on some platforms, so we probably want to make it experimental. See (Failed assertion: line 1394 pos 12: 'container.containsOffset(position.offset)' after link editing #2196)
Not using the native API as default: This will be fixed with platform-specific API using
quill_native_bridge
(or at least attempt to). We do plan on supporting it on:Android: Using
android.view.textservice.TextServicesManager
iOS: Using
UITextChecker
macOS: Using
NSSpellChecker
. Not supported using FlutterDefaultServiceSpellChecker
, needs custom implementation.Windows: Using
ISpellChecker2
Win32 API. Not supported using FlutterDefaultServiceSpellChecker
, needs custom implementation.Not that we currently already have plans to work on other areas of the project so it will take a bit longer before we move to fix this issue, creating this issue since we're having discussions from different threads (#2164, #2142, #2230).
The text was updated successfully, but these errors were encountered: