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

[TIMOB-24808] Implement autofill hints for TextField and TextArea #9368

Merged
merged 8 commits into from Nov 17, 2017

Conversation

garymathews
Copy link
Contributor

@garymathews garymathews commented Aug 29, 2017

  • Implement Titanium.UI.TextField and Titanium.UI.TextArea autofillType for iOS and Android
TEST CASE
var win = Ti.UI.createWindow({backgroundColor: 'gray', layout: 'vertical'}),
	usr = Ti.UI.createTextField({
		width: Ti.UI.FILL,
		hintText: 'USERNAME',
		autofillType: Titanium.UI.AUTOFILL_TYPE_USERNAME
	}),
	pwd = Ti.UI.createTextField({
		width: Ti.UI.FILL,
		hintText:'PASSWORD',
		autofillType: Titanium.UI.AUTOFILL_TYPE_PASSWORD
	});

win.add(usr);
win.add(pwd);

win.open();

JIRA Ticket

@hansemannn hansemannn self-requested a review September 14, 2017 08:37
Copy link
Collaborator

@hansemannn hansemannn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

iOS approved! Will wait for #9429 to be merged before, otherwise IS_XCODE_9 will not be available for testing it. Please also do a backport of the latest changes, I've commited one more change.

@garymathews
Copy link
Contributor Author

@hansemannn #9429 has now been merged, are we back porting to 6.3.0 ?

@hansemannn
Copy link
Collaborator

@garymathews Agreed, we are good to go.

@lokeshchdhry
Copy link
Contributor

lokeshchdhry commented Oct 13, 2017

FR Passed for Android.

After app launch autofill prompts to select the google account to use for autofill for the app & autofills the fields.
The properties & methods seems to work as expected.

Studio Ver: 4.10.0.201709271713
SDK Ver: 7.0.0 local build
OS Ver: 10.12.3
Xcode Ver: Xcode 8.3.3
Appc NPM: 4.2.10-2
Appc CLI: 6.3.0-master.14
Ti CLI Ver: 5.0.14
Alloy Ver: 1.10.5
Node Ver: 7.10.1
Java Ver: 1.8.0_101
Devices: Android 8.0

@garymathews
Copy link
Contributor Author

Humm.. ios_format isn't happy:

Fatal error: Error: Formatting incorrect on "iphone/Classes/TiUITextWidget.m"

@garymathews garymathews force-pushed the TIMOB-24808 branch 3 times, most recently from 39c1e7d to 055a52d Compare October 16, 2017 21:33
@jquick-axway
Copy link
Contributor

jquick-axway commented Nov 6, 2017

@lokeshchdhry, can you also test this with an Android 4.x device please? On Android, this feature is only supported on Android 8 and higher, so, this is to verify that this feature no-ops and we properly guard against its usage on older OS versions. Thanks.
(The code looks okay, but this is to double check just in case.)

Copy link
Contributor

@jquick-axway jquick-axway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CR: Pass for Android

@build
Copy link
Contributor

build commented Nov 17, 2017

Fails
🚫

🔬 There are library changes, but no changes to the unit tests. That's OK as long as you're refactoring existing code, but will require an admin to merge this PR. Please see README.md#unit-tests for docs on unit testing.

Generated by 🚫 dangerJS

@hansemannn
Copy link
Collaborator

@garymathews This ticket should be a good candidate for unit-tests to validate the autofillType accessors as well as all constants. Can you do that? Otherwise I'll try to do it over the weekend.

@eric34 eric34 merged commit 4f8e51c into tidev:master Nov 17, 2017
@AppWerft
Copy link

I have added this in app.js on a real device (Pie), build with 8.0.0. In system configuration I have selected Google as autofill service:

const $ = Ti.UI.createWindow();
$.add(Ti.UI.createTextField({
	height:50,
	top:50,
	width:'90%',
	hintText: 'USERNAME',
	autofillType: Ti.UI.AUTOFILL_TYPE_USERNAME
}));
$.open();

Nothing happens. Whats going wrong?

Additional:
Following this instruction: https://developer.android.com/reference/android/view/autofill/AutofillManager.html#notifyViewEntered(android.view.View)
I cannot find notifyViewEntered or requestAutofill in the entire repo (grep -r requestAutofill *)
Where I can find the binding to autofill service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants