feat(study-screen): nosuggest:type field filter#21097
Open
david-allison wants to merge 2 commits into
Open
Conversation
Contributor
|
Snapshot diff report vs
All 1 changed screenshotsPreferencesScreenshotTest
|
Assisted-by: Claude Opus 4.7
This removes suggestions from the IME, so a language learner can learn
an orthography without hints. It also removes the 'swipe' operation on
the keyboard without showing the incognito icon.
This input mode (TYPE_NULL) will not be for all users: it makes Mandarin
Chinese keyboards output in QWERTY only mode, and likely will disable
voice input.
It is to be treated as an advanced feature, and is currently a hidden
feature, planned to be exposed by the FieldFilter class.
`nosuggest` needs to come before `type` in the field filter list: `type`
is processed by the backend, and AnkiDroid processes the remaining
'custom' filters
so: `{{nosuggest:type:Field}}` becomes [[type:nosuggest:Field]] which is
exposed by TypeAnswer, and implemented by the study screen
----
The following were considered:
TYPE_TEXT_FLAG_AUTO_COMPLETE = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_VARIATION_FILTER = true
IME_FLAG_NO_PERSONALIZED_LEARNING = true
The above are not sufficient for GBoard - incognito shows, and the strip
showing suggested words is still visible
`TYPE_TEXT_VARIATION_VISIBLE_PASSWORD` removed suggestions, but with an
in-IME hint to open the password manager and a monospaced font on the
field
Fixes 10352
https://developer.android.com/reference/android/text/InputType#TYPE_NULL
Assisted-by: Claude Opus 4.7 - the code and a lot of bad research
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
Assisted-by: Claude Opus 4.7 - the code and a lot of bad research
Purpose / Description
This removes suggestions from the IME, so a language learner can learn an orthography without hints. It also removes the 'swipe' operation on the keyboard without showing the incognito icon.
This input mode will not be for all users: it makes Mandarin Chinese keyboards output in QWERTY only mode, and likely will disable voice input.
It is to be treated as an advanced feature, and is currently a hidden feature, planned to be exposed by the FieldFilter class.
nosuggestneeds to come beforetypein the field filter list:typeis processed by the backend, and AnkiDroid processes the remaining 'custom' filtersUsage:
{{nosuggest:type:Field}}Fixes
Approach
{{nosuggest:type:Field}}field filter[[type:nosuggest:Field]]on the cardInputType.TYPE_NULLto hude suggestionsHow Has This Been Tested?
S21 5G: GBoard and Samsung Keyboard
Learning (optional, can help others)
The following were considered:
TYPE_TEXT_FLAG_AUTO_COMPLETE = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_FLAG_AUTO_CORRECT = false
TYPE_TEXT_VARIATION_FILTER = true
IME_FLAG_NO_PERSONALIZED_LEARNING = true
The above are not sufficient for GBoard - incognito shows, and the strip showing suggested words is still visible
TYPE_TEXT_VARIATION_VISIBLE_PASSWORDremoved suggestions, but with an in-IME hint to open the password manager and a monospaced font on the fieldChecklist