Skip to content

Chore: improve Spell checker API to the example #2133

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

Merged
merged 4 commits into from
Aug 21, 2024

Conversation

CatHood0
Copy link
Collaborator

@CatHood0 CatHood0 commented Aug 21, 2024

Description

It's already known that we have a simple API to be able to use our spell checker in the editor, but nevertheless, if we looked closely at how it was working, it was becoming quite cumbersome to activate and deactivate it due to everything that was involved. For this reason, it was updated to the latest version of simple_spell_checker in order to be able to use new methods like toggleChecker() (called into the provider as toggleState()) that just deactivates the service without having to close or replace it (something that we did before since there was no real way to deactivate it without changing the service), and isServiceActive() so that the developer can always get the status of the service.

This not only makes the API simpler for other developers but also improved performance since we don't have to change the instance of the service every time we deactivate or activate it.

Not related

It was updated to the latest version because if we had the service active there were commonly used characters that were lost or ignored or even checked as if they were a word (for example, in the previous version the character ":" was taken as a word)

  • 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.

@CatHood0 CatHood0 marked this pull request as draft August 21, 2024 12:21
@CatHood0 CatHood0 marked this pull request as ready for review August 21, 2024 12:32
@singerdmx singerdmx merged commit 82308da into singerdmx:master Aug 21, 2024
2 checks passed
@CatHood0 CatHood0 deleted the improve_example_parts branch August 21, 2024 17:19
@EchoEllet
Copy link
Collaborator

Unrelated but while testing in my current branch, I'm always having this exception:

The following assertion was thrown building TextLine(dependencies: [MediaQuery, _LocalizationsScope-[GlobalKey#d9bd8], _QuillPressedKeysAccess], state: _TextLineState#09a95):
You cannot reuse this SimpleSpellchecker since you dispose it before
'package:simple_spell_checker/src/spell_checker_interface/abtract_checker.dart':
Failed assertion: line 256 pos 12: '!_disposed'

Sometimes the spell-checking is already disabled.

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.

3 participants