Skip to content

MEN-9212: release filter improvements#1969

Merged
mineralsfree merged 8 commits into
mendersoftware:mainfrom
mineralsfree:MEN-9212
Jun 29, 2026
Merged

MEN-9212: release filter improvements#1969
mineralsfree merged 8 commits into
mendersoftware:mainfrom
mineralsfree:MEN-9212

Conversation

@mineralsfree

@mineralsfree mineralsfree commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@mineralsfree mineralsfree marked this pull request as draft June 25, 2026 11:55
@mineralsfree mineralsfree marked this pull request as ready for review June 26, 2026 09:18
@mineralsfree mineralsfree marked this pull request as draft June 26, 2026 09:18
@mineralsfree mineralsfree marked this pull request as ready for review June 26, 2026 09:19
@mineralsfree mineralsfree requested a review from a team as a code owner June 26, 2026 09:19
@mineralsfree mineralsfree force-pushed the MEN-9212 branch 2 times, most recently from 24387ad to ceff016 Compare June 26, 2026 11:35
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@mineralsfree mineralsfree removed the WIP label Jun 26, 2026
@mineralsfree mineralsfree requested a review from mzedel June 26, 2026 12:45

@mzedel mzedel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I like the proximity of the ControlledSelect to the AutoComplete 😁 - only the duplicated option.key === softwareKindOptions.manifest.key && !isEnterprise would be slightly risky down the line IMO, but apart from that 👌 !

return (
<>
<h4>Select software to deploy</h4>
<div className="flexbox margin-bottom-x-small">

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<div className="flexbox margin-bottom-x-small">
<div className="flexbox align-items-center margin-bottom-x-small">

here and with the others - I guess with the small tooltips it's not that much of an issue though

kind: debouncedKind ?? undefined,
selectedTags: tags,
type: debouncedKind === softwareKindOptions.manifest.key ? undefined : (type ?? undefined)
type: debouncedKind === softwareKindOptions.manifest.key ? undefined : type || undefined

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type: debouncedKind === softwareKindOptions.manifest.key ? undefined : type || undefined
type: debouncedKind === softwareKindOptions.manifest.key || !type ? undefined : type

not 100% sure if that's more readable, but both the prior ?? as well as the || to undefined read weird to me 🤷

placeholder="Select type"
hideEmptyOption
width={270}
MenuProps={{ slotProps: { paper: { sx: { width: 270, '& .MuiMenuItem-root.Mui-disabled': { opacity: 1 } } } } }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we have this in a class above & reference the menuitem via the mui class references? both the MenuProps or the ControlledSelect itself would accept a className

getOptionLabel={(value: SoftwareKind) => softwareKindOptions[value].title}
getOptionDisabled={(option: SoftwareKind) => option === softwareKindOptions.manifest.key && !isEnterprise}
renderInput={params => <TextField {...params} label="Select type" placeholder="Select type" />}
options={Object.values(softwareKindOptions)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe map the softwareKindOptions values before to include the disabled state - since both getOptionDisabled and renderOption check for isEnterprise and thus bring in more places this check can diverge

const locked = option.key === softwareKindOptions.manifest.key && !isEnterprise;
return (
<span className={classes.kindOption}>
<span className={locked ? 'muted' : undefined}>{option.title}</span>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<span className={locked ? 'muted' : undefined}>{option.title}</span>
<Typography color={option.disabled ? 'text.disabled' : 'inherit'}>{option.title}</Typography>

maybe?

renderOption={(option: SoftwareKindOption) => {
const locked = option.key === softwareKindOptions.manifest.key && !isEnterprise;
return (
<span className={classes.kindOption}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe:

kindOptions: { gap: theme.spacing(2) }

and then:

Suggested change
<span className={classes.kindOption}>
<div className={`flexbox align-items-center ${classes.kindOption}`}>

? - did not try this though... 😬

Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
… adjustable

Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
+ disabled option support and hide empty option controlled with props

Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Ticket: MEN-9584

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Ticket: MEN-9584

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
Ticket: MEN-9212

Signed-off-by: Mikita Pilinka <mikita.pilinka@northern.tech>
@mineralsfree mineralsfree merged commit 0559c23 into mendersoftware:main Jun 29, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants