Skip to content

Commit 7b20fbf

Browse files
Merge branch 'Expensify:main' into fix/65480-the-loading-indicator-displayed-when-offline
2 parents d94c8d3 + 40b8521 commit 7b20fbf

36 files changed

Lines changed: 215 additions & 187 deletions

File tree

Mobile-Expensify

android/app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,8 +114,8 @@ android {
114114
minSdkVersion rootProject.ext.minSdkVersion
115115
targetSdkVersion rootProject.ext.targetSdkVersion
116116
multiDexEnabled rootProject.ext.multiDexEnabled
117-
versionCode 1009018005
118-
versionName "9.1.80-5"
117+
versionCode 1009018008
118+
versionName "9.1.80-8"
119119
// Supported language variants must be declared here to avoid from being removed during the compilation.
120120
// This also helps us to not include unnecessary language variants in the APK.
121121
resConfigs "en", "es"

ios/NewExpensify/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dict>
4545
</array>
4646
<key>CFBundleVersion</key>
47-
<string>9.1.80.5</string>
47+
<string>9.1.80.8</string>
4848
<key>FullStory</key>
4949
<dict>
5050
<key>OrgId</key>

ios/NotificationServiceExtension/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.80</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.80.5</string>
16+
<string>9.1.80.8</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionPointIdentifier</key>

ios/ShareViewController/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<key>CFBundleShortVersionString</key>
1414
<string>9.1.80</string>
1515
<key>CFBundleVersion</key>
16-
<string>9.1.80.5</string>
16+
<string>9.1.80.8</string>
1717
<key>NSExtension</key>
1818
<dict>
1919
<key>NSExtensionAttributes</key>

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "new.expensify",
3-
"version": "9.1.80-5",
3+
"version": "9.1.80-8",
44
"author": "Expensify, Inc.",
55
"homepage": "https://new.expensify.com",
66
"description": "New Expensify is the next generation of Expensify: a reimagination of payments based atop a foundation of chat.",

src/CONST/index.ts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ const onboardingInviteTypes = {
130130
IOU: 'iou',
131131
INVOICE: 'invoice',
132132
CHAT: 'chat',
133+
WORKSPACE: 'workspace',
133134
} as const;
134135

135136
const onboardingCompanySize = {
@@ -965,18 +966,15 @@ const CONST = {
965966
TEST_RECEIPT_URL: `${CLOUDFRONT_URL}/images/fake-receipt__tacotodds.png`,
966967
// Use Environment.getEnvironmentURL to get the complete URL with port number
967968
DEV_NEW_EXPENSIFY_URL: 'https://dev.new.expensify.com:',
968-
NAVATTIC: {
969-
ADMIN_TOUR_PRODUCTION: 'https://expensify.navattic.com/kh204a7',
970-
ADMIN_TOUR_STAGING: 'https://expensify.navattic.com/3i300k18',
971-
EMPLOYEE_TOUR_PRODUCTION: 'https://expensify.navattic.com/35609gb',
972-
EMPLOYEE_TOUR_STAGING: 'https://expensify.navattic.com/cf15002s',
973-
COMPLETED: 'completed',
974-
},
975969
STORYLANE: {
976970
ADMIN_TOUR: 'https://app.storylane.io/demo/bbcreg8vccag?embed=inline',
977971
ADMIN_TOUR_MOBILE: 'https://app.storylane.io/demo/b6faqcdsxgww?embed=inline',
978972
TRACK_WORKSPACE_TOUR: 'https://app.storylane.io/share/agmsfwgasaed?embed=inline',
979973
TRACK_WORKSPACE_TOUR_MOBILE: 'https://app.storylane.io/share/wq4hiwsqvoho?embed=inline',
974+
975+
// At the moment we are using Navattic links, but it will be changed to Storylane in the future.
976+
EMPLOYEE_TOUR: 'https://expensify.navattic.com/35609gb',
977+
EMPLOYEE_TOUR_MOBILE: 'https://expensify.navattic.com/35609gb',
980978
},
981979
OLD_DOT_PUBLIC_URLS: {
982980
TERMS_URL: `${EXPENSIFY_URL}/terms`,

src/components/DisplayNames/index.native.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,31 @@
1-
import React from 'react';
1+
import React, {useMemo} from 'react';
22
import Text from '@components/Text';
33
import useLocalize from '@hooks/useLocalize';
4+
import {containsCustomEmoji, containsOnlyCustomEmoji} from '@libs/EmojiUtils';
45
import Parser from '@libs/Parser';
56
import StringUtils from '@libs/StringUtils';
7+
import TextWithEmojiFragment from '@pages/home/report/comment/TextWithEmojiFragment';
68
import type DisplayNamesProps from './types';
79

810
// As we don't have to show tooltips of the Native platform so we simply render the full display names list.
911
function DisplayNames({accessibilityLabel, fullTitle, textStyles = [], numberOfLines = 1, renderAdditionalText}: DisplayNamesProps) {
1012
const {translate} = useLocalize();
13+
const titleContainsTextAndCustomEmoji = useMemo(() => !containsCustomEmoji(fullTitle) && containsOnlyCustomEmoji(fullTitle), [fullTitle]);
1114
return (
1215
<Text
1316
accessibilityLabel={accessibilityLabel}
1417
style={textStyles}
1518
numberOfLines={numberOfLines}
1619
testID={DisplayNames.displayName}
1720
>
18-
{StringUtils.lineBreaksToSpaces(Parser.htmlToText(fullTitle)) || translate('common.hidden')}
21+
{titleContainsTextAndCustomEmoji ? (
22+
<TextWithEmojiFragment
23+
message={StringUtils.lineBreaksToSpaces(Parser.htmlToText(fullTitle)) || translate('common.hidden')}
24+
style={textStyles}
25+
/>
26+
) : (
27+
StringUtils.lineBreaksToSpaces(Parser.htmlToText(fullTitle)) || translate('common.hidden')
28+
)}
1929
{renderAdditionalText?.()}
2030
</Text>
2131
);

src/components/HTMLEngineProvider/HTMLRenderers/AnchorRenderer.tsx

Lines changed: 5 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,32 @@
11
import {Str} from 'expensify-common';
2-
import React, {useContext, useMemo} from 'react';
2+
import React, {useMemo} from 'react';
33
import type {StyleProp, TextStyle} from 'react-native';
4-
import {TNodeChildrenRenderer} from 'react-native-render-html';
54
import type {CustomRendererProps, TBlock} from 'react-native-render-html';
5+
import {TNodeChildrenRenderer} from 'react-native-render-html';
66
import AnchorForAttachmentsOnly from '@components/AnchorForAttachmentsOnly';
77
import AnchorForCommentsOnly from '@components/AnchorForCommentsOnly';
88
import * as HTMLEngineUtils from '@components/HTMLEngineProvider/htmlEngineUtils';
9-
import {ShowContextMenuContext} from '@components/ShowContextMenuContext';
109
import Text from '@components/Text';
11-
import useCurrentUserPersonalDetails from '@hooks/useCurrentUserPersonalDetails';
1210
import useEnvironment from '@hooks/useEnvironment';
1311
import useHover from '@hooks/useHover';
14-
import useOnyx from '@hooks/useOnyx';
15-
import useParentReport from '@hooks/useParentReport';
16-
import useReportIsArchived from '@hooks/useReportIsArchived';
1712
import useStyleUtils from '@hooks/useStyleUtils';
1813
import useTheme from '@hooks/useTheme';
1914
import useThemeStyles from '@hooks/useThemeStyles';
20-
import {getInternalExpensifyPath, getInternalNewExpensifyPath, openExternalLink, openLink} from '@libs/actions/Link';
21-
import {isAnonymousUser} from '@libs/actions/Session';
22-
import {canActionTask, canModifyTask, completeTask} from '@libs/actions/Task';
23-
import {setSelfTourViewed} from '@libs/actions/Welcome';
24-
import {hasSeenTourSelector} from '@libs/onboardingSelectors';
25-
import {getNavatticURL} from '@libs/TourUtils';
15+
import {getInternalExpensifyPath, getInternalNewExpensifyPath, openLink} from '@libs/actions/Link';
2616
import tryResolveUrlFromApiRoot from '@libs/tryResolveUrlFromApiRoot';
2717
import CONST from '@src/CONST';
28-
import ONYXKEYS from '@src/ONYXKEYS';
2918

3019
type AnchorRendererProps = CustomRendererProps<TBlock> & {
3120
/** Key of the element */
3221
key?: string;
3322
};
3423

3524
function AnchorRenderer({tnode, style, key}: AnchorRendererProps) {
36-
const currentUserPersonalDetails = useCurrentUserPersonalDetails();
37-
const {report, action} = useContext(ShowContextMenuContext);
38-
const [introSelected] = useOnyx(ONYXKEYS.NVP_INTRO_SELECTED, {canBeMissing: true});
39-
const [viewTourTaskReport] = useOnyx(`${ONYXKEYS.COLLECTION.REPORT}${introSelected?.viewTour}`, {canBeMissing: true});
40-
const [hasSeenTour = false] = useOnyx(ONYXKEYS.NVP_ONBOARDING, {
41-
selector: hasSeenTourSelector,
42-
canBeMissing: true,
43-
});
44-
const parentReport = useParentReport(report?.reportID);
45-
const isParentReportArchived = useReportIsArchived(parentReport?.reportID);
46-
const canModifyViewTourTask = canModifyTask(viewTourTaskReport, currentUserPersonalDetails.accountID, isParentReportArchived);
47-
const canActionViewTourTask = canActionTask(viewTourTaskReport, currentUserPersonalDetails.accountID, parentReport, isParentReportArchived);
48-
4925
const theme = useTheme();
5026
const styles = useThemeStyles();
5127
const StyleUtils = useStyleUtils();
5228
const htmlAttribs = tnode.attributes;
53-
const {environment, environmentURL} = useEnvironment();
29+
const {environmentURL} = useEnvironment();
5430
const {hovered, bind} = useHover();
5531
// An auth token is needed to download Expensify chat attachments
5632
const isAttachment = !!htmlAttribs[CONST.ATTACHMENT_SOURCE_ATTRIBUTE];
@@ -68,26 +44,13 @@ function AnchorRenderer({tnode, style, key}: AnchorRendererProps) {
6844

6945
const textDecorationLineStyle = isDeleted ? styles.lineThrough : {};
7046

71-
const isInConciergeTaskView = action?.actionName === CONST.REPORT.ACTIONS.TYPE.CREATED && report?.type === CONST.REPORT.TYPE.TASK && report.ownerAccountID === CONST.ACCOUNT_ID.CONCIERGE;
72-
const isTourTask = attrHref === getNavatticURL(environment, introSelected?.choice) && (action?.actorAccountID === CONST.ACCOUNT_ID.CONCIERGE || isInConciergeTaskView);
73-
7447
const onLinkPress = useMemo(() => {
7548
if (internalNewExpensifyPath || internalExpensifyPath) {
7649
return () => openLink(attrHref, environmentURL, isAttachment);
7750
}
7851

79-
if (isTourTask && !hasSeenTour) {
80-
return () => {
81-
openExternalLink(attrHref);
82-
setSelfTourViewed(isAnonymousUser());
83-
if (viewTourTaskReport && canModifyViewTourTask && canActionViewTourTask) {
84-
completeTask(viewTourTaskReport);
85-
}
86-
};
87-
}
88-
8952
return undefined;
90-
}, [internalNewExpensifyPath, internalExpensifyPath, attrHref, environmentURL, isAttachment, isTourTask, hasSeenTour, viewTourTaskReport, canModifyViewTourTask, canActionViewTourTask]);
53+
}, [internalNewExpensifyPath, internalExpensifyPath, attrHref, environmentURL, isAttachment]);
9154

9255
if (!HTMLEngineUtils.isChildOfComment(tnode) && !isChildOfTaskTitle) {
9356
// This is not a comment from a chat, the AnchorForCommentsOnly uses a Pressable to create a context menu on right click.

0 commit comments

Comments
 (0)