Skip to content
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

Istanbul redesign branch #439

Merged
merged 1 commit into from
Oct 17, 2015
Merged

Istanbul redesign branch #439

merged 1 commit into from
Oct 17, 2015

Conversation

tmcw
Copy link
Contributor

@tmcw tmcw commented Sep 8, 2015

Fixes #434 - this is a redesign of istanbul to simplify and beautify
reports.

2015-10-12 at 10 07 am

@tmcw
Copy link
Contributor Author

tmcw commented Sep 9, 2015

cc @gotwarlost for a code review / design review

@ronkorving
Copy link
Contributor

Very nice, I love it!

@gotwarlost
Copy link
Owner

I'm not the right person to review aesthetics :)

It certainly looks way more beautiful than the current set of the pages.
That said, I'll give you some feedback on the functional aspects of the new format

  • the "code coverage by istanbul at date-time" line is too distracting at the top. People mostly don't need this information but it is useful sometimes. How big a deal is this to move it to the bottom and out of the way?
  • IMO, the header takes up to much room. Partially due to the blurb on the top.
  • Personally, I find things that are left-flush (instead of centered) to be more predictable for quick scans of pages. I do realize that that is not the "in" thing any more.
  • As you can tell by the old report format, I'm also a big fan of column borders to delineate information in tables. I find the lack of borders makes the columns more difficult to grok

Thoughts?

@tmcw
Copy link
Contributor Author

tmcw commented Sep 14, 2015

the "code coverage by istanbul at date-time" line is too distracting at the top. People mostly don't need this information but it is useful sometimes. How big a deal is this to move it to the bottom and out of the way?

Yep, moving this out of the footer was a pretty late decision: putting it back in the footer and making it much quieter sounds like a good idea.

Personally, I find things that are left-flush (instead of centered) to be more predictable for quick scans of pages. I do realize that that is not the "in" thing any more.

This design uses a max-width before it goes centered, so it will be left-flush on small displays. For larger screens, pushing everything hard to the left tends to look awkward.

As you can tell by the old report format, I'm also a big fan of column borders to delineate information in tables. I find the lack of borders makes the columns more difficult to grok

Yep, I'll do a second pass on the table styling.

@JuanCsfx
Copy link

Small comment, in the current HTML lcov-report, percentage values might have different number of decimals (e.g. 80% or 82.1% or 84.15%).

It would be great if as part of this redesign there could be a parameter to have all values using a specified number of decimals, in my opinion this makes it easier to compare numbers.

@tmcw
Copy link
Contributor Author

tmcw commented Sep 14, 2015

I think that'd be out of scope for design - you would need to specify that parameter at generation time, right?

@JuanCsfx
Copy link

It is certainly borderline between generation and display.

There would be a way to dynamically change the values by inspecting all values belonging to certain classes (pct-high, pct-medium, etc) but this is probably out of scope if this redesign is restricted to changing CSS files

@MarkHerhold
Copy link

@tmcw Very nice work you are doing here. The whole community will greatly appreciate what you are doing. I remember the first time I used istanbul I wondered how many years old it was! 😆

I have some feedback if you are willing to hear it. I am by no means a designer or anything so take all of this with a grain of salt.

Color Scheme

I like the shade of green you chose. 👍 I really hate the purple on the code highlighting and in the table. Sorry. 😞 The color seems to obscure the code.

I understand that you are trying to make the theme where shades of purple mean untested, but I really just don't care for it. I actually like the old red color better.

Header

The new header looks so much better! I feel it is missing color for truly quick feedback though. I don't want to have to mentally translate 31.25% function coverage to "bad, needs work" every time I look at the percentages. I think coloring the percentage backgrounds would convey meaning a lot quicker.

For example, here is a quick mockup with palegreen, khaki, and lightcoral:
image

Footer

I don't see a screenshot of the footer. I assume it is gone, but if you do bring it back, please achor it the the bottom of the page. Footers in the middle of the page are silly!

Table

I think I would like the table better if it had a light border as @gotwarlost said.

Again, thanks for your work on this! 👍

@tmcw
Copy link
Contributor Author

tmcw commented Sep 23, 2015

👍

I've updated the screenshots & live demo to reflect the latest style revision, that addresses much of the feedback:

  • Reds are now more reddish and less bluish, and the red of syntax highlighting is lighter, so you can see the code better.
  • The footer content is back on the bottom, making the header shorter. The footer sticks to the bottom of the page if the page content isn't >100% of the page height
  • Tables now have column borders

I agree it'd be nice to have the header percentage numbers also be colored, but that would require a JavaScript-level change, and I'd like to keep this scoped tightly to CSS & HTML changes only.

@davglass
Copy link
Collaborator

I like the overall design changes, but I do miss the colors in the header tho. I really liked that the header color changed from red -> yellow -> green so a quick glance tells me that this page is ok. I can't get that from the current look.

@MarkHerhold
Copy link

Love the new screenshots with the new reds! 💯 Thanks for addressing the feedback @tmcw!

@tmcw
Copy link
Contributor Author

tmcw commented Sep 23, 2015

@davglass the header still does that: it's a darker color concentrated in the bar:

2015-09-23 at 4 27 pm

@davglass
Copy link
Collaborator

@tmcw Ah - I didn't see that, the files I clicked on were all gray. Can you rebase to fix the conflicts? I'd like to pull this down, install it locally and run it on some of my larger code bases to see what I looks like with more code.

@tmcw
Copy link
Contributor Author

tmcw commented Sep 24, 2015

@davglass 👍 just rebased

@jergason
Copy link

This looks so much better.

@gotwarlost
Copy link
Owner

I'm going to let @davglass be the czar for this PR. If he says it's ok, it is and vice versa :)

@tmcw you should reasonably expect that a small vocal minority might resist this change once it is merged so we need you at hand after the merge to handle any fallout and tweak as needed.

@mourner
Copy link

mourner commented Oct 2, 2015

Love the improvements. The only thing I don't like is how metrics line up in the header — it makes them hard to read:

image

Rather than do a fixed 4-column layout, I would let the blocks flow and have fixed margin between each other. Closer to this (but with uniform margins, and the "ignored" block also fitting to the right if there's place left):

image

@mourner
Copy link

mourner commented Oct 2, 2015

Also a minor thing, it would be nice for the line number field to be smaller so that the code lines up better with the header. The same thing for the files table — it would look nicer when lined up with the header.

image

@tmcw
Copy link
Contributor Author

tmcw commented Oct 2, 2015

True, swapped the columns for inline, and made the table and numbers align

2015-10-02 at 9 03 am

Aligning code to the header is not really doable or useful given the structure of the design - line numbers are right-aligned and the longest number will be at the bottom, so it's unlikely you'll see both the header and the aligned-line-number at the same time.

@mourner
Copy link

mourner commented Oct 2, 2015

@tmcw at least you can remove fixed 50px column width so it looks like this:

image

Also, could you move "1 function ignored" to the rest of the blocks as well?

@tmcw
Copy link
Contributor Author

tmcw commented Oct 2, 2015

2015-10-02 at 10 46 am

Removed the 50px line width & moved the ignored message up

@mourner
Copy link

mourner commented Oct 2, 2015

@tmcw looks perfect now.

@sterling
Copy link
Contributor

sterling commented Oct 3, 2015

Just my two cents here, but wouldn't it make sense for the overall coverage "progress bar" color to match the state it is in? Green has a particular meaning in the coverage report so it seems odd that they are always filled with green. For example, untested.js is in a "red" state (signified by the background color of the file name and the coverage bar). It makes more sense to me for the bar's filled color to match its state/background color (like a dark red rather than the current dark green).

@tmcw
Copy link
Contributor Author

tmcw commented Oct 3, 2015

Green has a particular meaning in the coverage report so it seems odd that they are always filled with green.

As you can see in the screenshots and demo, the bar is green, grey, or red depending on context. Is there something else you're referring to? What you describe as the improvement is the current state, I'm pretty sure.

@tmcw
Copy link
Contributor Author

tmcw commented Oct 3, 2015

Oh - the bar in the summary table, not the bar in the header.

@tmcw
Copy link
Contributor Author

tmcw commented Oct 3, 2015

👍

medium:

2015-10-03 at 1 10 pm

low:

2015-10-03 at 1 11 pm

@sterling
Copy link
Contributor

sterling commented Oct 3, 2015

👍 perfect

@davglass
Copy link
Collaborator

davglass commented Oct 6, 2015

I ran this locally on a larger internal project, two things stuck out when I took a look at the output.

First, the limiter makes it very hard to see when you have a deeper directory structure (4-5 levels deep). It looks much better without this limit and making the report fill the screen (with this it scrolled to the right). So removing the entire limiter class made it look much better.

.limiter {
  max-width: 960px;
  margin: 0px auto;
}

Second, the table listing of files without the row separator makes it very hard to tell what lines go where. It's hard to associate the numbers with the file without them. So adding something as simple as a bottom border like below makes it much more readable:

.coverage-summary td {
    border-right: 1px solid #999;
    border-bottom: 1px dashed #ccc;
}

Other than those two things, this is looking very good.

The app I tested it on was a fairly large internal one (just to show context on the feedback):

  • 100% Statements (6088/6088)
  • 99.9% Branches (3147/3150)
  • 100% Functions (1151/1151)
  • 100% Lines (6079/6079)

@sterling
Copy link
Contributor

sterling commented Oct 7, 2015

I tried out your branch on one of my own projects and this is how it looked in Chrome:

screen shot 2015-10-07 at 8 49 35 am

The sorting arrows are misaligned and it appears to be caused by long file names/paths.

@sterling
Copy link
Contributor

sterling commented Oct 7, 2015

Also, a suggestion:

I use a rather wide monitor and the 960px width feels a little limiting for tabular data--especially if the filenames/paths are long. Could it be a little more dynamic to utilize the space it is given on the window?

@kinday
Copy link

kinday commented Oct 10, 2015

I dropped anything looks visually heavy to me.

image

White borders don’t stand out but still give a clue where the columns are. In this case we can add row separation and table remains neat. The last touch for borders is to remove ones separating related columns.

Also I removed charts’ borders and set chart height to 6 px. Charts are auxiliary; they aren’t the main content.

And what about 10 px horizontal padding? I removed it to look everything consistent.

@tmcw
Copy link
Contributor Author

tmcw commented Oct 10, 2015

I'll look into removing the limiter class - it's pretty standard to have a limiter for large monitors (like GitHub's, for instance) since hugely-wide layouts are usually oddly spaced.

The sort-arrow breakage is a bug - I'll fix that.

Also I removed charts’ borders and set chart height to 6 px. Charts are auxiliary; they aren’t the main content.

I'm trying to redesign this as little as possible; each change from the status quo generally will come with some pushback, so my strategy is to make small high-value changes. You're welcome to do a second design push after this one, but I'd like to keep the scope down so that it can be merged in a reasonable timeframe.

Fixes #434 - this is a redesign of istanbul to simplify and beautify
reports.
@tmcw
Copy link
Contributor Author

tmcw commented Oct 12, 2015

Updated the demo link & the branch, rebased against master and squashed to a single commit

  • Ensures sorting arrows never drop to the next line
  • Adds row borders
  • Removes limiter

@davglass
Copy link
Collaborator

@tmcw This looks great now, I pulled and ran this on those larger internal projects again and I can now see the results much better now :)

I do believe that if/when we merge this it will have to be a major version bump. @gotwarlost are you opposed to making this a 1.0.0 or do you want to wait until your harmony branch is ready to make that leap? In the latter case then this would be a 0.4.0 release for sure.

@gotwarlost
Copy link
Owner

Strictly speaking these changes aren't backward incompatible unless someone is parsing HTML to get coverage output (in which case they deserve it!)

I'd go with 0.4.0 with props to @tmcw on the README as well as the contributions page. Major version changes without reason is an unnecessary overhead on all the modules that declare a 0.x dependency on istanbul. I want to reserve the major version change for some breaking instrumentation and source mapping changes that are coming soon (famous last words on the "soon" part :) )

@davglass
Copy link
Collaborator

@gotwarlost Sure, we'll do a 0.4.0 with this change.

@tmcw are you ready for this to be merged? I'll pull it locally, merge it with master and add the bits here and there for your contributions.

@tmcw
Copy link
Contributor Author

tmcw commented Oct 14, 2015

👍 Yep, :shipit: !

gotwarlost added a commit that referenced this pull request Oct 17, 2015
Istanbul redesign branch
@gotwarlost gotwarlost merged commit 7260b1a into gotwarlost:master Oct 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants