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

Better steno errors handling #1501

Conversation

benoit-pierre
Copy link
Member

@benoit-pierre benoit-pierre commented Mar 12, 2022

Summary of changes

  • change normalize_stroke, normalize_steno, and steno_to_sort_key default to strict mode, and stop logging errors.

  • add an helper for dictionary implementations to log invalid steno errors on load: there is only one notification in case of errors (instead of potentially spamming the notification area), and the message includes the dictionary name and number of errors:

2022-03-12-014539_303x200_scrot

  • add an error icon to invalid steno entries in the editor to make them stand out:

2022-03-12-014234_464x379_scrot

Pull Request Checklist

  • Changes have tests
  • News fragment added in news.d. See documentation for details

`normalize_stroke`, `normalize_steno`, and `steno_to_sort_key` now
default to strict mode, and don't log errors anymore.
Only one helper for now: `StenoNormalizer`; to be used by dictionary
implementation to notify about invalid steno errors during load.  Instead
of (potentially) spamming the notification area with errors, only notify
once in case of errors, with the number of errors and dictionary name.
@benoit-pierre benoit-pierre force-pushed the better_steno_errors_handling branch from 2e32d5a to 901261e Compare March 19, 2022 15:30
@benoit-pierre
Copy link
Member Author

I changed the error into a warning, since it's not critical.

@benoit-pierre benoit-pierre merged commit b58eed2 into openstenoproject:master May 14, 2022
@benoit-pierre benoit-pierre deleted the better_steno_errors_handling branch May 14, 2022 22:31
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.

1 participant