Skip to content

Commit 5198cc0

Browse files
ziontscaydie-tran
authored andcommitted
Modify styling of CLI output (#1598)
* Update styles in commands Specifically, replace all instances of chalk.blue with chalk.cyan, which is more readable in dark mode (the green color we use is basically unreadable in light mode anyway) Additionally, this changes some spacing of the service:list command to allow users to see the URL to navigate to more obviously.
1 parent 68f7306 commit 5198cc0

5 files changed

Lines changed: 10 additions & 9 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- `apollo`
66
- Add sdl download ability to `client:download-schema`
7+
- colors: use cyan instead of blue for text highlighting
78
- `apollo-codegen-flow`
89
- <First `apollo-codegen-flow` related entry goes here>
910
- `apollo-codegen-scala`

packages/apollo/src/commands/client/check.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ export default class ClientCheck extends ClientCommand {
149149
}) => {
150150
const { name, locationOffset, relativePath } = operation;
151151
this.log(
152-
`${name}: ${chalk.blue(`${relativePath}:${locationOffset.line}`)}\n`
152+
`${name}: ${chalk.cyan(`${relativePath}:${locationOffset.line}`)}\n`
153153
);
154154

155155
const byErrorType = validationResults.reduce(

packages/apollo/src/commands/client/push.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ export default class ClientPush extends ClientCommand {
2727
let result = "";
2828
try {
2929
await this.runTasks(({ flags, project, config }) => {
30-
const clientBundleInfo = `${chalk.blue(
30+
const clientBundleInfo = `${chalk.cyan(
3131
(config.client && config.client.name) || flags
32-
)}${chalk.blue(
32+
)}${chalk.cyan(
3333
(config.client &&
3434
config.client.version &&
3535
`@${config.client.version}`) ||
@@ -51,9 +51,9 @@ export default class ClientPush extends ClientCommand {
5151
}
5252
},
5353
{
54-
title: `Checked operations against ${chalk.blue(
55-
config.name || ""
56-
)}@${chalk.blue(config.tag)}`,
54+
title: `Checked operations against ${chalk.cyan(
55+
config.name + "@" + config.tag
56+
)}`,
5757
task: async () => {}
5858
},
5959
{
@@ -115,7 +115,7 @@ export default class ClientPush extends ClientCommand {
115115
operation.signature
116116
];
117117

118-
result += `\nError in: ${chalk.blue(file)}\n`;
118+
result += `\nError in: ${chalk.cyan(file)}\n`;
119119
result += table(
120120
[
121121
["Status", "Operation", "Errors"],

packages/apollo/src/commands/service/__tests__/__snapshots__/list.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Fetching list of services for graph engine@master [completed]
2828
╚═══════════╧═══════════════════════════════╧═══════════════════════════╝
2929
3030
31-
3231
View full details at: https://engine-staging.apollographql.com/graph/engine/service-list
32+
3333
"
3434
`;

packages/apollo/src/commands/service/list.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ function formatHumanReadable({
8181

8282
const serviceListUrlEnding = `/graph/${graphName}/service-list`;
8383
const targetUrl = `${frontendUrl}${serviceListUrlEnding}`;
84-
result += `\n\nView full details at: ${targetUrl}`;
84+
result += `\nView full details at: ${chalk.cyan(targetUrl)}\n`;
8585
}
8686
return result;
8787
}

0 commit comments

Comments
 (0)