Skip to content

Commit

Permalink
Merge pull request #3772 from SailingSteve/steveWebAppNov8
Browse files Browse the repository at this point in the history
More Cordova offset adjustments for iOS
  • Loading branch information
DaleMcGrew authored Nov 10, 2023
2 parents bf9d9d7 + dc8c864 commit d62f538
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"wdio:upgrade": "ncu -u *wdio* webdriver*",
"build": "node node/buildDateFile.js && MINIMIZED=1 webpack --mode production",
"buildCordova": "node node/buildDateFile.js && node node/buildSrcCordova && CORDOVA=1 && webpack --mode development && node node/logCompileDate.js",
"buildCordovaAndLinks": "node node/buildDateFile.js && node node/buildSrcCordova && CORDOVA=1 && webpack --mode development && node node/buildSymLinksRemote.js && node node/logCompileDate.js && bash ./node/unSymLinkIOS.sh",
"buildCordovaAndLinks": "node node/buildDateFile.js && node node/buildSrcCordova && CORDOVA=1 && webpack --mode development && node node/buildSymLinksRemote.js && bash ./node/unSymLinkIOS.sh && node node/logCompileDate.js",
"lint": "eslint --format stylish --ext .jsx --ext .js src/js",
"lintCordova": "eslint --format stylish --ext .jsx --ext .js srcCordova/js",
"prod": "node node/buildDateFile.js && MINIMIZED=1 webpack --mode production",
Expand Down
3 changes: 2 additions & 1 deletion src/js/common/components/Style/CampaignDetailsStyles.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from 'styled-components';
import { isAndroid, isAndroidSizeWide, isIPad, isIPadMini } from '../../utils/cordovaUtils';
import { isAndroid, isAndroidSizeWide, isIPad, isIPadMini, isIPhoneMiniOrSmaller } from '../../utils/cordovaUtils';
import { isCordova, isWebApp } from '../../utils/isCordovaOrWebApp';

export const CampaignDescription = styled('div')`
Expand Down Expand Up @@ -282,6 +282,7 @@ export const SupportButtonFooterWrapperAboveFooterButtons = styled('div')`
if (isWebApp()) return '55px';
if (isIPad() || isAndroidSizeWide()) return '0px';
if (isAndroid()) return '68px';
if (isIPhoneMiniOrSmaller()) return '54px';
return '88px';
}};
`;
Expand Down
2 changes: 1 addition & 1 deletion src/js/components/Settings/VoterPhoneVerificationEntry.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ class VoterPhoneVerificationEntry extends Component {
autoFocus={false}
className={classes.input}
error={displayIncorrectPhoneNumberError}
helperText={(displayIncorrectPhoneNumberError) ? 'Enter valid phone number' : ''}
helperText={(displayIncorrectPhoneNumberError) ? 'Enter a valid phone number' : ''}
id="enterVoterPhone"
InputProps={{
startAdornment: (
Expand Down
6 changes: 5 additions & 1 deletion src/js/utils/cordovaCalculatedOffsets.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,11 @@ export function headroomWrapperOffset (includePosition) {
const page = pageEnumeration();
if (page === 'candidatelist' || page === 'values') {
if (isIOS()) {
offset /= isIPad() ? 2 : 3;
if (page === 'values') {
offset /= 3 / 2;
} else {
offset /= isIPad() ? 2 : 3;
}
} else if (isAndroidSizeXL()) {
offset = 1;
} else {
Expand Down

0 comments on commit d62f538

Please sign in to comment.