-
Notifications
You must be signed in to change notification settings - Fork 31
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
Add UI elements for test outcome filtering #1163
Conversation
@CharliePoole: |
@rowo360 Sorry for the delay. I'm trying to build your branch now and getting an error in the Package target even though the CI worked. Are you able to do a local |
I cleared my local nuget caches and now it's OK. |
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.
Nice work overall. I was able to figure out how to use it it generally does what it says it will do. I'm initially only reviewing the UI functionality and appearance, without looking too much at the code itself. You can expect further in-line comments later.
Changes I'd like to see...
-
For someone who isn't doing any filtering, I think the filtering menu bar is a bit obtrusive. Some options I can think of...
- Have a Filter button in the existing main menu bar, with a dropdown menu attached. It should only be visible for the NUnit Tree. There's a standard icon for this.
- Use a context menu on the tree display in the same way.
- Have a Filters main menu.
-
The "All" button is a checkbox button. Each time you click it it turns filtering on and off. I think a "Clear" button, which merely turned off filters, would be clearer. :-)
-
If you turn on multiple checkboxes and then turn them all off, nothing is displayed. That seems like a bug, but it might go away after you do item 2.
I'll come back with code comments in a while.
button.Font = new Font(button.Font, style); | ||
} | ||
} | ||
} |
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.
At first glance, this class seems unnecessary. You're putting functionality in the view that would normally be in the presenter in the MVP Pattern. The button that clears the others could just be a button. When the presenter detects that it has been clicked, it can clear all the selected items in the mulii-selection group. To do this, you would need to give the group a method to clear everything. I think that would make a good compromise as compared to having the presenter clear each button separately.
Sounds good. The main toolbar button can make any and all filtering UI visible in the tree display. Initially it will just be categories, but will change as you add more filters. The main toolbar and presenter doesn't need to know exactly what filtering is possible. |
Oh, it's failing - I need to check it! |
That looks better now! :-) @CharliePoole : |
This is extremely difficult to review with 53 files changed! No need to explain as I eventually figured out what you were dealing with. We'll work this one through but please try to keep to smaller commits in future, dealing with one issue at a time. Please create issues for any separate problems you solved in this PR, icon transparency for sure but any other similar general issues. That way, when we do a release an entry for the bug fix will be generated automatically in the release notes. Otherwise, there is no record of what got fixed. Be patient, for each new review, I download your branch, build it and exercise it. It's the only way I know to review GUI. For this one, I'lll probably comment one commit at a time but you won't see the comments till I finalize the review. |
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'm marking it as changes requested, although my suggestions are somewhat vague - even questions in some cases, so let's discuss. We may decide to leave some things as they are till we have another type of filter in the mix. That might make it clearer what we need to do.
src/TestCentric/testcentric.gui/Images/Tree/Circles/Failure.png
Outdated
Show resolved
Hide resolved
First of all, I'm sorry for the confusion about this large commit of all those images! |
Rolling back would make the final comparison cleaner, but isn't worth the extra effort. You already took the time to do it and I already took a bit of time to understand it. Best is to just create a new issue, which will be resolved by this PR, so that the reason for the change is visible in the release notes and future devs and users don't have to dig through our comments here in order to understand it. I can imagine myself getting carried away in the same manner in your place, but ideally I would have made a note or even created an issue for changing the icons. If the PR were already created (as now) that issue would have to wait until it was merged. If it had not been created, I might just quickly merge a new PR to resolve it, then rebase this branch on top of it and do a forced push. Forced push on a branch that's not yet merged is OK but unfortunately GItHub deals badly with it if there is already a PR. I should write these "rules" down somewhere, I guess. :-) |
Great! Let's finish this up. I have an idea for some better ways to experiment with the UI before doing a PR. Let me think on it for a day. |
Regarding those image changes: I think I'd rather do it right this time and using the correct approach. Apart from this I'll adapt those code parts you mentioned and most important I'll remove the text from the filter toolbar buttons to reduce some space. |
Well, OK if you insist. But be sure it's a rollback, i.e. another commit to reverse the changes. As I explained, you can't just drop the commits and do a |
5c13c56
to
721f4a2
Compare
I tried to address all requested changes. But either Github is tricking me or I missed one change request ?!? |
@rowo360 You are blocked because I requested changes and I have to re-review. GitHub doesn't know if your changes are satisfactory. I see you did a forced push, which is what I asked you to avoid. If necessary, I'll go in merge it manually. That will be in the morning however. It's 3AM and I'm only briefly awake here. :-) |
@rowo360 I went ahead and bypassed the checks to merge this PR. I wanted to look more closely but I have a dental procedure to be done tomorrow so I thought I should get you unblocked. Hopefully the merge will succeed and build. |
This PR contributes to issue #1148 by providing UI elements to filter tests by their outcome.
Here's a screenshot for some visual insight:

Here's a list of the functionality:
The two additional outcomes 'Noninclusive' and 'Skipped/Warning' are not considered so far. We can discuss if we should add the support for them right now or wait until it's requested!
Technical point of view:
This PR includes a lot of changed files, but most of them are UI related. I hope it's possible to get an overview. Here are some aspects:
IMultiSelection
. That's similar to the existing interfaceISelection
, but supports the selection of multiple items.MultiCheckedToolStripButtonGroup
andMultiCheckedToolStripButtonGroupWithDefaultButton
. I'm not completly convinced by the class names myself, so I'm open for any suggestions - finding good names is always a challenge :-)MultiCheckedToolStripButtonGroup
represents a group of Toolstrip buttons, several of which can be checked. Apart from that it's implementing theIViewElement
interface like any other UI element.MultiCheckedToolStripButtonGroupWithDefaultButton
derives from theMultiCheckedToolStripButtonGroup
class by promoting one button to a DefaultButton, which resets the checked state of all other buttons if checked himself. (That's required if the 'All' outcome button is checked)But I wanted to express somehow visual that all Passed, Failed, 'not run' tests are included - so I simple add all colors (Green, Red, Grey).