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

feat(android): ActionBar menu text should not be all-caps by default #13166

Merged
merged 1 commit into from Nov 5, 2021

Conversation

jquick-axway
Copy link
Contributor

JIRA:
https://jira.appcelerator.org/browse/TIMOB-28575

Summary:

  • As of Titanium 10.0.0, default theme was changed to not use all-caps for button text. We should do the same for menu text for consistency.
  • Simplified theme to apply textAllCaps attribute globally for the theme instead of individual widget styles.

Test:

  1. Build and run the below on Android.
  2. Verify the action bar displays "Menu Item" in not all-caps.
  3. Verify button "My Button" is not all-caps.
  4. Tap on the action bar "..." overflow menu icon in the top-right corner.
  5. Verify "Drop-Down Menu Item" is not all-caps.
  6. Repeat steps 2-5 on Android 5.0. (This OS version ignores attribute "android:textAllCaps".)
function showAlertForEvent(e) {
	alert(`Clicked on: ${e.source.title}`);
}

const window = Ti.UI.createWindow();
window.activity.onCreateOptionsMenu = (e) => {
	const menuItem1 = e.menu.add({
		title: "Menu Item",
		showAsAction: Ti.Android.SHOW_AS_ACTION_IF_ROOM,
	});
	menuItem1.addEventListener("click", showAlertForEvent);
	const menuItem2 = e.menu.add({
		title: "Drop-Down Menu Item",
		showAsAction: Ti.Android.SHOW_AS_ACTION_NEVER,
	});
	menuItem2.addEventListener("click", showAlertForEvent);
};
const button = Ti.UI.createButton({ title: "My Button" });
button.addEventListener("click", showAlertForEvent);
window.add(button);
window.open();

@build
Copy link
Contributor

build commented Nov 5, 2021

Warnings
⚠️ Tests have failed, see below for more information.
Messages
📖 ✊ The commits in this PR match our conventions! Feel free to Rebase and Merge this PR when ready.
📖 ❌ 12 tests have failed There are 12 tests failing and 1157 skipped out of 20851 total tests.
📖

💾 Here's the generated SDK zipfile.

📖 👍 Hey!, You deleted more code than you added. That's awesome!

Tests:

ClassnameNameTimeError
android.emulator.5.0.Titanium.Network.HTTPClientsave response data to temp directory (5.0.2)60.001
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.5.0.Titanium.Network.HTTPClientlargeFileWithRedirect (5.0.2)60.004
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.5.0.Titanium.Network.HTTPClientdownloadLargeFile (5.0.2)60.044
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.main.Titanium.Geolocation.methods#forwardGeocoder() works via callback argument (12)5.02
Error: expected false to be true
at Assertion.fail (/node_modules/should/cjs/should.js:275:13)
      at Assertion.value (/node_modules/should/cjs/should.js:356:9)
      at Geolocation.<anonymous> (/ti.geolocation.test.js:585:32)
android.emulator.main.Titanium.Network.HTTPClientsave response data to temp directory (12)60.004
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.main.Titanium.Network.HTTPClientlargeFileWithRedirect (12)59.999
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
android.emulator.main.Titanium.Network.HTTPClientdownloadLargeFile (12)60.002
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.ipad.Titanium.Network.HTTPClientlargeFileWithRedirect (15.0.0)60.001
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.ipad.Titanium.Network.HTTPClientdownloadLargeFile (15.0.0)60
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.iphone.Titanium.Network.HTTPClientlargeFileWithRedirect (15.0.0)60
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.iphone.Titanium.Network.HTTPClientdownloadLargeFile (15.0.0)60
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)
ios.macos.Titanium.Network.HTTPClientdownloadLargeFile (11.4.0)60.028
Error: Timeout of 60000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (app.js)

Generated by 🚫 dangerJS against 9463d9b

@garymathews garymathews merged commit da00331 into tidev:master Nov 5, 2021
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

3 participants