This might be changed on stage (haven't checked there), but on production, if I unselect all tiers in the tiers menu, it automatically re-selects tier1 and tier2. I keep catching myself trying to show only tier3 jobs by first unselecting 1 and 2, then selecting 3. But unselecting 1 and 2 automatically re-selects them. Arguably, unselecting all tiers should be possible and it'd show no jobs.
I can see how this seems a little "astonishing" to have ti do that. But this was actually done intentionally. I didn't see the value in hiding all jobs because you unchecked all tiers. So when you uncheck them all, as you say, you revert to the "default" state. I'd have to investigate how much work it would take to have it work the way you describe. But it seems like it'd be more work than it's worth. :) But if it's important, let me know.
I agree with Wes, but I defer to the collective :) I encountered it also. I guess one could pose deselecting all Tiers would produce a result similar to a user Quick Filtering for a non-existent job. We just present empty job tables. If it was possible/low-cost, in the change one could add an fa-exclamation-circle in superscript in the Tier button if it's in that state, eg. something like: Tier (!) So the user would know that button/menu is the cause of the presentation state.
Alternatively, maybe just make it impossible to uncheck all three checkboxes? (If only tier 1 is checked, you can't uncheck tier 1 until you've selected either tier 2 or 3.)
Comment on attachment 8789929 [details] [review] [treeherder] KWierso:1240211 > mozilla:master Would this be a good compromise? It makes it so you can't unselect all tiers at once through the UI.
I mentioned this in the PR, but I think I was just being disagreeable, so sorry about that. :) If you wanted to make it work the way you originally stated, you'd modify ``jobfilters.js``. The only trick in this is that the default state (with no tier-related filter params on the URL) would be to have tier-3 hidden and 1 and 2 visible. So, that's kind of the rub. Filter state is persisted in the URL, and we maintain a list of defaults if nothing about a tier-field is mentioned. That's here: https://github.com/mozilla/treeherder/blob/f7b3d2f67d218580d8d5be97d558c5e72e57360d/ui/js/services/jobfilters.js#L47-L47 You could force it to unshow all tiers when you unselect it, but then you'd be straying away from being in sync with the query string params. I just think it might be hard to do, and could complicate the code a bit. Anyway, your solution looks like a nice, easy compromise, fwiw! :)
Comment on attachment 8789929 [details] [review] [treeherder] KWierso:1240211 > mozilla:master I made some suggestions to simplify the code a bit. So clearing the review for now. Feel free to push back, if you disagree with anything. :)
Comment on attachment 8789929 [details] [review] [treeherder] KWierso:1240211 > mozilla:master That is much simpler!
Comment on attachment 8789929 [details] [review] [treeherder] KWierso:1240211 > mozilla:master Looks awesome! :)
Commits pushed to master at https://github.com/mozilla/treeherder https://github.com/mozilla/treeherder/commit/20ccbbb118d67300fc47c9b9ef9183aa09f077e3 Bug 1240211 - Disable the checkbox for the single remaining selected tier https://github.com/mozilla/treeherder/commit/5da40df112317f9008e711c32b1a0d7a381548bf Bug 1240211 - Disable the checkbox for the single remaining selected tier (#1841) r=camd