Closed Bug 1450909 Opened 6 years ago Closed 5 years ago

Selected job is still shown after changing filters which should actually hide it

Categories

(Tree Management :: Treeherder: Frontend, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: whimboo, Unassigned)

Details

When you query for jobs and select a specific one, it will still be shown in the list of jobs even a different filter should hide the job.

Steps:

1) Open https://treeherder.mozilla.org/#/jobs?repo=autoland&filter-searchStr=mn
2) Select a Mn job
3) Change the filter to `wd`

After step 3 the Mn job is still visible and selected.
Ah yes I can reproduce.

What do you feel should be the expected behaviour here? Should the bottom panel be reset too, or just the job icon in the main job list?
IMHO if the job is not listed anymore the panel should also be gone beside the job.
Cameron, thoughts? Did the behaviour change here with the react work? :-)
Flags: needinfo?(cdawson)
Yeah, this was actually intentional.  The purpose for it was the workflow of classifying a job when in unclassified-only mode.  After talking with Philor, it is essential for them to still have the job be "selected" after classifying so that they can perform other actions on it.

When we had this the old "clonejobs" way, the job would disappear from the job field, but still be "selected" and still show the details panel below.  This is for both Henrik's case and the classify case.  This was possible due to the way clonejobs works.  In react, when something is filtered out, it actually doesn't exist in the DOM.  This is partially for performance reasons.

A big issue with this is the 'n'/'p' workflow where it remembers which job WAS selected so that 'n' will then still take you to the next one from there.  We originally had a bug where you'd "lose your place" when the job was filtered away.

In the current workflow, as soon as you navigate away from the selected job, then it disappears.  I had hoped this was better so it was clear which job the job-details panel on the bottom applied to.

I'm not saying it's not possible to address this.  Anything is possible in code...  :)  But we'd need to be mindful of the sheriff workflow.  Perhaps changing filters could trigger a check for the current job being filtered out and if it was, then remove selection.  That would mean that the sheriff workflow would remain the same since it doesn't involve a change to the global filters.
Flags: needinfo?(cdawson)

Leaving this as-is for now for reasons explained. If you have a proposal for a better solution, please reopen and explain. Thanks! :)

Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.