Skip to content

Commit 6a85f5a

Browse files
committed
Revert "Merge pull request #38722 from rayane-djouah/Feat-Redesign-thread-ancestry"
This reverts commit 903fe8a, reversing changes made to d6fc25a.
1 parent b5797f9 commit 6a85f5a

18 files changed

+43
-133
lines changed

assets/images/thread.svg

Lines changed: 0 additions & 3 deletions
This file was deleted.

src/components/AvatarWithDisplayName.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ function AvatarWithDisplayName({
141141
<ParentNavigationSubtitle
142142
parentNavigationSubtitleData={parentNavigationSubtitleData}
143143
parentReportID={report?.parentReportID}
144-
parentReportActionID={report?.parentReportActionID}
145144
pressableStyles={[styles.alignSelfStart, styles.mw100]}
146145
/>
147146
)}

src/components/Icon/Expensicons.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@ import Sync from '@assets/images/sync.svg';
141141
import Tag from '@assets/images/tag.svg';
142142
import Task from '@assets/images/task.svg';
143143
import Tax from '@assets/images/tax.svg';
144-
import Thread from '@assets/images/thread.svg';
145144
import ThreeDots from '@assets/images/three-dots.svg';
146145
import ThumbsUp from '@assets/images/thumbs-up.svg';
147146
import Transfer from '@assets/images/transfer.svg';
@@ -231,7 +230,6 @@ export {
231230
Folder,
232231
Tag,
233232
Tax,
234-
Thread,
235233
Gallery,
236234
Gear,
237235
Globe,

src/components/ParentNavigationSubtitle.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,11 @@ type ParentNavigationSubtitleProps = {
1515
/** parent Report ID */
1616
parentReportID?: string;
1717

18-
/** parent Report Action ID */
19-
parentReportActionID?: string;
20-
2118
/** PressableWithoutFeedack additional styles */
2219
pressableStyles?: StyleProp<ViewStyle>;
2320
};
2421

25-
function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportActionID, parentReportID = '', pressableStyles}: ParentNavigationSubtitleProps) {
22+
function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportID = '', pressableStyles}: ParentNavigationSubtitleProps) {
2623
const styles = useThemeStyles();
2724
const {workspaceName, reportName} = parentNavigationSubtitleData;
2825

@@ -31,7 +28,7 @@ function ParentNavigationSubtitle({parentNavigationSubtitleData, parentReportAct
3128
return (
3229
<PressableWithoutFeedback
3330
onPress={() => {
34-
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID, parentReportActionID));
31+
Navigation.navigate(ROUTES.REPORT_WITH_ID.getRoute(parentReportID));
3532
}}
3633
accessibilityLabel={translate('threads.parentNavigationSummary', {reportName, workspaceName})}
3734
role={CONST.ROLE.LINK}

src/languages/en.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2415,7 +2415,6 @@ export default {
24152415
hiddenMessage: '[Hidden message]',
24162416
},
24172417
threads: {
2418-
thread: 'Thread',
24192418
replies: 'Replies',
24202419
reply: 'Reply',
24212420
from: 'From',

src/languages/es.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2907,7 +2907,6 @@ export default {
29072907
hiddenMessage: '[Mensaje oculto]',
29082908
},
29092909
threads: {
2910-
thread: 'Hilo',
29112910
replies: 'Respuestas',
29122911
reply: 'Respuesta',
29132912
from: 'De',

src/libs/ReportUtils.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ type Ancestor = {
423423
report: Report;
424424
reportAction: ReportAction;
425425
shouldDisplayNewMarker: boolean;
426+
shouldHideThreadDividerLine: boolean;
426427
};
427428

428429
type AncestorIDs = {
@@ -5477,7 +5478,7 @@ function shouldDisableThread(reportAction: OnyxEntry<ReportAction>, reportID: st
54775478
);
54785479
}
54795480

5480-
function getAllAncestorReportActions(report: Report | null | undefined): Ancestor[] {
5481+
function getAllAncestorReportActions(report: Report | null | undefined, shouldHideThreadDividerLine: boolean): Ancestor[] {
54815482
if (!report) {
54825483
return [];
54835484
}
@@ -5487,6 +5488,7 @@ function getAllAncestorReportActions(report: Report | null | undefined): Ancesto
54875488

54885489
// Store the child of parent report
54895490
let currentReport = report;
5491+
let currentUnread = shouldHideThreadDividerLine;
54905492

54915493
while (parentReportID) {
54925494
const parentReport = getReport(parentReportID);
@@ -5501,11 +5503,14 @@ function getAllAncestorReportActions(report: Report | null | undefined): Ancesto
55015503
report: currentReport,
55025504
reportAction: parentReportAction,
55035505
shouldDisplayNewMarker: isParentReportActionUnread,
5506+
// We should hide the thread divider line if the previous ancestor action is unread
5507+
shouldHideThreadDividerLine: currentUnread,
55045508
});
55055509
parentReportID = parentReport?.parentReportID;
55065510
parentReportActionID = parentReport?.parentReportActionID;
55075511
if (!isEmptyObject(parentReport)) {
55085512
currentReport = parentReport;
5513+
currentUnread = isParentReportActionUnread;
55095514
}
55105515
}
55115516

src/pages/ReportDetailsPage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ function ReportDetailsPage({policies, report, session, personalDetails}: ReportD
252252
<ParentNavigationSubtitle
253253
parentNavigationSubtitleData={parentNavigationSubtitleData}
254254
parentReportID={report?.parentReportID}
255-
parentReportActionID={report?.parentReportActionID}
256255
pressableStyles={[styles.mt1, styles.mw100]}
257256
/>
258257
)}

src/pages/home/HeaderView.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,6 @@ function HeaderView({report, personalDetails, parentReport, parentReportAction,
272272
<ParentNavigationSubtitle
273273
parentNavigationSubtitleData={parentNavigationSubtitleData}
274274
parentReportID={report.parentReportID}
275-
parentReportActionID={report.parentReportActionID}
276275
pressableStyles={[styles.alignSelfStart, styles.mw100]}
277276
/>
278277
)}

src/pages/home/report/RepliesDivider.tsx

Lines changed: 0 additions & 36 deletions
This file was deleted.

0 commit comments

Comments
 (0)