Skip to content

Commit 501be73

Browse files
committed
fix: display type in pill box and fixed toggle switch for unused files to have animation and be focused on tab
1 parent a227901 commit 501be73

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

assets/js/Components/ReviewFilesPage.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ export default function ReviewFilesPage({
261261
tempRows.push({
262262
id: unusedFile.id,
263263
name: { value: fileName.toLowerCase(), display: fileName },
264-
type: { value: fileType.toLowerCase(), display: getFileTypeDisplay(fileType) },
264+
type: { value: fileType.toLowerCase(), display: getReadableFileType(fileType) },
265265
size: !isNaN(fileSize)
266266
? { value: fileSize, display: Text.getReadableFileSize(fileSize) }
267267
: { value: -1, display: t('label.unknown') },
@@ -1106,8 +1106,6 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
11061106
}
11071107
}
11081108

1109-
const allUnusedFilesSelected = unusedFiles.length > 0 && deleteFileQueue.length === unusedFiles.length
1110-
11111109
return (
11121110
<>
11131111
{ widgetState === WIDGET_STATE.LOADING ? (
@@ -1269,11 +1267,9 @@ const getSectionPostOptions = (newFile, sectionReferences) => {
12691267
{!isDisabled && unusedFiles.length > 0 && (
12701268
<div className="select-all-unused-toggle-row">
12711269
<ToggleSwitch
1272-
key={allUnusedFilesSelected ? 'select-all-on' : 'select-all-off'}
12731270
labelId="selectAllUnusedFiles"
1274-
initialValue={allUnusedFilesSelected}
1271+
initialValue={unusedFiles.length > 0 && deleteFileQueue.length === unusedFiles.length}
12751272
updateToggle={updateSelectAllUnusedFilesToggle}
1276-
small={true}
12771273
/>
12781274
<div id="selectAllUnusedFiles" className="align-self-center subtext">
12791275
{t('files.label.select_all_unused_files')}

0 commit comments

Comments
 (0)