Closed Bug 1182844 Opened 9 years ago Closed 8 years ago

Keyboard's word autocomplete does not insert space like Android and iOS do

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: cpeterson, Assigned: dietrich)

References

Details

(Keywords: dogfood, foxfood, Whiteboard: [bzlite][triagr] [foxfoodUX])

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Mobile; rv:42.0) Gecko/42.0 Firefox/42.0

When you select a word from the keyboard autocomplete:

* iOS will append a space after the inserted word. (This leaves an extra space at the end of a phrase, which is a little annoying but invisible.)
* Android doesn't append a space at first, but will if you continue typing. (This is the most "clever" solution, but might be a difficultmental model for users.)
* Firefox OS doesn't insert a space ever.
Keywords: foxfood
UX, any use-case for *not* doing this?

I think that users who are actively using suggestions will likely not see a big challenge in this change, even if we use the space-sometimes model.

Even the clumsiest implementation of this will still be correct *far* more often than not adding the space.

Also, our implementation should auto-remove the space if a sentence-ender is typed. Either iOS or Android or both (cannot remember offhand which) do that, and it's great.
Flags: needinfo?(firefoxos-ux-bugzilla)
Whiteboard: [bzlite] → [bzlite][triagr] [foxfoodUX]
Passing NI to Harly for comments on keyboard.

Thanks for pinging the UX team!
Flags: needinfo?(firefoxos-ux-bugzilla) → needinfo?(hhsu)
NI Tori, our UX designer for keyboard.
Flags: needinfo?(hhsu) → needinfo?(tchen)
Back to UX triage - no reply for 3 weeks.
Flags: needinfo?(firefoxos-ux-bugzilla)
Add the space!

Thanks for pinging the UX team!
Flags: needinfo?(tchen)
Flags: needinfo?(firefoxos-ux-bugzilla)
Tim, who is the right person to give some guidance on the right place to make this change?
Attachment #8651522 - Flags: feedback?(timdream)
Comment on attachment 8651522 [details] [review]
Link to Github pull-request: https://github.com/mozilla-b2g/gaia/pull/31483

Sold. Please add tests.
Attachment #8651522 - Flags: feedback?(timdream) → feedback+
Component: Gaia::Feedback → Gaia::Keyboard
BTW, what if the user intend to end the sentence (with a period) rather than typing another word? iOS employs some logic to automatically replace the inserted space to period in this case and I wonder if that's what we should implement altogether.

Anyway, UX should give their input on this.
(In reply to Tim Guan-tin Chien [:timdream] (slow response; please ni? to queue) from comment #10)
> BTW, what if the user intend to end the sentence (with a period) rather than
> typing another word? iOS employs some logic to automatically replace the
> inserted space to period in this case and I wonder if that's what we should
> implement altogether.

Here are more details on how iOS and Android handle autocomplete. Android's behavior is smarter than iOS, but its implementation has more corner cases. In the following examples, I use the '|' character to represent the cursor position (to make the space characters easier to see when present).

On iOS:

- "Goo" is autocompleted to "Good |"
- autocompleted "Good |" + 'm' = "Good m|"
- autocompleted "Good |" + ' ' = "Good |" (new space is ignored or overwrites appended space)
- autocompleted "Good |" + '.' = "Good.|" (period overwrites appended space)
- autocompleted "Good |" + '.' + 'm' = "Good.m|"

On Android:

- "Goo" is autocompleted to "Good|"
- autocompleted "Good|" + 'm' = "Good m|"
- autocompleted "Good|" + ' ' = "Good |"
- autocompleted "Good|" + '.' = "Good.|"
- autocompleted "Good|" + '.' + 'm' = "Good. M|"

On Firefox OS 2.5 today,

- "Goo" is autocompleted to "Good|"
- autocompleted "Good|" + 'm' = "Goodm|"
- autocompleted "Good|" + ' ' = "Good |"
- autocompleted "Good|" + '.' = "Good.|"
- autocompleted "Good|" + '.' + 'm' = "Good.m|"
Tim: See comment #2. In this bug I'm only going to fix the space - which will be a huge improvement. I'll file a separate bug for the more sophisticated handling. Also, we went over this bug in UX triage. They're a-ok with the basic adding of a space. We'll get a feedback on the new bug too.

Chris: THANKS for doing that research. I'll copy that over into the new bug for more sophisticated handling of this issue.

Filed bug 1197851.
Assignee: nobody → dietrich
This is in the code:

  // In the past we would automatically insert a space after the selected
  // word, but that, combined with the revert-on-backspace behavior made
  // it impossible to add a suffix to the selected word.

I'd choose space-after-select over revert-on-backspace in a heartbeat. However, some people clearly made that decision the other way at some point, so I'm going to try and find them to discuss the trade-offs.

Revert-on-backspace is only relevant when auto-correction is enabled. However, auto-correction is so wrong so often, that I cannot exist with it enabled.

One option could be to turn off space-after-select when auto-correction is disabled. This is a terrible option for a few reasons: auto-correction is on by default so users will never have spaces, and it's confusing since the user is unclear as to why sometimes the system puts spaces and sometimes doesn't, and finally the user is forced to make a false choice.

Another could be to revert-on-backspace and remove the extra space if the first thing the user does after an auto-correction is hit backspace. eg: the user types "MBA"* which is auto-corrected to "MBD " (true story), so user hits backspace and the "MBD " is replaced with "MBA ".

(* Arguably acronyms and proper nouns should never be auto-corrected, even when auto-correction is enabled. I haven't filed this bug yet.)
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: