Skip to content

Report Info: various fixes to improve readability of multi-line metrics #2103

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

Merged
merged 1 commit into from
Aug 12, 2018

Conversation

jrfnl
Copy link
Contributor

@jrfnl jrfnl commented Jul 27, 2018

As discussed in #2102, this PR makes the following changes to improve the readability of the Info report for multi-line metrics:

  1. Start the first metric value on a new line.
  2. Align the arrows, and by extension the counts, of the metrics.
  3. Move the totals to a separate line underneath the list of metric values.
  4. Right align the counts.
  5. Add thousands separators to the counts.
  6. Right align the percentages.
  7. Stop it reporting 0% for metrics and report <0.01% instead.

Fixes #2102

Screenshot before (on Windows):

report-info-before

Screenshot after (on Windows):

report-info-after

@jrfnl jrfnl force-pushed the feature/info-report-improvements branch from 236cd0c to 0714960 Compare July 27, 2018 14:17
@jrfnl jrfnl force-pushed the feature/info-report-improvements branch from 1433037 to 0714960 Compare August 8, 2018 18:16
As discussed in 2102, this PR makes the following changes to improve the readability of the `Info` report for multi-line metrics:

1. Start the first metric value on a new line.
2. Align the arrows, and by extension the counts, of the metrics.
3. Move the totals to a separate line underneath the list of metric values.
4. Right align the counts.
5. Add thousands separators to the counts.
6. Right align the percentages.
7. Stop it reporting 0% for metrics and report <0.01% instead.

Fixes 2102

Additionally, the sort order for metric values with the same count has been improved.
@jrfnl jrfnl force-pushed the feature/info-report-improvements branch from 0714960 to ec3388d Compare August 8, 2018 18:47
@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 8, 2018

FYI: I've made one more minor change to the commit to improve the sort order of metrics with the same counts.

In the screenshots above this only occurs once - that part of the screenshot will now change to (highlight excepted of course):
phpcs-info-report-sort-order

@gsherwood gsherwood merged commit ec3388d into squizlabs:master Aug 12, 2018
gsherwood added a commit that referenced this pull request Aug 12, 2018
@gsherwood gsherwood added this to the 3.3.2 milestone Aug 12, 2018
@gsherwood
Copy link
Member

Thanks a lot for these changes. The report looks so much better.

@jrfnl jrfnl deleted the feature/info-report-improvements branch August 12, 2018 23:41
@jrfnl
Copy link
Contributor Author

jrfnl commented Aug 12, 2018

Glad you approve and thanks for the merge.

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.

2 participants