Skip to content

Commit

Permalink
Merge branch 'main' into @chrispader/use-platform-stack-navigation-in…
Browse files Browse the repository at this point in the history
…-app
  • Loading branch information
kirillzyusko committed Nov 28, 2024
2 parents b94528e + 43640b1 commit fe01894
Show file tree
Hide file tree
Showing 32 changed files with 143 additions and 86 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
multiDexEnabled rootProject.ext.multiDexEnabled
versionCode 1009006707
versionName "9.0.67-7"
versionCode 1009006708
versionName "9.0.67-8"
// Supported language variants must be declared here to avoid from being removed during the compilation.
// This also helps us to not include unnecessary language variants in the APK.
resConfigs "en", "es"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,24 @@ Yes, you can edit an expense until it is paid. When an expense is submitted, the
In Expensify, expense reports group expenses in a batch to be paid or reconciled. When a draft report is open, all new expenses are added to it.

Once a report is submitted, you can track the status from the **Search** section. Click the **View** button for a specific expense or expense report. The status is displayed at the top of the expense or report.

**How can I enable camera permission for a website on mobile browsers?**

**Google Chrome:**
1. Open Chrome.
2. To the right of the address bar, tap More icon > **Settings**.
3. Tap **Site settings** > **Camera**.
4. Tap to turn the microphone or camera on or off.
- If you find the site you want to use under **Blocked**, tap the site > **Allow**.
5. Refresh the site.

**Safari:**
1. Open Safari.
2. To the left of the address bar, tap More icon > **Site settings** > **Camera**.
3. Tap **Allow** to grant permission.
4. Tap **Done**.
5. Refresh the site.

{% include faq-end.md %}

</div>
2 changes: 1 addition & 1 deletion ios/NewExpensify/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>9.0.67.7</string>
<string>9.0.67.8</string>
<key>FullStory</key>
<dict>
<key>OrgId</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/NewExpensifyTests/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>9.0.67.7</string>
<string>9.0.67.8</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion ios/NotificationServiceExtension/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<key>CFBundleShortVersionString</key>
<string>9.0.67</string>
<key>CFBundleVersion</key>
<string>9.0.67.7</string>
<string>9.0.67.8</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionPointIdentifier</key>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "new.expensify",
"version": "9.0.67-7",
"version": "9.0.67-8",
"author": "Expensify, Inc.",
"homepage": "https://new.expensify.com",
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",
Expand Down
2 changes: 2 additions & 0 deletions src/CONST.ts
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,8 @@ const CONST = {
NEWHELP_URL: 'https://help.expensify.com',
INTERNAL_DEV_EXPENSIFY_URL: 'https://www.expensify.com.dev',
STAGING_EXPENSIFY_URL: 'https://staging.expensify.com',
DENIED_CAMERA_ACCESS_INSTRUCTIONS_URL:
'https://help.expensify.com/articles/new-expensify/expenses-&-payments/Create-an-expense#:~:text=How%20can%20I%20enable%20camera%20permission%20on%20mobile%20browser%3F',
BANK_ACCOUNT_PERSONAL_DOCUMENTATION_INFO_URL:
'https://community.expensify.com/discussion/6983/faq-why-do-i-need-to-provide-personal-documentation-when-setting-up-updating-my-bank-account',
PERSONAL_DATA_PROTECTION_INFO_URL: 'https://community.expensify.com/discussion/5677/deep-dive-security-how-expensify-protects-your-information',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function AttachmentViewVideo({source, isHovered = false, shouldUseSharedVideoEle
shouldUseSharedVideoElement={shouldUseSharedVideoElement && !shouldUseNarrowLayout}
isVideoHovered={isHovered}
videoDuration={duration}
style={[styles.w100, styles.h100]}
style={[styles.w100, styles.h100, styles.pb5]}
/>
);
}
Expand Down
43 changes: 0 additions & 43 deletions src/components/SafeAreaConsumer/index.android.tsx

This file was deleted.

8 changes: 5 additions & 3 deletions src/components/SafeAreaConsumer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@ function SafeAreaConsumer({children}: SafeAreaConsumerProps) {

return (
<SafeAreaInsetsContext.Consumer>
{(insets) => {
const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets ?? undefined);
{(safeAreaInsets) => {
const insets = StyleUtils.getSafeAreaInsets(safeAreaInsets);
const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets);

return children({
paddingTop,
paddingBottom,
insets: insets ?? undefined,
insets,
safeAreaPaddingBottomStyle: {paddingBottom},
});
}}
Expand Down
3 changes: 2 additions & 1 deletion src/components/SelectionList/BaseSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ function BaseSelectionList<TItem extends ListItem>(
alternateTextNumberOfLines = 2,
textInputRef,
headerMessageStyle,
confirmButtonStyles,
shouldHideListOnInitialRender = true,
textInputIconLeft,
sectionTitleStyles,
Expand Down Expand Up @@ -835,7 +836,7 @@ function BaseSelectionList<TItem extends ListItem>(
<Button
success={!shouldUseDefaultTheme}
large
style={[styles.w100]}
style={[styles.w100, confirmButtonStyles]}
text={confirmButtonText || translate('common.confirm')}
onPress={onConfirm}
pressOnEnter
Expand Down
3 changes: 3 additions & 0 deletions src/components/SelectionList/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,9 @@ type BaseSelectionListProps<TItem extends ListItem> = Partial<ChildrenProps> & {
/** Styles to apply to the header message */
headerMessageStyle?: StyleProp<ViewStyle>;

/** Styles to apply to submit button */
confirmButtonStyles?: StyleProp<ViewStyle>;

/** Text to display on the confirm button */
confirmButtonText?: string;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
import type {EdgeInsets} from 'react-native-safe-area-context';
// eslint-disable-next-line no-restricted-imports
import {useSafeAreaInsets as useSafeAreaInsetsInternal} from 'react-native-safe-area-context';
import StatusBar from '@libs/StatusBar';
import useStyleUtils from './useStyleUtils';

function useSafeAreaInsets(): EdgeInsets {
const StyleUtils = useStyleUtils();
const insets = useSafeAreaInsetsInternal();
const adjustedInsets = StyleUtils.getSafeAreaInsets(insets);

return {
...insets,
top: StatusBar.currentHeight ?? insets.top,
};
return adjustedInsets;
}

export default useSafeAreaInsets;
4 changes: 0 additions & 4 deletions src/hooks/useSafeAreaInsets/index.ts

This file was deleted.

9 changes: 4 additions & 5 deletions src/hooks/useStyledSafeAreaInsets.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// eslint-disable-next-line no-restricted-imports
import {useSafeAreaInsets} from 'react-native-safe-area-context';
import useSafeAreaInsets from './useSafeAreaInsets';
import useStyleUtils from './useStyleUtils';

/**
Expand All @@ -21,15 +20,15 @@ import useStyleUtils from './useStyleUtils';
* // Use these values to style your component accordingly
* }
*/
function useStyledSafeAreaInsets() {
function useStyledSafeAreaInsets(safeAreaInsetsPercentage?: number) {
const StyleUtils = useStyleUtils();
const insets = useSafeAreaInsets();

const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets ?? undefined);
const {paddingTop, paddingBottom} = StyleUtils.getSafeAreaPadding(insets, safeAreaInsetsPercentage);
return {
paddingTop,
paddingBottom,
insets: insets ?? undefined,
insets,
safeAreaPaddingBottomStyle: {paddingBottom},
};
}
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,8 @@ const translations = {
chooseReceipt: 'Choose a receipt to upload or forward a receipt to ',
takePhoto: 'Take a photo',
cameraAccess: 'Camera access is required to take pictures of receipts.',
deniedCameraAccess: "Camera access still hasn't been granted, please follow ",
deniedCameraAccessInstructions: 'these instructions',
cameraErrorTitle: 'Camera error',
cameraErrorMessage: 'An error occurred while taking a photo. Please try again.',
locationAccessTitle: 'Allow location access',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,8 @@ const translations = {
chooseReceipt: 'Elige un recibo para subir o reenvía un recibo a ',
takePhoto: 'Haz una foto',
cameraAccess: 'Se requiere acceso a la cámara para hacer fotos de los recibos.',
deniedCameraAccess: 'No se ha concedido el acceso a la cámara, siga ',
deniedCameraAccessInstructions: 'estas instrucciones',
cameraErrorTitle: 'Error en la cámara',
locationAccessTitle: 'Permitir acceso a la ubicación',
locationAccessMessage: 'El acceso a la ubicación nos ayuda a mantener tu zona horaria y moneda precisas dondequiera que vayas.',
Expand Down
5 changes: 4 additions & 1 deletion src/pages/NewChatConfirmPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ function NewChatConfirmPage({newGroupDraft, allPersonalDetails}: NewChatConfirmP
}, []);

return (
<ScreenWrapper testID={NewChatConfirmPage.displayName}>
<ScreenWrapper
testID={NewChatConfirmPage.displayName}
includeSafeAreaPaddingBottom={false}
>
<HeaderWithBackButton
title={translate('common.group')}
onBackButtonPress={navigateBack}
Expand Down
22 changes: 18 additions & 4 deletions src/pages/NewChatPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function NewChatPage() {
const {isSmallScreenWidth} = useResponsiveLayout();
const styles = useThemeStyles();
const personalData = useCurrentUserPersonalDetails();
const {insets} = useStyledSafeAreaInsets();
const {insets, safeAreaPaddingBottomStyle} = useStyledSafeAreaInsets();
const [isSearchingForReports] = useOnyx(ONYXKEYS.IS_SEARCHING_FOR_REPORTS, {initWithStoredValues: false});
const selectionListRef = useRef<SelectionListHandle>(null);

Expand Down Expand Up @@ -252,14 +252,27 @@ function NewChatPage() {
return (
<Button
onPress={() => toggleOption(item)}
style={[styles.pl2]}
style={[styles.pl2, insets.bottom ? styles.mb5 : undefined]}
text={translate('newChatPage.addToGroup')}
innerStyles={buttonInnerStyles}
small
/>
);
},
[selectedOptions, setSelectedOptions, styles, translate],
[
insets.bottom,
selectedOptions,
setSelectedOptions,
styles.alignItemsCenter,
styles.buttonDefaultHovered,
styles.flexRow,
styles.mb5,
styles.ml0,
styles.ml5,
styles.optionSelectCircle,
styles.pl2,
translate,
],
);

const createGroup = useCallback(() => {
Expand Down Expand Up @@ -297,7 +310,7 @@ function NewChatPage() {
return (
<ScreenWrapper
shouldEnableKeyboardAvoidingView={false}
includeSafeAreaPaddingBottom={isOffline}
includeSafeAreaPaddingBottom={false}
shouldShowOfflineIndicator={false}
includePaddingTop={false}
shouldEnablePickerAvoiding={false}
Expand Down Expand Up @@ -331,6 +344,7 @@ function NewChatPage() {
isLoadingNewOptions={!!isSearchingForReports}
initiallyFocusedOptionKey={firstKeyForList}
shouldTextInputInterceptSwipe
confirmButtonStyles={insets.bottom ? [safeAreaPaddingBottomStyle, styles.mb5] : undefined}
/>
{isSmallScreenWidth && (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import withCurrentUserPersonalDetails from '@components/withCurrentUserPersonalD
import useActiveWorkspace from '@hooks/useActiveWorkspace';
import useAutoFocusInput from '@hooks/useAutoFocusInput';
import useLocalize from '@hooks/useLocalize';
import useNetwork from '@hooks/useNetwork';
import usePermissions from '@hooks/usePermissions';
import useResponsiveLayout from '@hooks/useResponsiveLayout';
import useThemeStyles from '@hooks/useThemeStyles';
Expand Down Expand Up @@ -41,7 +40,6 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
const {onboardingIsMediumOrLargerScreenWidth, isSmallScreenWidth, shouldUseNarrowLayout} = useResponsiveLayout();
const {inputCallbackRef} = useAutoFocusInput();
const [shouldValidateOnChange, setShouldValidateOnChange] = useState(false);
const {isOffline} = useNetwork();
const {canUseDefaultRooms} = usePermissions();
const {activeWorkspaceID} = useActiveWorkspace();

Expand Down Expand Up @@ -114,7 +112,7 @@ function BaseOnboardingPersonalDetails({currentUserPersonalDetails, shouldUseNat
<ScreenWrapper
shouldEnableMaxHeight
shouldShowOfflineIndicator={false}
includeSafeAreaPaddingBottom={isOffline}
includeSafeAreaPaddingBottom={false}
testID="BaseOnboardingPersonalDetails"
style={[styles.defaultModalContainer, shouldUseNativeStyles && styles.pt8]}
>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepConfirmation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ function IOURequestStepConfirmation({
shouldEnableMaxHeight={DeviceCapabilities.canUseTouchScreen()}
testID={IOURequestStepConfirmation.displayName}
>
<View style={[styles.flex1, styles.mb6]}>
<View style={styles.flex1}>
<HeaderWithBackButton
title={headerTitle}
onBackButtonPress={navigateBack}
Expand Down
1 change: 1 addition & 0 deletions src/pages/iou/request/step/IOURequestStepDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ function IOURequestStepDescription({
shouldShowWrapper
testID={IOURequestStepDescription.displayName}
shouldShowNotFoundPage={shouldShowNotFoundPage}
includeSafeAreaPaddingBottom={false}
>
<FormProvider
style={[styles.flexGrow1, styles.ph5]}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepDistance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ function IOURequestStepDistance({
allowBubble
pressOnEnter
large
style={[styles.w100, styles.mb4, styles.ph4, styles.flexShrink0]}
style={[styles.w100, styles.mb5, styles.ph4, styles.flexShrink0]}
onPress={submitWaypoints}
text={buttonText}
isLoading={!isOffline && (isLoadingRoute || shouldFetchRoute || isLoading)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepMerchant.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ function IOURequestStepMerchant({
onBackButtonPress={navigateBack}
shouldShowWrapper
testID={IOURequestStepMerchant.displayName}
includeSafeAreaPaddingBottom
includeSafeAreaPaddingBottom={false}
>
<FormProvider
style={[styles.flexGrow1, styles.ph5]}
Expand Down
Loading

0 comments on commit fe01894

Please sign in to comment.