Standardize reporter output #32483
Replies: 5 comments
-
Hey are you no longer interested in doing this? I think this is a great idea whoever wants to pick it up. |
Beta Was this translation helpful? Give feedback.
-
I'd be glad to. |
Beta Was this translation helpful? Give feedback.
-
Terrific! Want to do a few copy tweaks in a PR to start with? The code quality issue is a well-known problem and a bigger lift to do. If you'd like to tackle that as well, some of the core team has dug in on it and can discuss more what would need done. |
Beta Was this translation helpful? Give feedback.
-
Sure, would it be easier for y'all to break that into a separate issue or subsume it into this one? |
Beta Was this translation helpful? Give feedback.
-
Hiya! This issue has gone quiet. Spooky quiet. 👻 We get a lot of issues, so we currently close issues after 60 days of inactivity. It’s been at least 20 days since the last update here. Thanks for being a part of the Gatsby community! 💪💜 |
Beta Was this translation helpful? Give feedback.
-
Summary
This is super simple, but it's not a bug and didn't seem like a documentation issue. I think it would be good to standardize the reporter output to the console. Right now there's inconsistent capitalization, acronyms, and (grammatical) mood.
Basic example
Specifically, I'd prefer the
activityTimer()
,phantomActivity()
, andcreateProgress()
methods to prefer console outputs that follow normal capitalization, normal acronym capitalization, and the imperative mood.current:
success delete html and css files from previous builds
proposed:
success Delete HTML and CSS files from previous builds
current:
success Rewriting compilation hashes
proposed:
success Rewrite compilation hashes
Function names would stay the same:
success createPagesStatefully
Motivation
Generally, I think consistency is a good thing. Visually, sentence capitalization creates a nice demarcation between the result (
success
) and what produced the result (Rewrite compilation hashes
). If we adopt sentence capitalization, not correctly capitalizing acronyms would seem weird to me(Delete html and css files from previous builds
). Lastly, I think the imperative mood makes for more concise logging and I'm personally used to it from git commit messages.The fixes should be simple but spread over several files: the files where the reporter methods are called, test files that check the console log, and documentation files that show expected outputs (for consistency's sake).
Incidentally, though this might be a separate code quality issue, the
reporter
module is often imported asreport
rather than its export and filenamereporter
.Beta Was this translation helpful? Give feedback.
All reactions