-
Notifications
You must be signed in to change notification settings - Fork 21
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
new diff view #1636
Comments
You're not the first one with this feedback, and I kind of agree. Feel free to make a mockup of the diff view in combination with surviving and killed mutants. |
The on-click behaviour to toggle the display of mutants with nested mutants like in is a complete mess. The browser jumps all over the place to focus on the activated mutant, which eventually turns into the surrounding block removal mutation (under
Because the diff view inserts new lines it also displaces later mutation toggles. When a later toggle is activated the still active, earlier mutation disappears, restoring the original position of the later toggle. This also moves the click target away from under the cursor, all without moving the browser window. The diff renderer can be really janky: |
I disagree. Mutant id's can be any string. Long names, GUIDs, etc. I'm planning to use longer IDs in the future. The ID should be a technical ID, not really something to communicate to end users.
This is heavily debated in #1578. The consensus seems to be that the underline is not clear enough.
It wasn't for me either. The problem became apparent when I implemented the diff view. The mutated line doesn't include the mutant indicators and thus is not a true "diff". I am now thinking to simply make the mutant indicators bigger. Would that help you?
I don't exactly understand this question. Clicking mutants cycles through the mutants that are active on the position of the click, so not only the mutants starting on that line. It does so from "smallest" to "largest" in scope. I thought that it would be clear, but apparently, it isn't for you? What is your expectation here? @feckertson is this what you mean with "cycles through them backwards"?
I implemented it for the next-previous buttons on the top left and then just let that behavior also work for clicking mutants. It only does that when the mutant isn't already in the viewport so I didn't run into the browser "jumping all over the place". I think we could change the behavior to only scroll when using the next-previous buttons.
Yes, the code jumps around a bit, but there is not a lot we can do about that. I also think it isn't that big of a deal. Example: Do you see a problem that I don't? |
It's clear enough what happens. It's not at all clear it's going to happen and it's frustrating to get moved elsewhere as a consequence of an accidental cycle or simply not seeing a containing scope.
Nah, the behaviour is actually nondeterministic. It doesn't seem to be strictly a browser issue and refreshing seems to be able to make it go away. It's not evidently tied to clicking the discs vs. the mutated code, and I think I've seen it cycle rightwards but start from the rightmost disc. I have not definitively witnessed it cycle leftwards.
Throw in a few more mutations on the same line and you'll see what I mean. That nothing can be done about it presupposes that the content must shift, which of course is a viewpoint I feel that the old report adequately demonstrated is untrue. |
No. Click on the word "amount" in line 25 of this report several times. That word happens to be included in three different overlapping mutations. Clicking it repeatedly cycles through each of them. Does the cycle not seem backwards to you? It does to me because I read left-to-right and top-to-bottom, not the other way around. This behavior is neither random nor browser dependent.
Although this comment was made by someone else, I can appreciate it. Observe that in the previous exercise you could simply click repeatedly on the word "amount" without ever moving the cursor. Now try to click repeatedly on the word "amount" in line 29 (while any mutant from the previous exercise is still active). It cannot be done without repositioning the cursor. From a UX perspective that is poor behavior. A click target should not move away when one clicks on it. Perhaps it cannot be addressed in all cases but it would be better to have the the scroll position change than to have the last click target jump away from the cursor.
The sentiment in #1578 is that the original placement of the markers conveyed a huge amount of information and that the underlines do not come close to making up for the loss of that information created by moving the markers to the ends of the lines. I agree. The sentiment in that conversation is that "a true diff" does not provide that much value, certainly not enough to justify making sacrifices. Besides why is the diff more "true" when the indicators are at the end of the line? The diff still does not have indicators that the original line does have.
Perhaps, but in the original report they were numbered rectangles. Developers could communicate with each other about a particular mutant in a specific report simply by referencing its number. Now the best one can do is say something like "Hey. I'm having trouble understanding the third red dot on line 275. Can you help me out?" |
What do you mean by this? I'm not sure what the performance recording I'm looking at is showing. In the second example |
I think I figured it out. I have an unshareable report with a component that behaves in exactly this way and another component that cycles strictly left-to-right, both right next to each other. The behaviour is deterministic, and browser independent, but I think it is not technically backwards, even though this example clearly feels exactly backwards. If you click repeatedly on L25's What really happens is that the scope of overlapping mutations increases and the toggle cycles from smallest to largest scope. The sense of nondeterminism and reversed cycling comes from overlapping scopes, often with small surface areas, that cannot in any way be distinguished. Another thing I learned explaining the above is that the toggle handler clears selected text, anywhere in the report, every time you toggle something. This makes it ~impossible to copy any text from the diff view.
The first picture shows toggling the same mutation twice, the screen freezing for about 70ms each time. The second picture shows toggling another mutation, which happened to be larger, once, with the screen freezing for about 300ms and recovering for another 300ms. In the second picture, To put that into perspective, smooth movement is >=60 FPS, which is 1 frame every <17ms. 70ms may be a small amount of wall-clock time but in interactivity that feels like an eternity. The report I recorded those one was generated with Stryker.NET 1.3.1. Some quick testing on the But I can literally see the input latency in the toggling in the GIF shown above. |
Agreed that it can be confusing and that the confusion did not exist before... back when there were clearly numbered markers embedded within the code. One could look at a marker and make inferences about its meaning based on its position. In cases where the meaning was not completely clear one could click one the marker and see its exact meaning. A superior UX design. |
I am not really a fan of the underlines and squiggly underlines for the new diff view rather than having light background colors to signify the status of mutants. They really clutter up the display.
Can there be a way to configure this?
... or maybe making the different choice of underlining the unusual thing (the diff) and continuing to use background highlighting for the normal thing (the original code plus its mutation status).
The text was updated successfully, but these errors were encountered: