-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui: add option to filter for jobs that are packs #17226
Conversation
Ember Asset Size actionAs of e9dbda1 Files that got Bigger 🚨:
Files that stayed the same size 🤷:
|
Ember Test Audit comparison
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pack doesn't seem to have the same exclusivity rules in filtering as to the job types
const shouldShowPack = types.includes('pack') && job.displayType.isPack; | ||
|
||
if (types.length && shouldShowPack) { | ||
return true; | ||
} | ||
|
||
if (types.length && !types.includes(job.get('displayType.type'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The filter should work as an or
when using multi-select. A job cannot simultaneously be system
and service
and both would show in the list.
Conversely, pack
is not a job type. A job could be pack
and be service
at the same time.
However, this is a multi-select filter so options are applied as or
here. And if we applied another separate filter like datacenter, then that would be applied as an and
operator.
Could you describe in pseudocode what you're expecting? Because I think the or
and and
mental model applies here and that this is working as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my confusion is from Pack not really being a job type as much as an attribute of the job / making it the only non-mutually-exclusive item here. I don't think this will lead to much user error, so I think leave it in, but another way we might have tackled this is under a separate dropdown for job attributes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it really does deserve its own filter. But then we just clutter the page. Our filtering is pretty far off from the rest of the other UIs. So it might be worth addressing later on down the line.
const shouldShowPack = types.includes('pack') && job.displayType.isPack; | ||
|
||
if (types.length && shouldShowPack) { | ||
return true; | ||
} | ||
|
||
if (types.length && !types.includes(job.get('displayType.type'))) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess my confusion is from Pack not really being a job type as much as an attribute of the job / making it the only non-mutually-exclusive item here. I don't think this will lead to much user error, so I think leave it in, but another way we might have tackled this is under a separate dropdown for job attributes.
Resolves #15736
This PR adds a UI filter to the
jobs.index
view to enable filtering for jobs that are packs.