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

Fix #520 Red underline upon sentence completion #679

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

icburns
Copy link

@icburns icburns commented Aug 19, 2022

Addresses #520

This PR addresses spellcheck highlighting at the ends of sentences when a valid word is followed by a period, and alters the existing special handling around words that contain periods.

~

Issue:

Valid words were being erroneously flagged by the spellchecker when followed by a period.

OpenBoard1_4_5
Reproduction on OpenBoard 1.4.5

~

Resolution:

Valid words followed by periods are no longer flagged. Invalid words followed by periods are still flagged, and the intent behind the existing logic to flag and suggest valid words on either side of a period within a token should not be impacted by this change (see below).

AfterChanges
Testing on Pixel 5 Android 13

AfterChangesShowSuggestions
Valid words on either side of an interceding period are suggested with a space as separator

~

Additional Considerations for CHECKABILITY_CONTAINS_PERIOD:

  • Empty words are considered invalid. In CHECKABILITY_CONTAINS_PERIOD, when a period was the first or last index of text, splitting that text on periods caused suggestions to consider potentially valid words to be invalid. For example, "this.example." should suggest "this example" or "this example.", but no suggestions were being given due to the trailing empty string resulting from the split operation being considered invalid. This PR modifies this behavior such that empty split tokens will not be considered toward word validity when generating suggestions for text containing periods.

  • Single word sentences (like "Groovy.") were being flagged as invalid since the word only exists in the main dictionary as lower case, but the validity check within CHECKABILITY_CONTAINS_PERIOD sent text over as is. This PR adds, specific to the period checkability logic, a fallback validity check for words set to lower case.

…nt for period only present in the last index (valid end of sentence).
@mintsoft
Copy link

mintsoft commented Oct 6, 2022

Yes! The old behaviour of this drives me insane

@Switch123456789
Copy link

What's up with this PR? Why isn't it merged yet? I am dealing with this issue for almost a year now (it's the stock keyboard of iodeOS) and it is just SOOO unbearable. I have no choice but to abandon OpenBoard now, which is a shame considering all the work you put in and how awesome the keyboard COULD be without this bug.

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.

None yet

3 participants