Skip to content

Introduce the Spell checker for simplicity, extensibility and support for Android, iOS, macOS, and Windows #2246

Open
@EchoEllet

Description

@EchoEllet

We plan on introducing a breaking change for SpellCheckerService (from flutter_quill) and using the Flutter SpellCheckerService or extending it instead of having our own custom SpellCheckerService 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 as dispose, 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 a Future which is expected to be by the user. The service itself should not be responsible for customizing the UI. Take a look at TextField to see how it's done in Flutter (See SpellCheckConfiguration). The service will be activated in the QuillEditorConfiguration instead of having the SpellCheckerServiceProvider.

  • 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 Flutter DefaultServiceSpellChecker, needs custom implementation.
    Windows: Using ISpellChecker2 Win32 API. Not supported using Flutter DefaultServiceSpellChecker, 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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestminorMinimal impact or cosmetic issue. Can be resolved at a later time without affecting overall functionnoticeThis is a notice or information that may be important for users to be aware of.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions