diff --git a/src/App.jsx b/src/App.jsx
index 415e05908..bdada897b 100644
--- a/src/App.jsx
+++ b/src/App.jsx
@@ -180,6 +180,7 @@ class App extends Component {
if (isAndroid()) { // December 12, 2023: All sorts of problems with sign-in with Facebook on Android, so disabling it here
webAppConfig.ENABLE_FACEBOOK = false; // This overrides the config setting for the entire Android app
}
+
if (webAppConfig.ENABLE_FACEBOOK) {
setTimeout(() => {
// Suspect that this isn't correct anymore: "We need to start this initialization early since there is a delay getting the FB object in place"
@@ -187,6 +188,10 @@ class App extends Component {
}, 2000);
}
+ if (!webAppConfig.ENABLE_TWITTER) {
+ webAppConfig.ENABLE_TWITTER = false; // Avoid crashes in Feb/March 2024 in case not in config.js
+ }
+
if (isCordova()) {
const size = isIOS() ? getIOSSizeString() : getAndroidSize();
console.log('Cordova: device model', window.device.model, ' size: ', size);
diff --git a/src/js/common/components/SignIn/SignInOptionsPanel.jsx b/src/js/common/components/SignIn/SignInOptionsPanel.jsx
index 89e3c108d..654915c04 100755
--- a/src/js/common/components/SignIn/SignInOptionsPanel.jsx
+++ b/src/js/common/components/SignIn/SignInOptionsPanel.jsx
@@ -44,8 +44,8 @@ export default class SignInOptionsPanel extends Component {
hideAppleSignInButton: false,
hideCurrentlySignedInHeader: false,
hideDialogForCordova: false,
- hideFacebookSignInButton: false,
- hideTwitterSignInButton: false,
+ hideFacebookSignInButton: !webAppConfig.ENABLE_FACEBOOK,
+ hideTwitterSignInButton: !webAppConfig.ENABLE_TWITTER,
hideVoterEmailAddressEntry: false,
hideVoterPhoneEntry: false,
isInternetExplorer: document.documentMode || false, // Yes, we are talking about that old Microsoft product
@@ -287,7 +287,7 @@ export default class SignInOptionsPanel extends Component {
this.setState({
hideAppleSignInButton: isInternetExplorer || isAndroid(),
hideFacebookSignInButton: !webAppConfig.ENABLE_FACEBOOK, // December 12, 2023: All sorts of problems with sign-in with Facebook on Android
- hideTwitterSignInButton: false,
+ hideTwitterSignInButton: !webAppConfig.ENABLE_TWITTER, // Feb 2024 problems with twitter in all apps and cordova, but ok on api server
hideVoterEmailAddressEntry: false,
hideVoterPhoneEntry: false,
});
@@ -422,10 +422,10 @@ export default class SignInOptionsPanel extends Component {
let yourAccountTitle = 'Security & Sign In';
let yourAccountExplanation = '';
if (voterIsSignedIn) {
- if (voterIsSignedInFacebook && !voterIsSignedInTwitter && (isOnWeVoteRootUrl || isOnWeVotePartnerSubdomainUrl)) {
+ if (webAppConfig.ENABLE_TWITTER && voterIsSignedInFacebook && !voterIsSignedInTwitter && (isOnWeVoteRootUrl || isOnWeVotePartnerSubdomainUrl)) {
yourAccountTitle = 'Have Twitter Too?';
yourAccountExplanation = 'By adding your Twitter account to your WeVote profile, you get access to the voter guides of everyone you follow.';
- } else if (voterIsSignedInTwitter && !voterIsSignedInFacebook && isOnFacebookSupportedDomainUrl) {
+ } else if (webAppConfig.ENABLE_FACEBOOK && voterIsSignedInTwitter && !voterIsSignedInFacebook && isOnFacebookSupportedDomainUrl) {
yourAccountTitle = 'Have Facebook Too?';
yourAccountExplanation = 'By adding Facebook to your WeVote profile, it is easier for friends to find you.';
}
diff --git a/src/js/common/utils/cordovaUtils.js b/src/js/common/utils/cordovaUtils.js
index 1e180b4c7..61ddb6bc9 100644
--- a/src/js/common/utils/cordovaUtils.js
+++ b/src/js/common/utils/cordovaUtils.js
@@ -448,12 +448,12 @@ export function getAndroidSize () {
androidSizeString = 'default';
const { visualViewport: { height, width, scale } } = window;
const diameter = Math.sqrt(((width * scale) ** 2) + ((height * scale) ** 2));
- console.log('CALCULATED screen diameter: ', diameter);
+ // console.log('CALCULATED screen diameter: ', diameter);
androidPixels = width * height;
- const ua = navigator.userAgent;
- console.log('Phone user agent: ', ua);
+ // const ua = navigator.userAgent;
+ // console.log('Phone user agent: ', ua);
if (isAndroidTablet()) {
androidSizeString = '--wide';
diff --git a/src/js/common/utils/isCordovaOrWebApp.js b/src/js/common/utils/isCordovaOrWebApp.js
index 5b1158d6b..fd7c987c6 100644
--- a/src/js/common/utils/isCordovaOrWebApp.js
+++ b/src/js/common/utils/isCordovaOrWebApp.js
@@ -19,7 +19,7 @@ export function isAndroidTablet () {
const ua = navigator.userAgent;
const diameter = Math.sqrt(((width * scale) ** 2) + ((height * scale) ** 2));
const aspectRatio = height / width;
- console.log('Phone user agent: ', ua);
+ // console.log('Phone user agent: ', ua);
return (aspectRatio < 1 ||
(width === 1848 && height === 2960 && diameter === 14.54) || // Galaxy Tab S9 Ultra (2023)
diff --git a/src/js/components/Search/BaseSearchbox.jsx b/src/js/components/Search/BaseSearchbox.jsx
index 2dce814fa..a6d8a385c 100644
--- a/src/js/components/Search/BaseSearchbox.jsx
+++ b/src/js/components/Search/BaseSearchbox.jsx
@@ -1,9 +1,9 @@
-import React from 'react';
import PropTypes from 'prop-types';
+import React from 'react';
import styled from 'styled-components';
-import colors from '../../common/components/Style/Colors';
-import searchIcon from '../../../img/global/icons/search.svg';
import closeIcon from '../../../img/global/icons/cross.svg';
+import searchIcon from '../../../img/global/icons/search.svg';
+import colors from '../../common/components/Style/Colors';
const SearchWrapper = styled.div`
position: relative;
@@ -16,7 +16,7 @@ const SearchIcon = styled.div`
top: 50%;
right: 10px;
transform: translateY(-50%);
- color: gray;
+ color: gray;
background-image: url(${searchIcon});
background-repeat: no-repeat;
background-position: center;
@@ -54,9 +54,7 @@ const SearchInput = styled.input`
border-radius: 0.25rem;
padding-right: 40px;
padding-left: 12px;
- border-radius: 0.25rem;
- padding-right: 40px;
-
+
&:focus-visible {
border: none;
@@ -101,7 +99,7 @@ class BaseSearchbox extends React.Component {
placeholder={this.props.placeholder}
value={this.state.searchText}
onChange={this.handleInputChange}
- onClear={this.handleClear}
+ // onClear={this.handleClear} // 2/26/23 temporarily removed, there is no onClear for an HTML input, but using a listener action is possible
maxLength={50}
/>
{this.state.searchText &&