Skip to content

Commit fb0bdd1

Browse files
committed
squash me
1 parent ea7edd2 commit fb0bdd1

2 files changed

Lines changed: 80 additions & 75 deletions

File tree

.npmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
package-lock=false
1+
package-lock=false

src/components/DownloadImageDialog/ImageForm.tsx

Lines changed: 79 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -363,85 +363,90 @@ export const ImageForm = memo(function ImageForm({
363363
)}
364364
</Stack>
365365
{!isInitialDefault && version && (
366-
<Stack
367-
direction="row"
368-
flexWrap="wrap"
369-
maxWidth="100%"
370-
gap={2}
371-
alignItems="center"
372-
>
373-
<Autocomplete
374-
fullWidth
375-
id="e2e-download-image-versions-list"
376-
value={version}
377-
getOptionLabel={(option) => option.value}
378-
isOptionEqualToValue={(option, value) =>
379-
option.value === value.value
380-
}
381-
options={versionSelectionOpts}
382-
onChange={(_event, ver) => {
383-
handleVersionChange(ver);
384-
}}
385-
placeholder="Choose a version..."
386-
renderOption={(props, option) => (
387-
<Box component="li" {...props}>
388-
<VersionSelectItem
389-
option={option}
390-
isRecommended={option.value === recommendedVersion}
391-
/>
392-
</Box>
393-
)}
394-
renderInput={({ InputProps, ...params }) => (
395-
<TextField
396-
{...params}
397-
slotProps={{
398-
input: {
399-
...InputProps,
400-
endAdornment: (
401-
<>
402-
{version.value === recommendedVersion && (
403-
<Chip
404-
sx={{ ml: 1 }}
405-
color="green"
406-
label="recommended"
407-
/>
408-
)}
409-
{!!version?.knownIssueList && (
410-
<Tooltip title={version.knownIssueList}>
411-
<FontAwesomeIcon
412-
icon={faTriangleExclamation}
413-
color={token('color.icon.warning')}
366+
<>
367+
<Stack
368+
direction="row"
369+
flexWrap="wrap"
370+
maxWidth="100%"
371+
gap={2}
372+
alignItems="center"
373+
>
374+
<Autocomplete
375+
fullWidth
376+
id="e2e-download-image-versions-list"
377+
value={version}
378+
getOptionLabel={(option) => option.value}
379+
isOptionEqualToValue={(option, value) =>
380+
option.value === value.value
381+
}
382+
options={versionSelectionOpts}
383+
onChange={(_event, ver) => {
384+
handleVersionChange(ver);
385+
}}
386+
renderOption={(props, option) => (
387+
<Box component="li" {...props}>
388+
<VersionSelectItem
389+
option={option}
390+
isRecommended={option.value === recommendedVersion}
391+
/>
392+
</Box>
393+
)}
394+
renderInput={({ InputProps, ...params }) => (
395+
<TextField
396+
{...params}
397+
slotProps={{
398+
input: {
399+
...InputProps,
400+
endAdornment: (
401+
<>
402+
{version.value === recommendedVersion && (
403+
<Chip
404+
sx={{ ml: 1 }}
405+
color="green"
406+
label="recommended"
414407
/>
415-
</Tooltip>
416-
)}
417-
{InputProps.endAdornment}
418-
</>
419-
),
420-
},
421-
}}
422-
label="OS version"
408+
)}
409+
{!!version?.knownIssueList && (
410+
<Tooltip title={version.knownIssueList}>
411+
<FontAwesomeIcon
412+
icon={faTriangleExclamation}
413+
color={token('color.icon.warning')}
414+
/>
415+
</Tooltip>
416+
)}
417+
{InputProps.endAdornment}
418+
</>
419+
),
420+
},
421+
}}
422+
label="OS version"
423+
/>
424+
)}
425+
disableClearable
426+
sx={{ flex: 1 }}
427+
/>
428+
{showAllVersionsToggle && (
429+
<FormControlLabel
430+
control={
431+
<Checkbox
432+
id="e2e-show-all-versions-check"
433+
checked={showAllVersions}
434+
onChange={handleShowAllVersions}
435+
/>
436+
}
437+
label="Show outdated versions"
438+
// TODO: Find a better way to center the checkbox with the input only (without the label)
439+
sx={{ mt: 3 }}
423440
/>
424441
)}
425-
disableClearable
426-
sx={{ flex: 1 }}
442+
</Stack>
443+
<Divider
444+
variant="fullWidth"
445+
flexItem
446+
sx={{ borderStyle: 'dashed' }}
427447
/>
428-
{showAllVersionsToggle && (
429-
<FormControlLabel
430-
control={
431-
<Checkbox
432-
id="e2e-show-all-versions-check"
433-
checked={showAllVersions}
434-
onChange={handleShowAllVersions}
435-
/>
436-
}
437-
label="Show outdated versions"
438-
// TODO: Find a better way to center the checkbox with the input only (without the label)
439-
sx={{ mt: 3 }}
440-
/>
441-
)}
442-
</Stack>
448+
</>
443449
)}
444-
<Divider variant="fullWidth" flexItem sx={{ borderStyle: 'dashed' }} />
445450
{(!isInitialDefault || !variant) && (
446451
<VariantSelector
447452
version={version}

0 commit comments

Comments
 (0)