Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Enhancement] Editor: Control over text-prediction #3555

Closed
samhouts opened this issue Aug 13, 2018 · 6 comments
Closed

[Enhancement] Editor: Control over text-prediction #3555

samhouts opened this issue Aug 13, 2018 · 6 comments
Labels
help wanted We welcome community contributions to any issue, but these might be a good place to start! t/enhancement ➕ up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects

Comments

@samhouts
Copy link
Member

Rationale

#1677 for Editor

Editors do not currently allow users to disable text prediction/autocomplete/autosuggest without a custom renderer or effect.

Implementation

Add bindable property to Editor:

public static readonly BindableProperty IsTextPredictionEnabledProperty = BindableProperty.Create("IsTextPredictionEnabled", typeof(bool), typeof(Editor), true);

Renderers will need to be updated accordingly.

Expected Result

Android

  • IsTextPredictionEnabled == true: Default. Text prediction is enabled.
  • IsTextPredictionEnabled == false: Text prediction is disabled.

iOS

  • IsTextPredictionEnabled == true: Default. Text prediction is enabled. Note: may also disable autocorrect.
  • IsTextPredictionEnabled == false: Text prediction is disabled.

UWP

  • IsTextPredictionEnabled == true: Default. Text prediction is enabled.
  • IsTextPredictionEnabled == false: Text prediction is disabled.

Implications for CSS

None

Backward Compatibility

Since we are adding new properties, there should be no compatibility problems as long as:

  1. We ensure that an Editor's text prediction defaults to enabled, as is the expected behavior now,
  2. We ensure that any Effects or Custom Renderers that may have been created to produce this behavior take precedence over any values that we set, to the best of our ability.

Third party renderers will need to be updated to ensure that this functionality is officially supported.

Difficulty : Easy-Medium

This is an easy-medium change and great for a first-time contributor. Biggest challenge will be ensuring that disabling text prediction does not also disable other features of the Editor view on all platforms.

@samhouts samhouts added t/enhancement ➕ help wanted We welcome community contributions to any issue, but these might be a good place to start! labels Aug 13, 2018
@pauldipietro pauldipietro added this to New in Triage Aug 13, 2018
@samhouts samhouts removed this from New in Triage Aug 13, 2018
@samhouts samhouts added the up-for-grabs We welcome community contributions to any issue, but these might be a good place to start! label Oct 5, 2018
@noamyogev84
Copy link
Contributor

Hi @samhouts I'd like to tackle this one.
Any suggestions/code pointers? I'll start by reviewing #1677

@samhouts
Copy link
Member Author

samhouts commented Oct 5, 2018

@noamyogev84 Great! I know that we had conflicts with the SpellCheckEnabled property for Entry, but otherwise, this should be pretty straightforward. Good luck, and let us know if we can help! Thank you!

@noamyogev84
Copy link
Contributor

Hi @samhouts.
Please let me know if anything's missing. I've tested the new behavior both with the UWP Gallery Project, and with Android Emulator. seems OK.

I'll be happy to do any modifications if needed.

@samhouts samhouts added this to In Progress in v3.6.0 Oct 8, 2018
@suhailsinghbains
Copy link

Hi, can I please fix this issue as my Hackocterfest PR?

@jcmanke
Copy link
Contributor

jcmanke commented Oct 24, 2018

Wouldn't it be better to add this property to Entry and Editor's base class InputView than to have it duplicated?

@suhailsinghbains
Copy link

suhailsinghbains commented Oct 25, 2018

I'll wait for you guys are sure what specific changes I have to do :)

@PureWeen PureWeen added this to Done in Enhancements via automation Nov 1, 2018
PureWeen pushed a commit that referenced this issue Nov 1, 2018
* Add Editor.IsTextPredictionEnabled property

* simplfy UpdateInputType logic

* modify IsTextPredictionEnabledProperty BindingMode to Default

* undo changes of commit 5db2456

* [UITests] update namespace for UI Tests

- Fixes #3555
@PureWeen PureWeen moved this from In Progress to Done in v3.6.0 Nov 1, 2018
@PureWeen PureWeen removed this from Done in Enhancements Nov 1, 2018
@samhouts samhouts removed this from Done in v3.6.0 Jan 3, 2019
@samhouts samhouts added this to In Progress in v3.5.0 Jan 11, 2019
@samhouts samhouts moved this from In Progress to Done in v3.5.0 Jan 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted We welcome community contributions to any issue, but these might be a good place to start! t/enhancement ➕ up-for-grabs We welcome community contributions to any issue, but these might be a good place to start!
Projects
No open projects
v3.5.0
  
Done
Development

No branches or pull requests

4 participants