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

Improve JS package descriptions #8121

Merged
merged 3 commits into from
Jul 23, 2018

Conversation

chrisvanpatten
Copy link
Member

Description

I went in to fix a typo in the @wordpress/components package description, and ended up giving them all a bit of love.

How has this been tested?

It has not been tested — the changes are only to text in the packages' package.json files.

Types of changes

  • Applied sentence case to all descriptions
  • Expanded abbreviations (to words like internationalization, accessibility, utilities, etc.)
  • Removed trailing periods on a few descriptions
  • Improved the language in one or two cases

@gziolo gziolo requested review from youknowriad and aduth July 23, 2018 05:28
@gziolo gziolo added this to the 3.4 milestone Jul 23, 2018
@gziolo gziolo added [Type] Developer Documentation Documentation for developers [Type] Code Quality Issues or PRs that relate to code quality labels Jul 23, 2018
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Nice one 💯 Thanks for opening this PR. In general, I like those changes because they bring consistency. I would prefer to have someone else to double check them before we proceed with mthe erge.

@gziolo gziolo requested a review from tofumatt July 23, 2018 05:31
Copy link
Member

@tofumatt tofumatt left a comment

Choose a reason for hiding this comment

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

I dig it. A few thoughts but this is better than before so 🚢. If you want to make any of the small changes I suggest then feel free to do so before merge 😄

@@ -1,7 +1,7 @@
{
"name": "@wordpress/babel-plugin-import-jsx-pragma",
"version": "1.0.1",
"description": "Babel transform plugin for automatically injecting an import to be used as the pragma for the React JSX Transform plugin.",
Copy link
Member

Choose a reason for hiding this comment

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

Interesting, I'd have thought sentence-case would be better for those. Some descriptions are surely multi-sentence?

It's split on NPM (React seems to be all without periods; lodash all with, etc.)

Given we're in the "comments must have full-stops" camp (I like it), maybe we should be here too? 🤷‍♂️

Copy link
Member

Choose a reason for hiding this comment

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

Given we're in the "comments must have full-stops" camp (I like it), maybe we should be here too?

I would be also happy to see this change.

Copy link
Member

Choose a reason for hiding this comment

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

Seems like something that would be good to have (though from what I can tell, not yet offered as a feature) from npm-package-json-lint, which we're already using and have a predefined configuration for.

Choose a reason for hiding this comment

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

Hey! I just released v3.3.0 of npm-package-json-lint with a new description-format rule. It has two options:

  1. requireCapitalFirstLetter - Throws an error if the first character in the description isn't capitalized.
  2. requireEndingPeriod - Throws an error if the description doesn't end with a period.

Hopefully this works well for your team!

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, opened PR to start using this new rule: #8596.

@@ -1,7 +1,7 @@
{
"name": "@wordpress/components",
"version": "1.0.1",
"description": "UI Compoonents for WordPress",
Copy link
Member

Choose a reason for hiding this comment

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

😅

@@ -1,7 +1,7 @@
{
"name": "@wordpress/compose",
"version": "1.0.1",
"description": "WordPress Higher Order components",
"description": "WordPress higher-order components",
Copy link
Member

Choose a reason for hiding this comment

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

I'd add "(HOC)" in brackets here; lots of people throw that acronym around and giving newbies context here for free is 👍

@@ -1,7 +1,7 @@
{
"name": "@wordpress/keycodes",
"version": "1.0.1",
"description": "KeyCodes utilities for WordPress",
"description": "Keycodes utilities for WordPress",
Copy link
Member

Choose a reason for hiding this comment

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

This one, I think, could be expanded upon further ("Keycodes utilities for WordPress; used to check for keyboard events across browsers/operating systems")

@gziolo
Copy link
Member

gziolo commented Jul 23, 2018

Travis failed after I added fixes suggested by @tofumatt. Those are only text changes so I will merge as is.

@gziolo gziolo merged commit 09db904 into WordPress:master Jul 23, 2018
@aduth
Copy link
Member

aduth commented Jul 23, 2018

Many of these descriptions are reused as the tagline description in the README.md (which I think is a good thing), and are now not always in sync (e.g. @wordpress/npm-package-json-lint-config).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Type] Code Quality Issues or PRs that relate to code quality [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants