Skip to content

Commit b6ac844

Browse files
committed
rewrite comments as plain sentences without jargon
1 parent 363fb9d commit b6ac844

6 files changed

Lines changed: 12 additions & 12 deletions

File tree

src/components/ExportDownloadStatusManager.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function ExportDownloadStatusManager() {
4545
markExportDownloadSurfaced(exportID);
4646
return;
4747
}
48-
// The modal blocks dismissal while still preparing, so this is belt-and-suspenders.
48+
// The modal already blocks dismissal while preparing, so this is an extra guard.
4949
if (exportDownload?.state === CONST.EXPORT_DOWNLOAD.STATE.PREPARING) {
5050
return;
5151
}

src/components/ExportDownloadStatusModal.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function ExportDownloadStatusModal({exportID, isVisible, onClose, failedBody}: E
7373

7474
// Build the secure download URL the same way downloadReportPDF does, so the host always follows
7575
// the app's current environment (instead of the env baked into a backend-built URL) and authenticates
76-
// via the encryptedAuthToken no separate OldDot sign-in needed.
76+
// via the encryptedAuthToken, so no separate OldDot sign-in is needed.
7777
const downloadFile = () => {
7878
if (!fileName || !currentUserLogin) {
7979
return;

src/hooks/useExportActions.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function useExportActions({reportID, policy, onPDFModalOpen}: UseExportActionsPa
141141
},
142142
true,
143143
);
144-
// Clear the selection now that the export has started; the app-level ExportDownloadStatusManager shows the modal.
144+
// Clear the selection now that the export has started. The app-level ExportDownloadStatusManager shows the modal.
145145
clearSelectedTransactions(true);
146146
};
147147

src/hooks/useSearchBulkActions.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -847,7 +847,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
847847
true,
848848
);
849849
}
850-
// Clear the selection now that the export has started; ExportDownloadStatusManager shows the modal.
850+
// Clear the selection now that the export has started. The ExportDownloadStatusManager shows the modal.
851851
selectAllMatchingItems(false);
852852
clearSelectedTransactions(undefined, true);
853853
},
@@ -951,7 +951,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
951951
exportColumnLabels: exportParameters.exportColumnLabels,
952952
exportName,
953953
});
954-
// Clear the selection now that the export has started; ExportDownloadStatusManager shows the modal.
954+
// Clear the selection now that the export has started. The ExportDownloadStatusManager shows the modal.
955955
selectAllMatchingItems(false);
956956
clearSelectedTransactions(undefined, true);
957957
return;
@@ -2243,7 +2243,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
22432243
return;
22442244
}
22452245
exportReportsToPDF(selectedReportIDs);
2246-
// Clear the selection now that the export has started; ExportDownloadStatusManager shows the modal.
2246+
// Clear the selection now that the export has started. The ExportDownloadStatusManager shows the modal.
22472247
selectAllMatchingItems(false);
22482248
clearSelectedTransactions(undefined, true);
22492249
},
@@ -2263,7 +2263,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
22632263
return;
22642264
}
22652265
exportReceiptsToZip({reportIDs: selectedReportIDs});
2266-
// Clear the selection now that the export has started; ExportDownloadStatusManager shows the modal.
2266+
// Clear the selection now that the export has started. The ExportDownloadStatusManager shows the modal.
22672267
selectAllMatchingItems(false);
22682268
clearSelectedTransactions(undefined, true);
22692269
},
@@ -2286,7 +2286,7 @@ function useSearchBulkActions({queryJSON}: UseSearchBulkActionsParams) {
22862286
return;
22872287
}
22882288
exportReceiptsToZip({transactionIDs});
2289-
// Clear the selection now that the export has started; ExportDownloadStatusManager shows the modal.
2289+
// Clear the selection now that the export has started. The ExportDownloadStatusManager shows the modal.
22902290
selectAllMatchingItems(false);
22912291
clearSelectedTransactions(undefined, true);
22922292
},

src/libs/actions/Export.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ function clearStaleExportDownloads() {
8383
if (exportDownload.shouldSendFromConcierge) {
8484
continue;
8585
}
86-
// Keep preparing (in flight) and ready (finished but maybe unseen) exports; only clear failed leftovers.
86+
// Keep preparing and ready exports so the manager can re-surface them. Only failed leftovers are cleared here.
8787
if (exportDownload.state === CONST.EXPORT_DOWNLOAD.STATE.PREPARING || exportDownload.state === CONST.EXPORT_DOWNLOAD.STATE.READY) {
8888
continue;
8989
}

tests/unit/ExportDownloadStatusModalTest.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ describe('ExportDownloadStatusModal', () => {
144144
await waitForBatchedUpdatesWithAct();
145145

146146
const expectedURLPart = `secure?secureType=csvexport&filename=${encodeURIComponent(CSV_FILE_NAME)}&downloadName=${encodeURIComponent(CSV_FILE_NAME)}`;
147-
// shouldUnlink (arg 9) is left undefined so the platform default cleans up the temp file; appendTimestamp (arg 10) is false so the OS-recorded download time isn't duplicated in the name.
147+
// shouldUnlink (arg 9) is left undefined so the platform default cleans up the temp file. appendTimestamp (arg 10) is false so the download time recorded by the OS is not duplicated in the name.
148148
expect(mockFileDownload).toHaveBeenCalledWith(
149149
expect.anything(),
150150
expect.stringContaining(expectedURLPart),
@@ -166,7 +166,7 @@ describe('ExportDownloadStatusModal', () => {
166166
await waitForBatchedUpdatesWithAct();
167167

168168
const expectedURLPart = `secure?secureType=pdfreport&filename=${encodeURIComponent(PDF_FILE_NAME)}&downloadName=${encodeURIComponent(PDF_FILE_NAME)}`;
169-
// shouldUnlink (arg 9) is left undefined so the platform default cleans up the temp file; appendTimestamp (arg 10) is false so the OS-recorded download time isn't duplicated in the name.
169+
// shouldUnlink (arg 9) is left undefined so the platform default cleans up the temp file. appendTimestamp (arg 10) is false so the download time recorded by the OS is not duplicated in the name.
170170
expect(mockFileDownload).toHaveBeenCalledWith(
171171
expect.anything(),
172172
expect.stringContaining(expectedURLPart),
@@ -205,7 +205,7 @@ describe('ExportDownloadStatusModal', () => {
205205
expect(screen.getByText('exportDownload.readyTitle')).toBeTruthy();
206206
expect(screen.getByText('exportDownload.readyBody')).toBeTruthy();
207207
expect(screen.getByText('exportDownload.downloadFile')).toBeTruthy();
208-
// The Close button is removed in the ready state; the modal is dismissible and Download closes it.
208+
// The Close button is removed in the ready state. The modal is dismissible and Download closes it.
209209
expect(screen.queryByText('exportDownload.close')).toBeNull();
210210
});
211211

0 commit comments

Comments
 (0)