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

Bold maximum usage count for each mismatched dependency #206

Merged
merged 1 commit into from
Sep 16, 2021

Conversation

bmish
Copy link
Owner

@bmish bmish commented Sep 15, 2021

Bold the usage count of the mismatching dependency version with the highest number of usages as a way of indicating that it's the highest, in case that has some significance in terms of deciding which version should be used.

Bolding the highest value in a list/column is a practice found elsewhere in data visualization.

Screen Shot 2021-09-14 at 10 54 25 PM

@bmish bmish added the enhancement New feature or request label Sep 15, 2021
versionObj.packages.length,
// Bold the usage count if it's the highest, as long as it's not the only usage count present.
usageCount === highestUsageCount && hasMultipleUsageCounts
? chalk.bold(usageCount)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is bold too subtle? Would it make sense to add a color as well?

Copy link
Owner Author

@bmish bmish Sep 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a bit subtle, but that could be okay because:

  • It seems to be the general convention to bold the highest value in a column/list (but I'm not confident about this)
  • I don't really want to draw that much attention to it, as the highest dependency version is arguably more important than the highest usage count (in part because we will autofix to the highest dependency version) -- so I was a bit on the fence about this change to begin with
  • I'm unaware of any other formatting (colors included) that makes sense

@bmish bmish changed the title Bold maximum usage count Bold maximum usage count for each mismatched dependency Sep 16, 2021
@bmish bmish merged commit 1b5220d into master Sep 16, 2021
@bmish bmish deleted the max-usage-count branch September 16, 2021 02:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants