The taskinfo page hides the result value by replacing it with the text "Show result" that expands to the full result via javascript. This was done because sometimes the result can be a big ugly mess. However, for many failed builds the result is a single useful line of text that should not be obscured.
This patch is smarter about collapsing the result. When the results is no more than 10 lines and length is no more than 512 chars, it will just show the full result. Otherwise, it will show first 10 lines or first 512 chars.
Let's lower those limits. I think 5 lines or 400 chars should be about right (10 lines is quite a lot of screen space in context).
The expansion code doesn't appear to be working. I see the abbreviated results, but there is no way to expand them. The previous patch you showed me was very close. I think just the two changes I recommended on top of it would do the trick: https://github.com/mikem23/koji-playground/commits/issue222-patch2
1 new commit added
Have lowed the limits as your advice, mikem.
For the expansion code, I don't find all changes for taskinfo.chtml file in koji-playgroup issue222-patch2 branch. And mikem, I test this PR by python code and this chtml file. And you see, this is HTML produced, and you can try it in here.
It seems you have opted to have "..." be the expansion link instead of the more explicit "show complete result" text.
The immediate problem with this is that the code does not include the "..." when displaying a dictionary result. This is what I was seeing before.
For other result types, the "..." is present and does expand.
However, even in that case it's a bit hard to see that the "..." is a link. The change in color is not so apparent with just three small dots.
I think the simplest thing to do here is bring back the "show complete result text, but place it at the bottom, as I suggested earlier:
https://github.com/mikem23/koji-playground/commits/issue222-patch2
Have replaced the '...' by 'Show complete results' in the link to show the full results and placed the link at the bottom.
@mikem the patch in the https://github.com/mikem23/koji-playground/commits/issue222-patch2 lacks the commit, that's why you see the expand codes not work for dict type results.
But it's no matter now since we placed the link to show the complete results at the bottom of the taskinfo page.
Here is the demo that you can verify the expand code. Do this make sense?
BTW, this demo shows a dict type results.
Demo that displays a long results.
@mikem if you think we should place the link to show the abbreviated results at the bottom, pls add a comment here, I will fix the patch soon.
Would it increase usability if we add 'Show abbreviated results' also to bottom? I'll display long listings and then I've to scroll back to hide it again. Not sure if it would be really usable, as I don't think, that I'll be re-hiding content after I've expanded it.
@mikem hi.
What do you think about @tkopecek' proposal?
Both at the bottom? Sounds fine to me. I think I suggested similar earlier
rebased
Have fixed the PR and rebased it.
I don't see link at the bottom now. I've 'Show complete results' at the bottom, but 'Show abbreviated results' on top.
@tkopecek fixed. Pls try again.
Works for me now.
Commit 1a11849f fixes this pull-request
Pull-Request has been merged by mikem@redhat.com